Class
CoglFramebuffer
Instance methods
cogl_framebuffer_allocate
Explicitly allocates a configured CoglFramebuffer
allowing developers to
check and handle any errors that might arise from an unsupported
configuration so that fallback configurations may be tried.
cogl_framebuffer_clear
Clears all the auxiliary buffers identified in the buffers
mask, and if
that includes the color buffer then the specified color
is used.
cogl_framebuffer_clear4f
Clears all the auxiliary buffers identified in the buffers
mask, and if
that includes the color buffer then the specified color
is used.
cogl_framebuffer_create_timestamp_query
Creates a query for the GPU timestamp that will complete upon completion of all previously submitted GL commands related to this framebuffer. E.g. when the rendering is finished on this framebuffer.
cogl_framebuffer_discard_buffers
Declares that the specified buffers
no longer need to be referenced
by any further rendering commands. This can be an important
optimization to avoid subsequent frames of rendering depending on
the results of a previous frame.
cogl_framebuffer_draw_multitextured_rectangle
Draws a textured rectangle to framebuffer
with the given pipeline
state with the top left corner positioned at (x_1
, y_1
) and the
bottom right corner positioned at (x_2
, y_2
). As a pipeline may
contain multiple texture layers this interface lets you supply
texture coordinates for each layer of the pipeline.
cogl_framebuffer_draw_rectangle
Draws a rectangle to framebuffer
with the given pipeline
state
and with the top left corner positioned at (x_1
, y_1
) and the
bottom right corner positioned at (x_2
, y_2
).
cogl_framebuffer_draw_rectangles
Draws a series of rectangles to framebuffer
with the given
pipeline
state in the same way that
cogl_framebuffer_draw_rectangle()
does.
cogl_framebuffer_draw_textured_rectangle
Draws a textured rectangle to framebuffer
using the given
pipeline
state with the top left corner positioned at (x_1
, y_1
)
and the bottom right corner positioned at (x_2
, y_2
). The top
left corner will have texture coordinates of (s_1
, t_1
) and the
bottom right corner will have texture coordinates of (s_2
, t_2
).
cogl_framebuffer_draw_textured_rectangles
Draws a series of rectangles to framebuffer
with the given
pipeline
state in the same way that
cogl_framebuffer_draw_textured_rectangle()
does.
cogl_framebuffer_finish
This blocks the CPU until all pending rendering associated with the specified framebuffer has completed. It’s very rare that developers should ever need this level of synchronization with the GPU and should never be used unless you clearly understand why you need to explicitly force synchronization.
cogl_framebuffer_flush
Flushes framebuffer
to ensure the current batch of commands is
submitted to the GPU.
cogl_framebuffer_frustum
Replaces the current projection matrix with a perspective matrix for a given viewing frustum defined by 4 side clip planes that all cross through the origin and 2 near and far clip planes.
cogl_framebuffer_get_context
Can be used to query the CoglContext
a given framebuffer
was
instantiated within. This is the CoglContext
that was passed to
cogl_onscreen_new()
for example.
cogl_framebuffer_get_depth_write_enabled
Queries whether depth buffer writing is enabled for framebuffer
. This
can be controlled via cogl_framebuffer_set_depth_write_enabled().
cogl_framebuffer_get_dither_enabled
Returns whether dithering has been requested for the given framebuffer
.
See cogl_framebuffer_set_dither_enabled()
for more details about dithering.
cogl_framebuffer_get_viewport4fv
Queries the x, y, width and height components of the current viewport as set
using cogl_framebuffer_set_viewport()
or the default values which are 0, 0,
framebuffer_width and framebuffer_height. The values are written into the
given viewport
array.
cogl_framebuffer_get_viewport_height
Queries the height of the viewport as set using cogl_framebuffer_set_viewport()
or the default value which is the height of the framebuffer.
cogl_framebuffer_get_viewport_width
Queries the width of the viewport as set using cogl_framebuffer_set_viewport()
or the default value which is the width of the framebuffer.
cogl_framebuffer_get_viewport_x
Queries the x coordinate of the viewport origin as set using cogl_framebuffer_set_viewport()
or the default value which is 0.
cogl_framebuffer_get_viewport_y
Queries the y coordinate of the viewport origin as set using cogl_framebuffer_set_viewport()
or the default value which is 0.
cogl_framebuffer_orthographic
Replaces the current projection matrix with an orthographic projection matrix.
cogl_framebuffer_perspective
Replaces the current projection matrix with a perspective matrix based on the provided values.
cogl_framebuffer_pop_clip
Reverts the clipping region to the state before the last call to cogl_framebuffer_push_rectangle_clip().
cogl_framebuffer_push_matrix
Copies the current model-view matrix onto the matrix stack. The matrix can later be restored with cogl_framebuffer_pop_matrix().
cogl_framebuffer_push_rectangle_clip
Specifies a modelview transformed rectangular clipping area for all subsequent drawing operations. Any drawing commands that extend outside the rectangle will be clipped so that only the portion inside the rectangle will be displayed. The rectangle dimensions are transformed by the current model-view matrix.
cogl_framebuffer_read_pixels
This is a convenience wrapper around
cogl_framebuffer_read_pixels_into_bitmap()
which allocates a
temporary CoglBitmap
to read pixel data directly into the given
buffer. The rowstride of the buffer is assumed to be the width of
the region times the bytes per pixel of the format. The source for
the data is always taken from the color buffer. If you want to use
any other rowstride or source, please use the
cogl_framebuffer_read_pixels_into_bitmap()
function directly.
cogl_framebuffer_read_pixels_into_bitmap
This reads a rectangle of pixels from the given framebuffer where position (0, 0) is the top left. The pixel at (x, y) is the first read, and a rectangle of pixels with the same size as the bitmap is read right and downwards from that point.
cogl_framebuffer_rotate
Multiplies the current model-view matrix by one that rotates the
model around the axis-vector specified by x
, y
and z
. The
rotation follows the right-hand thumb rule so for example rotating
by 10 degrees about the axis-vector (0, 0, 1) causes a small
counter-clockwise rotation.
cogl_framebuffer_scale
Multiplies the current model-view matrix by one that scales the x, y and z axes by the given values.
cogl_framebuffer_set_depth_write_enabled
Enables or disables depth buffer writing when rendering to framebuffer
.
If depth writing is enabled for both the framebuffer and the rendering
pipeline, and the framebuffer has an associated depth buffer, depth
information will be written to this buffer during rendering.
cogl_framebuffer_set_viewport
Defines a scale and offset for everything rendered relative to the top-left of the destination framebuffer.
cogl_framebuffer_translate
Multiplies the current model-view matrix by one that translates the model along all three axes according to the given values.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct CoglFramebufferClass {
gboolean (* allocate) (
CoglFramebuffer* framebuffer,
GError** error
);
gboolean (* is_y_flipped) (
CoglFramebuffer* framebuffer
);
}
No description available.
Class members
allocate: gboolean (* allocate) ( CoglFramebuffer* framebuffer, GError** error )
No description available.
is_y_flipped: gboolean (* is_y_flipped) ( CoglFramebuffer* framebuffer )
No description available.
Virtual methods
Cogl.FramebufferClass.allocate
Explicitly allocates a configured CoglFramebuffer
allowing developers to
check and handle any errors that might arise from an unsupported
configuration so that fallback configurations may be tried.