Add GL_MODELVIEW_MATRIX as an option to glGetFloatv
This commit is contained in:
parent
b00b65af54
commit
91c3b66d73
|
@ -37,6 +37,10 @@ matrix_t* _glGetProjectionMatrix() {
|
|||
return (matrix_t*) stack_top(&MATRIX_STACKS[1]);
|
||||
}
|
||||
|
||||
matrix_t* _glGetModelViewMatrix() {
|
||||
return (matrix_t*) stack_top(&MATRIX_STACKS[0]);
|
||||
}
|
||||
|
||||
void _glInitMatrices() {
|
||||
init_stack(&MATRIX_STACKS[0], sizeof(matrix_t), 32);
|
||||
init_stack(&MATRIX_STACKS[1], sizeof(matrix_t), 32);
|
||||
|
|
|
@ -114,6 +114,7 @@ void _glMatrixLoadTexture();
|
|||
void _glApplyRenderMatrix();
|
||||
|
||||
matrix_t* _glGetProjectionMatrix();
|
||||
matrix_t* _glGetModelViewMatrix();
|
||||
|
||||
void _glWipeTextureOnFramebuffers(GLuint texture);
|
||||
GLubyte _glCheckImmediateModeInactive(const char* func);
|
||||
|
|
|
@ -580,6 +580,9 @@ void APIENTRY glGetFloatv(GLenum pname, GLfloat* params) {
|
|||
case GL_PROJECTION_MATRIX:
|
||||
memcpy(params, _glGetProjectionMatrix(), sizeof(float) * 16);
|
||||
break;
|
||||
case GL_MODELVIEW_MATRIX:
|
||||
memcpy(params, _glGetModelViewMatrix(), sizeof(float) * 16);
|
||||
break;
|
||||
default:
|
||||
_glKosThrowError(GL_INVALID_ENUM, "glGetIntegerv");
|
||||
_glKosPrintError();
|
||||
|
|
Loading…
Reference in New Issue
Block a user