diff options
author | Michael Pavone <pavone@retrodev.com> | 2018-11-09 09:26:07 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2018-11-09 09:26:07 -0800 |
commit | 9b4c5db24f424bb708c92801141694c9fc8f8db1 (patch) | |
tree | 8d8b254bab545ce7696c3c0bbfc82b3e8ceb446e /render_sdl.c | |
parent | b1eb3e1670db1ba1125d5b55bae818f9e29ab5dd (diff) |
Use SDL_GL_MakeCurrent to make the SDL renderer API windows play nice with GL windows
Diffstat (limited to 'render_sdl.c')
-rwxr-xr-x | render_sdl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/render_sdl.c b/render_sdl.c index 05a0948..422148f 100755 --- a/render_sdl.c +++ b/render_sdl.c @@ -1442,6 +1442,7 @@ void render_framebuffer_updated(uint8_t which, int width) width -= overscan_left[video_standard] + overscan_right[video_standard]; #ifndef DISABLE_OPENGL if (render_gl && which <= FRAMEBUFFER_EVEN) { + SDL_GL_MakeCurrent(main_window, main_context); glBindTexture(GL_TEXTURE_2D, textures[which]); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, LINEBUF_SIZE, height, GL_BGRA, GL_UNSIGNED_BYTE, texture_buf + overscan_left[video_standard] + LINEBUF_SIZE * overscan_top[video_standard]); |