Mercurial > repos > blastem
diff render_sdl.c @ 1633:9b7cba9ba541
Use SDL_GL_MakeCurrent to make the SDL renderer API windows play nice with GL windows
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 09 Nov 2018 09:26:07 -0800 |
parents | c4ba3177b72d |
children | 022d01b64496 |
line wrap: on
line diff
--- a/render_sdl.c Mon Nov 05 00:30:44 2018 -0800 +++ b/render_sdl.c Fri Nov 09 09:26:07 2018 -0800 @@ -1442,6 +1442,7 @@ 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]);