7#include <glm/mat4x4.hpp>
8#include <glm/gtc/type_ptr.hpp>
29 enum class Mode { ModelView, Projection };
49 void Scale(
float x,
float y,
float z);
50 void Rotate(
float angle,
float x,
float y,
float z);
51 void Perspective(
float fovy,
float aspect,
float zNear,
float zFar);
52 void Ortho(
float left,
float right,
float bottom,
float top);
53 void Ortho(
float left,
float right,
float bottom,
float top,
float zNear,
float zFar);
61 int GetGLMatrixMode();
62 const char *GetGLMatrixModeStr();
63 int GetGLModelViewStackDepth();
64 int GetGLProjectionStackDepth();
65 int GetGLCurrentStackDepth();
66 const char *GetMatrixModeStr();
72 stack<glm::mat4> _modelviewStack;
73 stack<glm::mat4> _projectionStack;
74 stack<glm::mat4> *_currentStack;
76 float _projectionAspectRatio = 0;
79 const glm::mat4 &top()
const;
Replaces the OpenGL matrix stack.
void GetDoublev(Mode mode, double *m) const
glm::mat4 GetModelViewProjectionMatrix() const
void Perspective(float fovy, float aspect, float zNear, float zFar)
glm::vec2 ProjectToScreen(const glm::vec3 &v) const
void Ortho(float left, float right, float bottom, float top)
float GetProjectionAspectRatio() const
void Rotate(float angle, float x, float y, float z)
void MatrixModeModelView()
glm::mat4 GetModelViewMatrix() const
void LoadMatrixd(const double *m)
void MatrixModeProjection()
void Ortho(float left, float right, float bottom, float top, float zNear, float zFar)
void Translate(float x, float y, float z)
void SetCurrentMatrix(const glm::mat4 m)
glm::vec2 ProjectToScreen(float x, float y, float z) const
void Scale(float x, float y, float z)
glm::mat4 GetProjectionMatrix() const
glm::mat4 GetCurrentMatrix() const