[Scummvm-git-logs] scummvm master -> 08c847cc01cc489c3c5f9ee41fcabe0f331f134e
lephilousophe
noreply at scummvm.org
Sat Apr 9 19:50:53 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1cf0b7d1b3 OPENGL: Unbind array buffer after using it
08c847cc01 STARK: Remove now useless glBindBuffer
Commit: 1cf0b7d1b3b9dcaadc676957add0101973d32d5b
https://github.com/scummvm/scummvm/commit/1cf0b7d1b3b9dcaadc676957add0101973d32d5b
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-04-09T21:46:09+02:00
Commit Message:
OPENGL: Unbind array buffer after using it
This avoids to mangle state for engines
Changed paths:
graphics/opengl/shader.cpp
diff --git a/graphics/opengl/shader.cpp b/graphics/opengl/shader.cpp
index 8572040336b..22955c1e03d 100644
--- a/graphics/opengl/shader.cpp
+++ b/graphics/opengl/shader.cpp
@@ -256,6 +256,7 @@ void ShaderGL::use(bool forceReload) {
}
}
}
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
}
GLuint ShaderGL::createBuffer(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) {
@@ -263,6 +264,7 @@ GLuint ShaderGL::createBuffer(GLenum target, GLsizeiptr size, const GLvoid *data
glGenBuffers(1, &vbo);
glBindBuffer(target, vbo);
glBufferData(target, size, data, usage);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
return vbo;
}
Commit: 08c847cc01cc489c3c5f9ee41fcabe0f331f134e
https://github.com/scummvm/scummvm/commit/08c847cc01cc489c3c5f9ee41fcabe0f331f134e
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-04-09T21:47:01+02:00
Commit Message:
STARK: Remove now useless glBindBuffer
This function is not available in old OpenGL.
Changed paths:
engines/stark/gfx/opengl.cpp
diff --git a/engines/stark/gfx/opengl.cpp b/engines/stark/gfx/opengl.cpp
index 8c18752137c..25951f86113 100644
--- a/engines/stark/gfx/opengl.cpp
+++ b/engines/stark/gfx/opengl.cpp
@@ -50,11 +50,6 @@ OpenGLDriver::~OpenGLDriver() {
void OpenGLDriver::init() {
computeScreenViewport();
-#if defined(USE_OPENGL_SHADERS)
- // The ShaderSurfaceRenderer sets an array buffer which conflict with fixed pipeline rendering
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_OPENGL_SHADERS)
-
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
@@ -224,11 +219,6 @@ FadeRenderer *OpenGLDriver::createFadeRenderer() {
}
void OpenGLDriver::start2DMode() {
-#if defined(USE_OPENGL_SHADERS)
- // The ShaderSurfaceRenderer sets an array buffer which conflict with fixed pipeline rendering
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_OPENGL_SHADERS)
-
// Enable alpha blending
glEnable(GL_BLEND);
//glBlendEquation(GL_FUNC_ADD); // It's the default
@@ -253,11 +243,6 @@ void OpenGLDriver::end2DMode() {
}
void OpenGLDriver::set3DMode() {
-#if defined(USE_OPENGL_SHADERS)
- // The ShaderSurfaceRenderer sets an array buffer which conflict with fixed pipeline rendering
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_OPENGL_SHADERS)
-
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
More information about the Scummvm-git-logs
mailing list