1
0
Fork 0

[cogl] Make cogl_setup_viewport() a private function

The setup_viewport() function should only be used by Clutter and
not by application code.

It can be emulated by changing the Stage size and perspective and
requeueing a redraw after calling clutter_stage_ensure_viewport().
This commit is contained in:
Emmanuele Bassi 2009-05-28 13:03:19 +01:00
parent b9e1c82587
commit 5ed1b03a91
2 changed files with 14 additions and 12 deletions

View file

@ -193,8 +193,8 @@ void cogl_ortho (float left,
float near,
float far);
/**
* cogl_setup_viewport:
/*
* _cogl_setup_viewport:
* @width: Width of the viewport
* @height: Height of the viewport
* @fovy: Field of view angle in degrees
@ -208,8 +208,10 @@ void cogl_ortho (float left,
* with one that has a viewing angle of @fovy along the y-axis and a
* view scaled according to @aspect along the x-axis. The view is
* clipped according to @z_near and @z_far on the z-axis.
*
* This function is used only by Clutter.
*/
void cogl_setup_viewport (guint width,
void _cogl_setup_viewport (guint width,
guint height,
float fovy,
float aspect,

View file

@ -475,7 +475,7 @@ cogl_viewport (guint width,
}
void
cogl_setup_viewport (guint width,
_cogl_setup_viewport (guint width,
guint height,
float fovy,
float aspect,
@ -488,7 +488,7 @@ cogl_setup_viewport (guint width,
GE( glViewport (0, 0, width, height) );
/* For Ortho projection.
* _cogl_current_matrix_ortho (0, width << 16, 0, height << 16, -1 << 16, 1 << 16);
* _cogl_current_matrix_ortho (0, width, 0, height, -1, 1);
*/
cogl_perspective (fovy, aspect, z_near, z_far);
@ -542,7 +542,7 @@ cogl_setup_viewport (guint width,
}
CoglFeatureFlags
cogl_get_features ()
cogl_get_features (void)
{
_COGL_GET_CONTEXT (ctx, 0);