fix xoverlay

This commit is contained in:
Jenny White 2018-04-30 19:40:16 +03:00
parent 89edbf8abf
commit fbd16fb08e
2 changed files with 9 additions and 8 deletions

View File

@ -49,7 +49,9 @@ DEFINE_HOOKED_METHOD(SDL_GL_SwapWindow, void, SDL_Window *window)
} }
{ {
PROF_SECTION(SWAPWINDOW_tf2); PROF_SECTION(SWAPWINDOW_tf2);
//SDL_GL_MakeCurrent(window, tf2_sdl); #if EXTERNAL_DRAWING
SDL_GL_MakeCurrent(window, tf2_sdl);
#endif
original::SDL_GL_SwapWindow(window); original::SDL_GL_SwapWindow(window);
// glXMakeContextCurrent(wminfo.info.x11.display, // glXMakeContextCurrent(wminfo.info.x11.display,
// wminfo.info.x11.window, // wminfo.info.x11.window,

View File

@ -77,8 +77,8 @@ void initialize()
logging::Info("Xoverlay initialized"); logging::Info("Xoverlay initialized");
} }
xoverlay_show(); xoverlay_show();
context = SDL_GL_CreateContext(sdl_hooks::window);
#else #else
//context = SDL_GL_CreateContext(sdl_hooks::window);
glClearColor(1.0, 0.0, 0.0, 0.5); glClearColor(1.0, 0.0, 0.0, 0.5);
glewExperimental = GL_TRUE; glewExperimental = GL_TRUE;
glewInit(); glewInit();
@ -159,7 +159,6 @@ void draw_begin()
PROF_SECTION(DRAWEX_draw_begin); PROF_SECTION(DRAWEX_draw_begin);
#if EXTERNAL_DRAWING #if EXTERNAL_DRAWING
xoverlay_draw_begin(); xoverlay_draw_begin();
#else
{ {
PROF_SECTION(draw_begin__SDL_GL_MakeCurrent); PROF_SECTION(draw_begin__SDL_GL_MakeCurrent);
// SDL_GL_MakeCurrent(sdl_hooks::window, context); // SDL_GL_MakeCurrent(sdl_hooks::window, context);
@ -179,12 +178,12 @@ void draw_end()
PROF_SECTION(draw_end__glez_end); PROF_SECTION(draw_end__glez_end);
glez_end(); glez_end();
} }
{
PROF_SECTION(draw_end__SDL_GL_MakeCurrent);
//SDL_GL_MakeCurrent(sdl_hooks::window, nullptr);
}
#if EXTERNAL_DRAWING #if EXTERNAL_DRAWING
xoverlay_draw_end(); xoverlay_draw_end();
{
PROF_SECTION(draw_end__SDL_GL_MakeCurrent);
SDL_GL_MakeCurrent(sdl_hooks::window, nullptr);
}
#endif #endif
} }
} }