diff options
Diffstat (limited to 'src/video/opengl.cpp')
-rw-r--r-- | src/video/opengl.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video/opengl.cpp b/src/video/opengl.cpp index 87ce8b7f3..4a22744cc 100644 --- a/src/video/opengl.cpp +++ b/src/video/opengl.cpp @@ -621,14 +621,19 @@ const char *OpenGLBackend::Init() /* Create resources for sprite rendering. */ if (!OpenGLSprite::Create()) return "Failed to create sprite rendering resources"; + this->PrepareContext(); + (void)glGetError(); // Clear errors. + + return nullptr; +} + +void OpenGLBackend::PrepareContext() +{ glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glDisable(GL_DEPTH_TEST); /* Enable alpha blending using the src alpha factor. */ glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - (void)glGetError(); // Clear errors. - - return nullptr; } /** |