GLContext: Remove global context pointer

This commit is contained in:
Stenzek
2018-10-03 23:03:26 +10:00
parent eb284b5d66
commit dcdd02d646
19 changed files with 183 additions and 150 deletions

View File

@ -96,11 +96,11 @@ GLuint CompileProgram(const std::string& vertexShader, const std::string& fragme
return programID;
}
void EnablePrimitiveRestart()
void EnablePrimitiveRestart(const GLContext* context)
{
constexpr GLuint PRIMITIVE_RESTART_INDEX = 65535;
if (g_main_gl_context->GetMode() == GLContext::Mode::OpenGLES)
if (context->IsGLES())
{
glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
}