MiniB3D + MaxGUI FBO's

BlitzMax Forums/MiniB3D Module/MiniB3D + MaxGUI FBO's

BLaBZ(Posted 2013) [#1]
Has anyone been able to get shaders to compile and use FBO's with MaxGUI?

Without MaxGUI everything works but with it is a different story, though I'm not doing anything differently.

Thanks!


Kryzon(Posted 2013) [#2]
Depending on how you're going about this, you may be creating your assets in one OpenGL context and expecting them to be available in another context (the one from the MaxGUI canvas). Each MaxGUI canvas has its own OpenGL context.

Try this at the start of your program, before creating any graphics contexts:
- Set the driver to GLMax2D or GLGraphics.
- Call GLShareContexts().
- Create your graphics and canvasses like normal.

Each time you use SetGraphics CanvasGraphics( canvas ) for rendering a certain canvas you are changing the current GL context. If you are trying to use a shader asset, FBO, state etc. that wasn't declared in that context, it will fail.