Merge branch 'master' of gitlab.com:simulant/GLdc
This commit is contained in:
commit
4dadbcb20d
|
@ -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);
|
||||
|
|
|
@ -108,6 +108,8 @@ void _matrixLoadModelView();
|
|||
void _matrixLoadTexture();
|
||||
void _applyRenderMatrix();
|
||||
|
||||
matrix_t* _glGetProjectionMatrix();
|
||||
|
||||
void wipeTextureOnFramebuffers(GLuint texture);
|
||||
GLubyte checkImmediateModeInactive(const char* func);
|
||||
|
||||
|
|
12
GL/state.c
12
GL/state.c
|
@ -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:
|
||||
|
|
|
@ -60,8 +60,8 @@ void* named_array_alloc(NamedArray* array, unsigned int* new_id) {
|
|||
|
||||
void* named_array_reserve(NamedArray* array, unsigned int id) {
|
||||
if(!named_array_used(array, id)) {
|
||||
unsigned int j = id % 8;
|
||||
unsigned int i = (id - j) / 8;
|
||||
unsigned int j = (id % 8) - 1;
|
||||
unsigned int i = id / 8;
|
||||
|
||||
assert(!named_array_used(array, id));
|
||||
array->used_markers[i] |= (unsigned char) 1 << j;
|
||||
|
|
Loading…
Reference in New Issue
Block a user