Integration with existing GL context
Posted: 13 Oct 2020, 17:24
So we have a java game that's using the lwjgl library to provide opengl support. Never been happy with our proprietry ui support and looking into options.
I'm looking into if noesis will work for us, however the samples don't seem to answer my question. I looked at Integration, Integration GLUT etc, but can't see any evidence of a way to use another pre-existing opengl context for noesis. To be clear, since lwjgl is an external library, I'm assuming we'd need to ship in a pointer to the existing gl context to get it to render the ui onto the game's framebuffer? It's not really practical for us to get noesis to create the gl context and pass it into lwjgl without making big changes to it.
I'll admit I'm really more familiar with how DX works, so am I misunderstanding something about how opengl operates and this will all just magically work without the need to do this? as it seems the RenderDevice class creates a new device / context internally and has no options to do otherwise.
Ideally we'd do:
lwjgl native: creates opengl context, passes handle to java.
java: passes handle to dll that will interact with noesis
noesis integration dll: initializes noesis with the passed handle.
I'm looking into if noesis will work for us, however the samples don't seem to answer my question. I looked at Integration, Integration GLUT etc, but can't see any evidence of a way to use another pre-existing opengl context for noesis. To be clear, since lwjgl is an external library, I'm assuming we'd need to ship in a pointer to the existing gl context to get it to render the ui onto the game's framebuffer? It's not really practical for us to get noesis to create the gl context and pass it into lwjgl without making big changes to it.
I'll admit I'm really more familiar with how DX works, so am I misunderstanding something about how opengl operates and this will all just magically work without the need to do this? as it seems the RenderDevice class creates a new device / context internally and has no options to do otherwise.
Ideally we'd do:
lwjgl native: creates opengl context, passes handle to java.
java: passes handle to dll that will interact with noesis
noesis integration dll: initializes noesis with the passed handle.