Adds cogl_framebuffer_identity_matrix

This adds a cogl_framebuffer_identity_matrix() method that can be used
to reset the current modelview matrix to the identity matrix.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-11-20 18:42:58 +00:00
parent a81458f5b9
commit 5ca78668af
2 changed files with 22 additions and 0 deletions

View File

@ -1797,6 +1797,14 @@ cogl_framebuffer_pop_matrix (CoglFramebuffer *framebuffer)
_cogl_matrix_stack_pop (modelview_stack);
}
void
cogl_framebuffer_identity_matrix (CoglFramebuffer *framebuffer)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (framebuffer);
_cogl_matrix_stack_load_identity (modelview_stack);
}
void
cogl_framebuffer_scale (CoglFramebuffer *framebuffer,
float x,

View File

@ -152,6 +152,20 @@ cogl_framebuffer_push_matrix (CoglFramebuffer *framebuffer);
void
cogl_framebuffer_pop_matrix (CoglFramebuffer *framebuffer);
#define cogl_framebuffer_identity_matrix \
cogl_framebuffer_identity_matrix_EXP
/**
* cogl_framebuffer_identity_matrix:
* @framebuffer: A #CoglFramebuffer pointer
*
* Resets the current model-view matrix to the identity matrix.
*
* Since: 1.10
* Stability: unstable
*/
void
cogl_framebuffer_identity_matrix (CoglFramebuffer *framebuffer);
#define cogl_framebuffer_scale cogl_framebuffer_scale_EXP
/**
* cogl_framebuffer_scale: