[Scummvm-git-logs] scummvm master -> 4ac851cd0f4934330019461f9def2b5d2aa07a00
aquadran
aquadran at gmail.com
Tue Oct 19 20:38:48 UTC 2021
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:
4ac851cd0f STARK: Small cleanup in OpenGL code
Commit: 4ac851cd0f4934330019461f9def2b5d2aa07a00
https://github.com/scummvm/scummvm/commit/4ac851cd0f4934330019461f9def2b5d2aa07a00
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-10-19T22:38:43+02:00
Commit Message:
STARK: Small cleanup in OpenGL code
Changed paths:
engines/stark/gfx/openglactor.cpp
engines/stark/gfx/openglprop.cpp
diff --git a/engines/stark/gfx/openglactor.cpp b/engines/stark/gfx/openglactor.cpp
index 9002aab9f6..ed78f111f6 100644
--- a/engines/stark/gfx/openglactor.cpp
+++ b/engines/stark/gfx/openglactor.cpp
@@ -258,7 +258,8 @@ void OpenGLActorRenderer::render(const Math::Vector3d &position, float direction
glEnableClientState(GL_VERTEX_ARRAY);
if (_gfx->computeLightsEnabled())
glEnableClientState(GL_COLOR_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ if (tex)
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glVertexPointer(3, GL_FLOAT, sizeof(ActorVertex), &_faceVBO[0].x);
@@ -273,8 +274,8 @@ void OpenGLActorRenderer::render(const Math::Vector3d &position, float direction
glDisableClientState(GL_VERTEX_ARRAY);
if (_gfx->computeLightsEnabled())
glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glDisableClientState(GL_NORMAL_ARRAY);
}
if (!_gfx->computeLightsEnabled())
diff --git a/engines/stark/gfx/openglprop.cpp b/engines/stark/gfx/openglprop.cpp
index fd579a358f..45f5d31f97 100644
--- a/engines/stark/gfx/openglprop.cpp
+++ b/engines/stark/gfx/openglprop.cpp
@@ -186,7 +186,8 @@ void OpenGLPropRenderer::render(const Math::Vector3d &position, float direction,
glEnableClientState(GL_VERTEX_ARRAY);
if (_gfx->computeLightsEnabled())
glEnableClientState(GL_COLOR_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ if (tex)
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glVertexPointer(3, GL_FLOAT, sizeof(PropVertex), &_faceVBO[0].x);
@@ -201,8 +202,8 @@ void OpenGLPropRenderer::render(const Math::Vector3d &position, float direction,
glDisableClientState(GL_VERTEX_ARRAY);
if (_gfx->computeLightsEnabled())
glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glDisableClientState(GL_NORMAL_ARRAY);
}
if (!_gfx->computeLightsEnabled())
More information about the Scummvm-git-logs
mailing list