BACKENDS: OPENGL: Store projection matrix as a Matrix4

This avoids extraneous copies when dealing with Shader class.
This commit is contained in:
Le Philousophe 2022-10-31 10:06:09 +01:00
parent 2d910e353b
commit 29c25ed566
9 changed files with 48 additions and 48 deletions

View file

@ -54,13 +54,13 @@ void FixedPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordin
GL_CALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4));
}
void FixedPipeline::setProjectionMatrix(const GLfloat *projectionMatrix) {
void FixedPipeline::setProjectionMatrix(const Math::Matrix4 &projectionMatrix) {
if (!isActive()) {
return;
}
GL_CALL(glMatrixMode(GL_PROJECTION));
GL_CALL(glLoadMatrixf(projectionMatrix));
GL_CALL(glLoadMatrixf(projectionMatrix.getData()));
GL_CALL(glMatrixMode(GL_MODELVIEW));
GL_CALL(glLoadIdentity());