Setting up SDL and OpenGL 2 for Max2D
BlitzMax Forums/Brucey's Modules/Setting up SDL and OpenGL 2 for Max2D
| ||
I'm wondering what is the correct setup if you have modules which uses BRL.Max2D and an app that invokes SetGraphicsDriver GL2Max2DDriver() I'm still not familiar on which to use, so far I just put Framework gl2sdlmax2d but most of the time it either crashes or there's a blank screen with just drawtext |
| ||
Here is a small test that works on my system:SuperStrict Framework sdl.gl2sdlmax2d Import brl.polledinput SetGraphicsDriver GL2Max2DDriver() Graphics 800, 600, 0 While Not AppTerminate() Cls() DrawText("This is a test.", 50, 50) Flip() Wend EndGraphics() End |
| ||
Thanks for some reason it works on simple example and I have to note that it seems to invoke the driver twice by looking at the output here..Building app.exe Executing app.exe GL2 (with shaders) Active GL2 (with shaders) Active Whereas on given SDL cross-platform examples this was only called once.. I assume the 2d, image and draw commands are the same regardless of DirectX, OGL, or SDL opengl driver? I'm not doing anything special. |