Reputation: 21
How to run the JOGL code on the GPU?How to Check whether the JOGL code is Running on the CPU or GPU?How to Select the particular GPU When multiple GPU are present ?
Upvotes: 0
Views: 819
Reputation: 4075
JOGL allows to choose a profile and some capabilities, they are used to pick a driver and some of them aren't hardware accelerated. You can use the boolean parameter "favorHardwareRasterizer" of this method as an hint to indicate to JOGL that you prefer using an hardware accelerated (GPU) profile.
GLContext.isHardwareRasterizer tells you whether you benefit of hardware acceleration. GL.glGetString(GL.GL_RENDERER) and GL.glGetString(GL.GL_VENDOR) can help you to get some information about the renderer and the vendor of the OpenGL driver.
You can't pick a particular GPU. There is no support of NVidia GPU affinity yet. "multiple GPUs" is vague, it can designate Optimus, SLI or Crossfire.
Rather ask your JOGL specific question on our official forum. Only a few contributors and maintainers come here.
Upvotes: 1