SDL/src
Sam Lantinga af50403e50 Fixed bug 2575 - Current GL context tracking fails
Ronie Salgado

The GL Renderer current context tracking fails when one window is used with an SDL renderer but another separate window is used with a user handled OpenGL context.

Attached is a small program that reproduces this bug, at least in some Linux machines where an OpenGL renderer is provided by default.

Expected Output:
-"First window" should be blue.
-"Second window" should be green.

Gotten Output:
- "First window" black.
- "Second window" blue.

What happened:
The renderer created for the "first window" ends rendering into the "second window" OpenGL context.

Bug location:

SDL_render_gl.c - line 286 on hg:
static SDL_GLContext SDL_CurrentContext = NULL;

When making SDL_GL_MakeCurrent from the user perspective, that variable or the GL renderer is not notified about the OpenGL context change.

Solution proposal:
- Move the current GL context cache into another place global.
2014-06-15 18:09:39 -07:00
..
atomic Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
audio Fixed bug 2580 - sndio backend improvements 2014-06-15 17:26:30 -07:00
core Changed C++ style comments to fix pedantic warnings. 2014-05-17 22:02:25 +02:00
cpuinfo Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
dynapi Added SDL_sqrtf(), SDL_tan(), SDL_tanf() 2014-06-07 18:20:01 -07:00
events Removed SDL_SYS_JoystickNeedsPolling(). 2014-06-14 23:31:23 -04:00
file The NaCL mount/unmount functions need to be in SDL_system.h and specific to NaCL 2014-06-08 12:05:17 -07:00
filesystem Fixes audio for Native Client, and other fixes... 2014-06-08 18:18:13 -03:00
haptic Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
joystick Add controller mapping for Bluetooth DualShock 4 controllers on Linux 2014-06-15 13:05:30 -07:00
libm Fixed building on command line Mac OS X 2014-06-07 20:43:12 -07:00
loadso Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
main Fixes audio for Native Client, and other fixes... 2014-06-08 18:18:13 -03:00
power Added annotations to help code analysis tools 2014-06-04 10:56:56 -07:00
render Fixed bug 2575 - Current GL context tracking fails 2014-06-15 18:09:39 -07:00
stdlib Added SDL_sqrtf(), SDL_tan(), SDL_tanf() 2014-06-07 18:20:01 -07:00
test Turns out visualstudio does not like PRIu64, soo lets just cast it to llu. 2014-06-05 15:37:33 -07:00
thread Chrome's Native Client backend implementation 2014-06-06 15:45:59 -03:00
timer Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
video Fixed 2584 - Memory leak in Cocoa_GetDisplayName 2014-06-15 17:18:05 -07:00
SDL_assert_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_assert.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_error_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_error.c Added annotations to help code analysis tools 2014-06-04 10:56:56 -07:00
SDL_hints.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_internal.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_log.c Chrome's Native Client backend implementation 2014-06-06 15:45:59 -03:00
SDL.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00