I'm not too familiar with GLSL 3.3, but I'm sure that PerspectiveViewMatrix (is this even a builin function?) Builds a matrix that replaces the old built-in gl_ProjectionMatrix
gl_ModelViewMatrix "" , TranslationMatrix, RotationMatrix TransformationMatrix.
, . . (, GLM). :
std::array<GLfloat, 16> projection;
glMatrixMode(GL_PROJECTION);
glPushMatrix();
gluOrtho(...);
glGetFloatv(GL_PROJECTION_MATRIX, projection.data());
glPopMatrix();
glUniformMatrix4fv(glGetUniformLocation(ShaderProgramID, "ProjectionMatrix"), 1, GL_FALSE, projection.data());
uniform mat4 ProjectionMatrix;
in vec4 InVertex;
void main() {
gl_Position = ProjectionMatrix * InVertex;
}