[Scummvm-git-logs] scummvm master -> 62dbb28aa383e99ca74509e8aa30f3b84b70f2a5
aquadran
aquadran at gmail.com
Mon Oct 18 20:49:05 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:
62dbb28aa3 STARK: Sync actor and props lights code
Commit: 62dbb28aa383e99ca74509e8aa30f3b84b70f2a5
https://github.com/scummvm/scummvm/commit/62dbb28aa383e99ca74509e8aa30f3b84b70f2a5
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-10-18T22:49:00+02:00
Commit Message:
STARK: Sync actor and props lights code
Changed paths:
engines/stark/gfx/openglprop.cpp
diff --git a/engines/stark/gfx/openglprop.cpp b/engines/stark/gfx/openglprop.cpp
index 5e6e1bd9e0..cef40912a7 100644
--- a/engines/stark/gfx/openglprop.cpp
+++ b/engines/stark/gfx/openglprop.cpp
@@ -60,9 +60,13 @@ void OpenGLPropRenderer::render(const Math::Vector3d &position, float direction,
Math::Matrix4 modelViewMatrix = view * model;
modelViewMatrix.transpose(); // OpenGL expects matrices transposed when compared to ScummVM's
+ glMatrixMode(GL_MODELVIEW);
+ glLoadMatrixf(modelViewMatrix.getData());
Math::Matrix4 projectionMatrix = projection;
projectionMatrix.transpose(); // OpenGL expects matrices transposed when compared to ScummVM's
+ glMatrixMode(GL_PROJECTION);
+ glLoadMatrixf(projectionMatrix.getData());
const Common::Array<Face> &faces = _model->getFaces();
const Common::Array<Material> &materials = _model->getMaterials();
@@ -74,9 +78,9 @@ void OpenGLPropRenderer::render(const Math::Vector3d &position, float direction,
// For each face draw its vertices from the VBO, indexed by the EBO
const Gfx::Texture *tex = _texture->getTexture(material.texture);
if (material.doubleSided)
- glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
else
- glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
+ glColorMaterial(GL_FRONT, GL_DIFFUSE);
if (tex) {
tex->bind();
glColor3f(1.0f, 1.0f, 1.0f);
@@ -104,7 +108,6 @@ void OpenGLPropRenderer::render(const Math::Vector3d &position, float direction,
}
glDisable(GL_COLOR_MATERIAL);
-
}
void OpenGLPropRenderer::clearVertices() {
More information about the Scummvm-git-logs
mailing list