[Scummvm-git-logs] scummvm master -> fd626132564e703f4a0310f1205ac0b23e6fb302

neuromancer noreply at scummvm.org
Tue Jul 11 21:14:06 UTC 2023


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:
fd62613256 FREESCAPE: avoid using GL_COLOR_LOGIC_OP


Commit: fd626132564e703f4a0310f1205ac0b23e6fb302
    https://github.com/scummvm/scummvm/commit/fd626132564e703f4a0310f1205ac0b23e6fb302
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-07-11T23:15:49+02:00

Commit Message:
FREESCAPE: avoid using GL_COLOR_LOGIC_OP

Changed paths:
    engines/freescape/gfx_opengl.cpp
    engines/freescape/gfx_opengl_shaders.cpp


diff --git a/engines/freescape/gfx_opengl.cpp b/engines/freescape/gfx_opengl.cpp
index ee2d8ac2345..ce610007652 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -202,9 +202,9 @@ void OpenGLRenderer::renderPlayerShoot(byte color, const Common::Point position,
 	if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderZX) {
 		r = g = b = 255;
 	} else {
-		r = g = b = 0;
-		glEnable(GL_COLOR_LOGIC_OP);
-		glLogicOp(GL_INVERT);
+		r = g = b = 255;
+		glEnable(GL_BLEND);
+		glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);
 	}
 
 	glDisable(GL_DEPTH_TEST);
@@ -230,7 +230,7 @@ void OpenGLRenderer::renderPlayerShoot(byte color, const Common::Point position,
 	glDisableClientState(GL_VERTEX_ARRAY);
 	glLineWidth(1);
 
-	glDisable(GL_COLOR_LOGIC_OP);
+	glDisable(GL_BLEND);
 	glEnable(GL_DEPTH_TEST);
 	glDepthMask(GL_TRUE);
 }
diff --git a/engines/freescape/gfx_opengl_shaders.cpp b/engines/freescape/gfx_opengl_shaders.cpp
index b8fcd92e994..e030326958b 100644
--- a/engines/freescape/gfx_opengl_shaders.cpp
+++ b/engines/freescape/gfx_opengl_shaders.cpp
@@ -198,9 +198,9 @@ void OpenGLShaderRenderer::renderPlayerShoot(byte color, const Common::Point pos
 	if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderZX) {
 		r = g = b = 255;
 	} else {
-		r = g = b = 0;
-		glEnable(GL_COLOR_LOGIC_OP);
-		glLogicOp(GL_INVERT);
+		r = g = b = 255;
+		glEnable(GL_BLEND);
+		glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);
 	}
 
 	glDisable(GL_DEPTH_TEST);
@@ -229,7 +229,7 @@ void OpenGLShaderRenderer::renderPlayerShoot(byte color, const Common::Point pos
 
 	glLineWidth(1);
 
-	glDisable(GL_COLOR_LOGIC_OP);
+	glDisable(GL_BLEND);
 	glEnable(GL_DEPTH_TEST);
 	glDepthMask(GL_TRUE);
 }




More information about the Scummvm-git-logs mailing list