BACKENDS: OPENGL: Store projection matrix as a Matrix4
This avoids extraneous copies when dealing with Shader class.
This commit is contained in:
parent
2d910e353b
commit
29c25ed566
9 changed files with 48 additions and 48 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue