mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
[current-matrix] Adds texture matrix stacks + removes GL matrix API usage
This relates back to an earlier commitment to stop using the OpenGL matrix
API which is considered deprecated. (ref 54159f5a1d
)
The new texture matrix stacks are hung from a list of (internal only)
CoglTextureUnit structures which the CoglMaterial code internally references
via _cogl_get_texure_unit ().
So we would be left with only the cogl-matrix-stack code being responsible
for glMatrixMode, glLoadMatrix and glLoadIdentity this commit updates the
journal code so it now uses the matrix-stack API instead of GL directly.
This commit is contained in:
@ -335,15 +335,28 @@ _cogl_matrix_stack_set (CoglMatrixStack *stack,
|
||||
|
||||
void
|
||||
_cogl_matrix_stack_flush_to_gl (CoglMatrixStack *stack,
|
||||
GLenum gl_mode)
|
||||
CoglMatrixMode mode)
|
||||
{
|
||||
CoglMatrixState *state;
|
||||
GLenum gl_mode;
|
||||
|
||||
state = _cogl_matrix_stack_top (stack);
|
||||
|
||||
if (stack->flushed_state == state)
|
||||
return;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case COGL_MATRIX_MODELVIEW:
|
||||
gl_mode = GL_MODELVIEW;
|
||||
break;
|
||||
case COGL_MATRIX_PROJECTION:
|
||||
gl_mode = GL_PROJECTION;
|
||||
break;
|
||||
case COGL_MATRIX_TEXTURE:
|
||||
gl_mode = GL_TEXTURE;
|
||||
break;
|
||||
}
|
||||
GE (glMatrixMode (gl_mode));
|
||||
|
||||
/* In theory it might help the GL implementation if we used our
|
||||
|
Reference in New Issue
Block a user