mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
[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:
parent
b9e1c82587
commit
5ed1b03a91
@ -193,8 +193,8 @@ void cogl_ortho (float left,
|
|||||||
float near,
|
float near,
|
||||||
float far);
|
float far);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* cogl_setup_viewport:
|
* _cogl_setup_viewport:
|
||||||
* @width: Width of the viewport
|
* @width: Width of the viewport
|
||||||
* @height: Height of the viewport
|
* @height: Height of the viewport
|
||||||
* @fovy: Field of view angle in degrees
|
* @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
|
* 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
|
* view scaled according to @aspect along the x-axis. The view is
|
||||||
* clipped according to @z_near and @z_far on the z-axis.
|
* 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,
|
guint height,
|
||||||
float fovy,
|
float fovy,
|
||||||
float aspect,
|
float aspect,
|
||||||
|
@ -475,7 +475,7 @@ cogl_viewport (guint width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_setup_viewport (guint width,
|
_cogl_setup_viewport (guint width,
|
||||||
guint height,
|
guint height,
|
||||||
float fovy,
|
float fovy,
|
||||||
float aspect,
|
float aspect,
|
||||||
@ -488,7 +488,7 @@ cogl_setup_viewport (guint width,
|
|||||||
GE( glViewport (0, 0, width, height) );
|
GE( glViewport (0, 0, width, height) );
|
||||||
|
|
||||||
/* For Ortho projection.
|
/* 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);
|
cogl_perspective (fovy, aspect, z_near, z_far);
|
||||||
@ -542,7 +542,7 @@ cogl_setup_viewport (guint width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
CoglFeatureFlags
|
CoglFeatureFlags
|
||||||
cogl_get_features ()
|
cogl_get_features (void)
|
||||||
{
|
{
|
||||||
_COGL_GET_CONTEXT (ctx, 0);
|
_COGL_GET_CONTEXT (ctx, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user