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

@ -24,6 +24,8 @@
#include "graphics/opengl/system_headers.h"
#include "math/matrix4.h"
namespace OpenGL {
/**
@ -82,14 +84,14 @@ public:
/**
* Obtain projection matrix of the framebuffer.
*/
const GLfloat *getProjectionMatrix() const { return _projectionMatrix; }
const Math::Matrix4 &getProjectionMatrix() const { return _projectionMatrix; }
protected:
bool isActive() const { return _isActive; }
GLint _viewport[4];
void applyViewport();
GLfloat _projectionMatrix[4*4];
Math::Matrix4 _projectionMatrix;
void applyProjectionMatrix();
/**