Add stub with just GL_PROJECTION_MATRIX supported

This commit is contained in:
Luke Benstead 2019-02-28 08:46:13 +00:00
parent 3345e17e3c
commit 02937ccd2c
3 changed files with 18 additions and 0 deletions

View File

@ -33,6 +33,10 @@ static const matrix_t IDENTITY = {
void APIENTRY glDepthRange(GLclampf n, GLclampf f);
matrix_t* _glGetProjectionMatrix() {
return (matrix_t*) stack_top(&MATRIX_STACKS[1]);
}
void initMatrices() {
init_stack(&MATRIX_STACKS[0], sizeof(matrix_t), 32);
init_stack(&MATRIX_STACKS[1], sizeof(matrix_t), 32);

View File

@ -108,6 +108,8 @@ void _matrixLoadModelView();
void _matrixLoadTexture();
void _applyRenderMatrix();
matrix_t* _glGetProjectionMatrix();
void wipeTextureOnFramebuffers(GLuint texture);
GLubyte checkImmediateModeInactive(const char* func);

View File

@ -563,6 +563,18 @@ void APIENTRY glGetBooleanv(GLenum pname, GLboolean* params) {
}
}
void APIENTRY glGetFloatv(GLenum pname, GLfloat* params) {
switch(pname) {
case GL_PROJECTION_MATRIX:
memcpy(params, _glGetProjectionMatrix(), sizeof(float) * 16);
break;
default:
_glKosThrowError(GL_INVALID_ENUM, "glGetIntegerv");
_glKosPrintError();
break;
}
}
void APIENTRY glGetIntegerv(GLenum pname, GLint *params) {
switch(pname) {
case GL_MAX_LIGHTS: