framebuffer: Add _get_XYZ_bits() functions
This exposes the previously internal only _cogl_framebuffer_get_red/green/blue/alpha_bits() functions as 2.0 experimental API. Signed-off-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
d4cd0c3e95
commit
dcb033489e
@ -1463,7 +1463,7 @@ _cogl_framebuffer_flush_state (CoglFramebuffer *draw_buffer,
|
||||
}
|
||||
|
||||
int
|
||||
_cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer)
|
||||
cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
_cogl_framebuffer_init_bits (framebuffer);
|
||||
|
||||
@ -1471,7 +1471,7 @@ _cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer)
|
||||
}
|
||||
|
||||
int
|
||||
_cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer)
|
||||
cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
_cogl_framebuffer_init_bits (framebuffer);
|
||||
|
||||
@ -1479,7 +1479,7 @@ _cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer)
|
||||
}
|
||||
|
||||
int
|
||||
_cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer)
|
||||
cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
_cogl_framebuffer_init_bits (framebuffer);
|
||||
|
||||
@ -1487,7 +1487,7 @@ _cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer)
|
||||
}
|
||||
|
||||
int
|
||||
_cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer)
|
||||
cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
_cogl_framebuffer_init_bits (framebuffer);
|
||||
|
||||
|
@ -87,6 +87,66 @@ void
|
||||
cogl_framebuffer_get_viewport4fv (CoglFramebuffer *framebuffer,
|
||||
float *viewport);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_red_bits:
|
||||
* @framebuffer: a pointer to a #CoglFramebuffer
|
||||
*
|
||||
* Retrieves the number of red bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
#define cogl_framebuffer_get_red_bits cogl_framebuffer_get_red_bits_EXP
|
||||
int
|
||||
cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_green_bits:
|
||||
* @framebuffer: a pointer to a #CoglFramebuffer
|
||||
*
|
||||
* Retrieves the number of green bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
#define cogl_framebuffer_get_green_bits cogl_framebuffer_get_green_bits_EXP
|
||||
int
|
||||
cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_blue_bits:
|
||||
* @framebuffer: a pointer to a #CoglFramebuffer
|
||||
*
|
||||
* Retrieves the number of blue bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
#define cogl_framebuffer_get_blue_bits cogl_framebuffer_get_blue_bits_EXP
|
||||
int
|
||||
cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_alpha_bits:
|
||||
* @framebuffer: a pointer to a #CoglFramebuffer
|
||||
*
|
||||
* Retrieves the number of alpha bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
#define cogl_framebuffer_get_blue_bits cogl_framebuffer_get_blue_bits_EXP
|
||||
int
|
||||
cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
#define cogl_framebuffer_swap_buffers cogl_framebuffer_swap_buffers_EXP
|
||||
void
|
||||
cogl_framebuffer_swap_buffers (CoglFramebuffer *framebuffer);
|
||||
|
@ -407,16 +407,16 @@ cogl_get_bitmasks (int *red,
|
||||
framebuffer = cogl_get_draw_framebuffer ();
|
||||
|
||||
if (red)
|
||||
*red = _cogl_framebuffer_get_red_bits (framebuffer);
|
||||
*red = cogl_framebuffer_get_red_bits (framebuffer);
|
||||
|
||||
if (green)
|
||||
*green = _cogl_framebuffer_get_green_bits (framebuffer);
|
||||
*green = cogl_framebuffer_get_green_bits (framebuffer);
|
||||
|
||||
if (blue)
|
||||
*blue = _cogl_framebuffer_get_blue_bits (framebuffer);
|
||||
*blue = cogl_framebuffer_get_blue_bits (framebuffer);
|
||||
|
||||
if (alpha)
|
||||
*alpha = _cogl_framebuffer_get_alpha_bits (framebuffer);
|
||||
*alpha = cogl_framebuffer_get_alpha_bits (framebuffer);
|
||||
}
|
||||
|
||||
void
|
||||
|
52
cogl/cogl.h
52
cogl/cogl.h
@ -206,58 +206,6 @@ cogl_get_bitmasks (int *red,
|
||||
int *blue,
|
||||
int *alpha);
|
||||
|
||||
/*
|
||||
* _cogl_framebuffer_get_red_bits:
|
||||
* @framebuffer: a handle for a framebuffer
|
||||
*
|
||||
* Retrieves the number of red bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
int
|
||||
_cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
/*
|
||||
* _cogl_framebuffer_get_green_bits:
|
||||
* @framebuffer: a handle for a framebuffer
|
||||
*
|
||||
* Retrieves the number of green bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
int
|
||||
_cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
/*
|
||||
* _cogl_framebuffer_get_blue_bits:
|
||||
* @framebuffer: a handle for a framebuffer
|
||||
*
|
||||
* Retrieves the number of blue bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
int
|
||||
_cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
/*
|
||||
* _cogl_framebuffer_get_alpha_bits:
|
||||
* @framebuffer: a handle for a framebuffer
|
||||
*
|
||||
* Retrieves the number of alpha bits of @framebuffer
|
||||
*
|
||||
* Return value: the number of bits
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
int
|
||||
_cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
* cogl_perspective:
|
||||
* @fovy: Vertical of view angle in degrees.
|
||||
|
Loading…
Reference in New Issue
Block a user