GL coordinates since 2.0.4 - what changed? |
A_SN
|
After more research it seems like 2.0.4 must have changed to the default GL matrix mode. I now get the same results on all versions of the DLL if I call glLoadIdentity() to reset it. If I do then with both versions I can call this instead:
|
|||||||||||||
|
capehill
|
I don't know the exact reason but there may be some issues with the code.
Do you intend to use OpenGL directly or Renderer? You seem to be mixing them. If you create an OpenGL-based renderer, it might be that you get matrices set by it. If you continue with OpenGL, you should probably do OpenGL initializations yourself so that you are not relying on defaults or undocumented features. Also, remember to destroy OpenGL context at the end if you created it. |
|||||||||||
|
GL coordinates since 2.0.4 - what changed? |
Ryan C. Gordon
Guest
|
You probably shouldn't use the SDL render API at all; that adds a simple renderer on top of OpenGL, but since you're doing your own GL rendering anyhow, it's just going to trample some GL state without your permission. Just delete the call to SDL_CreateRenderer() and keep using everything else in here (including the SDL_WINDOW_OPENGL flag and the SDL_GL_CreateContext() and SDL_GL_SwapWindow() calls) as it is. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
GL coordinates since 2.0.4 - what changed? |
Ryan C. Gordon
Guest
|
You probably shouldn't use the SDL render API at all; that adds a simple renderer on top of OpenGL, but since you're doing your own GL rendering anyhow, it's just going to trample some GL state without your permission. Just delete the call to SDL_CreateRenderer() and keep using everything else in here (including the SDL_WINDOW_OPENGL flag and the SDL_GL_CreateContext() and SDL_GL_SwapWindow() calls) as it is. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|