- public Bool allocate () throws Error
Explicitly allocates a configured
Framebuffer allowing developers to check and handle any errors that might arise from an unsupported configuration so that
fallback configurations may be tried.
- public void cancel_fence_callback (FenceClosure closure)
Removes a fence previously submitted with
cogl_framebuffer_add_fence_callback
; the callback will not be called.
- public void clear (ulong buffers, Color color)
Clears all the auxiliary buffers identified in the buffers
mask, and if that includes the color buffer then the specified color
is used.
- public void clear4f (ulong buffers, float red, float green, float blue, float alpha)
Clears all the auxiliary buffers identified in the buffers
mask, and if that includes the color buffer then the specified color
is used.
- public void discard_buffers (ulong buffers)
Declares that the specified buffers
no longer need to
be referenced by any further rendering commands.
- public void draw_attributes (Pipeline pipeline, VerticesMode mode, int first_vertex, int n_vertices, Attribute attributes, int n_attributes)
First defines a geometry primitive by grouping a set of vertex
attributes
; specifying a first_vertex
; a number of vertices (n_vertices
) and specifying what
kind of topology the vertices have via mode
.
- public void draw_indexed_attributes (Pipeline pipeline, VerticesMode mode, int first_vertex, int n_vertices, Indices indices, Attribute attributes, int n_attributes)
Behaves the same as
draw_attributes except that instead of reading vertex data
sequentially from the specified attributes
the indices
provide an indirection for how the data should be
indexed allowing a random access order to be specified.
- public void draw_multitextured_rectangle (Pipeline pipeline, float x_1, float y_1, float x_2, float y_2, float[] tex_coords, int tex_coords_len)
Draws a textured rectangle to this
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
).
- public void draw_primitive (Pipeline pipeline, Primitive primitive)
Draws the given primitive
geometry to the specified
destination this using the graphics processing state described by pipeline
.
- public void draw_rectangle (Pipeline pipeline, float x_1, float y_1, float x_2, float y_2)
Draws a rectangle to this 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
).
- public void draw_rectangles (Pipeline pipeline, float[] coordinates, uint n_rectangles)
Draws a series of rectangles to this
with the given pipeline
state in the same way that
draw_rectangle does.
- public void draw_textured_rectangle (Pipeline pipeline, float x_1, float y_1, float x_2, float y_2, float s_1, float t_1, float s_2, float t_2)
Draws a textured rectangle to this
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
).
- public void draw_textured_rectangles (Pipeline pipeline, float[] coordinates, uint n_rectangles)
Draws a series of rectangles to this
with the given pipeline
state in the same way that
draw_textured_rectangle does.
- public void finish ()
This blocks the CPU until all pending rendering associated with the
specified framebuffer has completed.
- public void frustum (float left, float right, float bottom, float top, float z_near, float z_far)
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.
- public int get_alpha_bits ()
Retrieves the number of alpha bits of
this
- public int get_blue_bits ()
Retrieves the number of blue bits of this
- public ColorMask get_color_mask ()
Gets the current
ColorMask of which channels would be written to the current framebuffer.
- public weak Context get_context ()
Can be used to query the
Context a given this was instantiated within.
- public int get_depth_bits ()
Retrieves the number of depth bits of
this
- public weak Texture get_depth_texture ()
Retrieves the depth buffer of this
as a Texture.
- public Bool get_depth_texture_enabled ()
- public Bool get_depth_write_enabled ()
Queries whether depth buffer writing is enabled for
this.
- public Bool get_dither_enabled ()
Returns whether dithering has been requested for the given
this.
- public int get_green_bits ()
Retrieves the number of green bits of
this
- public int get_height ()
Queries the current height of the given
this.
- public Bool get_is_stereo ()
- public Matrix get_modelview_matrix ()
Stores the current model-view matrix in matrix
.
- public Matrix get_projection_matrix ()
Stores the current projection matrix in matrix
.
- public int get_red_bits ()
Retrieves the number of red bits of this
- public int get_samples_per_pixel ()
Gets the number of points that are sampled per-pixel when
rasterizing geometry.
- public StereoMode get_stereo_mode ()
Gets the current
StereoMode, which defines which stereo buffers should be drawn to.
- public void get_viewport4fv (out float[] viewport)
Queries the x, y, width and height components of the current
viewport as set using set_viewport or the default values which are
0, 0, framebuffer_width and framebuffer_height.
- public float get_viewport_height ()
Queries the height of the viewport as set using
set_viewport or the default value which is the height of the
framebuffer.
- public float get_viewport_width ()
Queries the width of the viewport as set using
set_viewport or the default value which is the width of the
framebuffer.
- public float get_viewport_x ()
Queries the x coordinate of the viewport origin as set using
set_viewport or the default value which is 0.
- public float get_viewport_y ()
Queries the y coordinate of the viewport origin as set using
set_viewport or the default value which is 0.
- public int get_width ()
Queries the current width of the given
this.
- public void identity_matrix ()
Resets the current model-view matrix to the identity matrix.
- public void orthographic (float x_1, float y_1, float x_2, float y_2, float near, float far)
Replaces the current projection matrix with an orthographic
projection matrix.
- public void perspective (float fov_y, float aspect, float z_near, float z_far)
Replaces the current projection matrix with a perspective matrix
based on the provided values.
- public void pop_clip ()
- public void pop_matrix ()
Restores the model-view matrix on the top of the matrix stack.
- public void push_matrix ()
Copies the current model-view matrix onto the matrix stack.
- public void push_primitive_clip (Primitive primitive, float bounds_x1, float bounds_y1, float bounds_x2, float bounds_y2)
Sets a new clipping area using a 2D shaped described with a
Primitive.
- public void push_rectangle_clip (float x_1, float y_1, float x_2, float y_2)
Specifies a modelview transformed rectangular clipping area for all
subsequent drawing operations.
- public void push_scissor_clip (int x, int y, int width, int height)
Specifies a rectangular clipping area for all subsequent drawing
operations.
- public Bool read_pixels (int x, int y, int width, int height, PixelFormat format, uint8 pixels)
This is a convenience wrapper around
read_pixels_into_bitmap which allocates a temporary
Bitmap to read pixel data directly into the given buffer.
- public Bool read_pixels_into_bitmap (int x, int y, ReadPixelsFlags source, Bitmap bitmap)
This reads a rectangle of pixels from the given framebuffer where
position (0, 0) is the top left.
- public void resolve_samples ()
When point sample rendering (also known as multisample rendering)
has been enabled via set_samples_per_pixel then you can
optionally call this function (or resolve_samples_region)
to explicitly resolve the point samples into values for the final color buffer.
- public void resolve_samples_region (int x, int y, int width, int height)
When point sample rendering (also known as multisample rendering)
has been enabled via set_samples_per_pixel then you can
optionally call this function (or resolve_samples) to explicitly
resolve the point samples into values for the final color buffer.
- public void rotate (float angle, float x, float y, float z)
Multiplies the current model-view matrix by one that rotates the
model around the axis-vector specified by x
, y
and z
.
- public void rotate_euler (Euler euler)
Multiplies the current model-view matrix by one that rotates
according to the rotation described by euler
.
- public void rotate_quaternion (Quaternion quaternion)
Multiplies the current model-view matrix by one that rotates
according to the rotation described by quaternion
.
- public void scale (float x, float y, float z)
Multiplies the current model-view matrix by one that scales the x, y
and z axes by the given values.
- public void set_color_mask (ColorMask color_mask)
Defines a bit mask of which color channels should be written to the
given this.
- public void set_depth_texture_enabled (Bool enabled)
If enabled
is TRUE
, the depth buffer used
when rendering to this is available as a texture.
- public void set_depth_write_enabled (Bool depth_write_enabled)
Enables or disables depth buffer writing when rendering to
this.
- public void set_dither_enabled (Bool dither_enabled)
Enables or disabled dithering if supported by the hardware.
- public void set_modelview_matrix (Matrix matrix)
Sets matrix
as the new model-view matrix.
- public void set_projection_matrix (Matrix matrix)
Sets matrix
as the new projection matrix.
- public void set_samples_per_pixel (int samples_per_pixel)
Requires that when rendering to this
then n
point samples should be made per pixel which will all contribute to the final resolved color for that
pixel.
- public void set_stereo_mode (StereoMode stereo_mode)
Sets which stereo buffers should be drawn to.
- public void set_viewport (float x, float y, float width, float height)
Defines a scale and offset for everything rendered relative to the
top-left of the destination framebuffer.
- public void transform (Matrix matrix)
Multiplies the current model-view matrix by the given matrix.
- public void translate (float x, float y, float z)
Multiplies the current model-view matrix by one that translates the
model along all three axes according to the given values.