[client/opengl] removed extra calls to make the context current

This commit is contained in:
Geoffrey McRae 2017-12-13 14:26:31 +11:00
parent b5cb796b7c
commit a6b253197f

View File

@ -294,12 +294,6 @@ bool lgr_opengl_on_mouse_shape(void * opaque, const LG_RendererCursor cursor, co
if (!this || !this->initialized) if (!this || !this->initialized)
return false; return false;
if (SDL_GL_MakeCurrent(this->params.window, this->glContext) != 0)
{
DEBUG_ERROR("Failed to make the GL context current");
return false;
}
this->mouseType = cursor; this->mouseType = cursor;
switch(cursor) switch(cursor)
{ {
@ -440,12 +434,6 @@ bool lgr_opengl_on_frame_event(void * opaque, const uint8_t * data, bool resampl
if (!this || !this->initialized) if (!this || !this->initialized)
return false; return false;
if (SDL_GL_MakeCurrent(this->params.window, this->glContext) != 0)
{
DEBUG_ERROR("Failed to make the GL context current");
return false;
}
if (++this->texIndex == VBO_BUFFERS) if (++this->texIndex == VBO_BUFFERS)
this->texIndex = 0; this->texIndex = 0;
@ -593,12 +581,6 @@ bool lgr_opengl_render(void * opaque)
if (!this || !this->initialized) if (!this || !this->initialized)
return false; return false;
if (SDL_GL_MakeCurrent(this->params.window, this->glContext) != 0)
{
DEBUG_ERROR("Failed to make the GL context current");
return false;
}
if (this->resizeWindow) if (this->resizeWindow)
{ {
// setup the projection matrix // setup the projection matrix