[Scummvm-git-logs] scummvm master -> 87e40ebcec31ff15ff626b50d903ceb9fa088331

neuromancer noreply at scummvm.org
Mon Nov 27 19:50:52 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:
87e40ebcec FREESCAPE: renderer fixes related with glLine


Commit: 87e40ebcec31ff15ff626b50d903ceb9fa088331
    https://github.com/scummvm/scummvm/commit/87e40ebcec31ff15ff626b50d903ceb9fa088331
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-11-27T20:50:33+01:00

Commit Message:
FREESCAPE: renderer fixes related with glLine

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 5de09272bf8..c985e2b5aa1 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -209,7 +209,7 @@ void OpenGLRenderer::renderCrossair(const Common::Point crossairPosition) {
 
 	useColor(255, 255, 255);
 
-	glLineWidth(8); // It will not work in every OpenGL implementation since the
+	glLineWidth(MAX(2, g_system->getWidth() / 192)); // It will not work in every OpenGL implementation since the
 					 // spec doesn't require support for line widths other than 1
 	glEnableClientState(GL_VERTEX_ARRAY);
 	copyToVertexArray(0, Math::Vector3d(crossairPosition.x - 3, crossairPosition.y, 0));
diff --git a/engines/freescape/gfx_opengl_shaders.cpp b/engines/freescape/gfx_opengl_shaders.cpp
index c10c78ccffc..468d3ec4bbd 100644
--- a/engines/freescape/gfx_opengl_shaders.cpp
+++ b/engines/freescape/gfx_opengl_shaders.cpp
@@ -176,7 +176,6 @@ void OpenGLShaderRenderer::renderSensorShoot(byte color, const Math::Vector3d se
 	glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), nullptr);
 
 	glDrawArrays(GL_LINES, 0, 2);
-	glDisableClientState(GL_VERTEX_ARRAY);
 	glLineWidth(1);
 
 	glDisable(GL_BLEND);
@@ -261,7 +260,7 @@ void OpenGLShaderRenderer::renderCrossair(const Common::Point crossairPosition)
 
 	useColor(255, 255, 255);
 
-	glLineWidth(8); // It will not work in every OpenGL implementation since the
+	glLineWidth(MAX(2, g_system->getWidth() / 192)); // It will not work in every OpenGL implementation since the
 					 // spec doesn't require support for line widths other than 1
 
 	copyToVertexArray(0, Math::Vector3d(remap(crossairPosition.x - 3, _screenW), remap(_screenH - crossairPosition.y, _screenH), 0));




More information about the Scummvm-git-logs mailing list