[Scummvm-git-logs] scummvm master -> 8382d0d9e9163f9aee2f72e2ce891dd46c33df05
aquadran
aquadran at gmail.com
Fri Nov 6 05:25:46 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8382d0d9e9 WINTERMUTE: Reset VBO once during init in fixed-function renderer
Commit: 8382d0d9e9163f9aee2f72e2ce891dd46c33df05
https://github.com/scummvm/scummvm/commit/8382d0d9e9163f9aee2f72e2ce891dd46c33df05
Author: Gunnar Birke (gunnar.birke at online.de)
Date: 2020-11-06T06:25:42+01:00
Commit Message:
WINTERMUTE: Reset VBO once during init in fixed-function renderer
Changed paths:
engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
index ca25aa0b04..1f737aade1 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -247,10 +247,6 @@ void BaseRenderOpenGL3D::setWindowed(bool windowed) {
}
void BaseRenderOpenGL3D::fadeToColor(byte r, byte g, byte b, byte a) {
-#if defined(USE_OPENGL_SHADERS)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
-
setProjection2D();
const int vertexSize = 16;
@@ -435,6 +431,12 @@ bool BaseRenderOpenGL3D::initRenderer(int width, int height, bool windowed) {
_simpleShadow[3].u = 1.0f;
_simpleShadow[3].v = 0.0f;
+ // The ShaderSurfaceRenderer sets an array buffer which appearently conflicts with us
+ // Reset it!
+#if defined(USE_OPENGL_SHADERS)
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+
return true;
}
@@ -617,12 +619,6 @@ bool BaseRenderOpenGL3D::drawSpriteEx(BaseSurfaceOpenGL3D &tex, const Wintermute
bool mirrorX, bool mirrorY) {
// original wme has a batch mode for sprites, we ignore this for the moment
- // The ShaderSurfaceRenderer sets an array buffer which appearently conflicts with us
- // Reset it!
-#if defined(USE_OPENGL_SHADERS)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
-
if (_forceAlphaColor != 0) {
color = _forceAlphaColor;
}
diff --git a/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp b/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
index 88f908f4f5..d2e356d060 100644
--- a/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
@@ -58,10 +58,6 @@ bool MeshXOpenGL::render(ModelX *model) {
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, _materials[materialIndex]->_emissive.data);
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, _materials[materialIndex]->_shininess);
-#if defined(USE_OPENGL_SHADERS)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_OPENGL_SHADERS)
-
if (_materials[materialIndex]->getSurface()) {
glEnable(GL_TEXTURE_2D);
static_cast<BaseSurfaceOpenGL3D *>(_materials[materialIndex]->getSurface())->setTexture();
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
index 163ac89620..fecf87d376 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
@@ -48,9 +48,6 @@ ShadowVolumeOpenGL::~ShadowVolumeOpenGL() {
//////////////////////////////////////////////////////////////////////////
bool ShadowVolumeOpenGL::render() {
glBindTexture(GL_TEXTURE_2D, 0);
-#if defined(USE_OPENGL_SHADERS)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_OPENGL_SHADERS)
glEnableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
@@ -126,9 +123,6 @@ bool ShadowVolumeOpenGL::renderToScene() {
_gameRef->_renderer3D->setProjection2D();
glBindTexture(GL_TEXTURE_2D, 0);
-#if defined(USE_OPENGL_SHADERS)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_OPENGL_SHADERS)
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
More information about the Scummvm-git-logs
mailing list