Previously in my game engine written in java, I have used lwjgl 2.9.3. I ran into an issue. I wanted lwjgl to run on another graphics card. So I researched and soon figured out, that it would be impossible using lwjgl 2.9.3. So I read about seeing if lwjgl's developers were going to add the option of choosing which graphics card you get to run on. I figured out that lwjgl 3 did have support for this. So I switched over to lwjgl 3.
I got everything working and started to work on why I switched. I soon figured out that there is no documentation for changing which graphics card you use. So after hours of testing I figured out that you need to create a WGLARB context.
I know you can just use the method: wglCreateContextAttribsARB(long hdc, long sharedContext, Byte/IntBuffer attribList)
. But it is unclear how to use this method. I am not sure if you use the windows DC Pointer or something else. I know you do not have to put anything in for the 'long sharedContext
' so I put 'MemoruUtil.NULL
'. So here are my questions:
How do you create a WGLARB context, or more specificly what do you specifically pass in, like do you put in an empty Int/Byte Buffer or do you put data into the buffer before you pass it in as a parameter. I do not know.
From there how do you use:
WGLNVGPUAffinity.getInstance().wglCreateAffinityDCNV(gpuList);
GPU list is either a PointBuffer or ByteBuffer how do I get this data to pass in in the first place?
Sorry about the long post, but I am very frustrated about the lack of documentation, Thank you in advance!