Adds ColorMask support to Cogl
This adds CoglPipeline and CoglFramebuffer support for setting a color mask which is a bit mask defining which color channels should be written to the current framebuffer. The final color mask is the intersection of the framebuffer color mask and the pipeline color mask. The framebuffer mask affects all rendering to the framebuffer while the pipeline masks can be used to affect individual primitives. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
@ -227,6 +227,40 @@ void
|
||||
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
||||
gboolean dither_enabled);
|
||||
|
||||
#define cogl_framebuffer_get_color_mask cogl_framebuffer_get_color_mask_EXP
|
||||
/**
|
||||
* cogl_framebuffer_get_color_mask:
|
||||
* @framebuffer: a pointer to a #CoglFramebuffer
|
||||
*
|
||||
* Gets the current #CoglColorMask of which channels would be written to the
|
||||
* current framebuffer. Each bit set in the mask means that the
|
||||
* corresponding color would be written.
|
||||
*
|
||||
* Returns: A #CoglColorMask
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
CoglColorMask
|
||||
cogl_framebuffer_get_color_mask (CoglFramebuffer *framebuffer);
|
||||
|
||||
#define cogl_framebuffer_set_color_mask cogl_framebuffer_set_color_mask_EXP
|
||||
/**
|
||||
* cogl_framebuffer_set_color_mask:
|
||||
* @framebuffer: a pointer to a #CoglFramebuffer
|
||||
* @color_mask: A #CoglColorMask of which color channels to write to
|
||||
* the current framebuffer.
|
||||
*
|
||||
* Defines a bit mask of which color channels should be written to the
|
||||
* given @framebuffer. If a bit is set in @color_mask that means that
|
||||
* color will be written.
|
||||
*
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
void
|
||||
cogl_framebuffer_set_color_mask (CoglFramebuffer *framebuffer,
|
||||
CoglColorMask color_mask);
|
||||
|
||||
#define cogl_framebuffer_swap_buffers cogl_framebuffer_swap_buffers_EXP
|
||||
void
|
||||
cogl_framebuffer_swap_buffers (CoglFramebuffer *framebuffer);
|
||||
|
Reference in New Issue
Block a user