STARK: Cleanup comments

This commit is contained in:
Paweł Kołodziejski 2021-10-20 07:27:49 +02:00
parent f407852260
commit 4bf044d361
No known key found for this signature in database
GPG Key ID: 0BDADC9E74440FF7
2 changed files with 4 additions and 6 deletions

View File

@ -59,12 +59,12 @@ void OpenGLPropRenderer::render(const Math::Vector3d &position, float direction,
Math::Matrix4 projection = StarkScene->getProjectionMatrix();
Math::Matrix4 modelViewMatrix = view * model;
modelViewMatrix.transpose(); // OpenGL expects matrices transposed when compared to ScummVM's
modelViewMatrix.transpose(); // OpenGL expects matrices transposed
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(modelViewMatrix.getData());
Math::Matrix4 projectionMatrix = projection;
projectionMatrix.transpose(); // OpenGL expects matrices transposed when compared to ScummVM's
projectionMatrix.transpose(); // OpenGL expects matrices transposed
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(projectionMatrix.getData());

View File

@ -65,15 +65,13 @@ void OpenGLSPropRenderer::render(const Math::Vector3d &position, float direction
Math::Matrix4 projection = StarkScene->getProjectionMatrix();
Math::Matrix4 modelViewMatrix = view * model;
modelViewMatrix.transpose(); // OpenGL expects matrices transposed when compared to ScummVM's
modelViewMatrix.transpose(); // OpenGL expects matrices transposed
Math::Matrix4 projectionMatrix = projection;
projectionMatrix.transpose(); // OpenGL expects matrices transposed when compared to ScummVM's
projectionMatrix.transpose(); // OpenGL expects matrices transposed
Math::Matrix4 normalMatrix = modelViewMatrix;
normalMatrix.invertAffineOrthonormal();
//normalMatrix.transpose(); // OpenGL expects matrices transposed when compared to ScummVM's
//normalMatrix.transpose(); // No need to transpose twice in a row
_shader->enableVertexAttribute("position", _faceVBO, 3, GL_FLOAT, GL_FALSE, 9 * sizeof(float), 0);
_shader->enableVertexAttribute("normal", _faceVBO, 3, GL_FLOAT, GL_FALSE, 9 * sizeof(float), 12);