[Scummvm-git-logs] scummvm master -> 1d52c6db34ee762dfda9f9753a266d9bd28a854a

aquadran noreply at scummvm.org
Mon Jun 9 12:49:22 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
1d52c6db34 WINTERMUTE: Convert glBegin/glEnd to glVertexPointer/glTextCoorPointer


Commit: 1d52c6db34ee762dfda9f9753a266d9bd28a854a
    https://github.com/scummvm/scummvm/commit/1d52c6db34ee762dfda9f9753a266d9bd28a854a
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-06-09T14:49:17+02:00

Commit Message:
WINTERMUTE: Convert glBegin/glEnd to glVertexPointer/glTextCoorPointer

Changed paths:
    engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp


diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
index 6fb9986a9d5..f8e208de482 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -1072,12 +1072,13 @@ void BaseRenderOpenGL3D::postfilter() {
 		glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_CONSTANT);
 		glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB, GL_SRC_COLOR);
 
-		glBegin(GL_QUADS);
-		glTexCoord2f(0.0f, 0.0f); glVertex2f(-1.0f, -1.0f);
-		glTexCoord2f(1.0f, 0.0f); glVertex2f( 1.0f, -1.0f);
-		glTexCoord2f(1.0f, 1.0f); glVertex2f( 1.0f,  1.0f);
-		glTexCoord2f(0.0f, 1.0f); glVertex2f(-1.0f,  1.0f);
-		glEnd();
+		glEnableClientState(GL_VERTEX_ARRAY);
+		glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+		glVertexPointer(2, GL_FLOAT, 0, vertices);
+		glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
+		glDrawArrays(GL_QUADS, 0, 4);
+		glDisableClientState(GL_VERTEX_ARRAY);
+		glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 
 		if (_postFilterMode == kPostFilterSepia) {
 			glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, _width, _height, 0);




More information about the Scummvm-git-logs mailing list