-
public Type attribute_type_get_type ()
-
public void begin_gl ()
We do not advise nor reliably support the interleaving of raw GL drawing and Cogl drawing functions,
but if you insist, begin_gl and end_gl
provide a simple mechanism that may at least give you a fighting chance of succeeding.
-
public Type blend_string_error_get_type ()
-
public bool check_extension (string name, string ext)
Check whether name occurs in list of extensions in ext.
-
public void clear (Color color, uint buffers)
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 clip_ensure ()
Ensures that the current clipping region has been set in GL. This will automatically be called before
any Cogl primitives but it maybe be neccessary to call if you are using raw GL calls with clipping.
-
public void clip_pop ()
Reverts the clipping region to the state before the last call to
clip_push.
-
public void clip_push (float x_offset, float y_offset, float width, float height)
Specifies a 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.
-
public void clip_push_from_path ()
Sets a new clipping area using the current path. The current path is then cleared. The clipping area
is intersected with the previous clipping area. To restore the previous clipping area, call
clip_pop.
-
public void clip_push_from_path_preserve ()
Sets a new clipping area using the current path. The current path is then cleared. The clipping area
is intersected with the previous clipping area. To restore the previous clipping area, call
clip_pop.
-
public void clip_push_rectangle (float x0, float y0, float x1, float y1)
Specifies a 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.
-
public void clip_push_window_rect (float x_offset, float y_offset, float width, float height)
Specifies a 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 not transformed by the current model-view matrix.
-
public void clip_push_window_rectangle (int x_offset, int y_offset, int width, int height)
Specifies a 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 not transformed by the current model-view matrix.
-
public void clip_stack_restore ()
Restore the state of the clipping stack that was previously saved by
clip_stack_save.
-
public void clip_stack_save ()
-
public Type depth_test_function_get_type ()
-
public void disable_fog ()
This function disables fogging, so primitives drawn afterwards will not be blended with any previously
set fog color.
-
public Fixed double_to_fixed (double value)
-
public int double_to_int (double value)
-
public uint double_to_uint (double value)
-
public Type driver_error_get_type ()
-
public void end_gl ()
This is the counterpart to begin_gl used to delimit
blocks of drawing code using raw OpenGL. Please refer to begin_gl for full details.
-
public Type error_get_type ()
-
public Type feature_flags_get_type ()
-
public bool features_available (FeatureFlags features)
Checks whether the given COGL features are available. Multiple features can be checked for by or-ing
them together with the '|' operator. true is only returned if all of the requested features are available.
-
public void flush ()
This function should only need to be called in exceptional circumstances.
-
public Type fog_mode_get_type ()
-
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 the given viewing frustum.
-
public bool get_backface_culling_enabled ()
-
public void get_bitmasks (int red, int green, int blue, int alpha)
Gets the number of bitplanes used for each of the color components in the color buffer. Pass
null for any of the arguments if the value is not required.
-
public bool get_depth_test_enabled ()
Queries if depth testing has been enabled via cogl_set_depth_test_enable
-
public FeatureFlags get_features ()
Returns all of the features supported by COGL.
-
public void get_modelview_matrix (Matrix matrix)
Stores the current model-view matrix in matrix.
-
public OptionGroup get_option_group ()
Retrieves the OptionGroup used by COGL
to parse the command line options. Clutter uses this to handle the COGL command line options during its initialization process.
-
public unowned Path get_path ()
Gets a pointer to the current path. The path can later be used again by calling cogl_path_set
. Note that the path isn't copied so if you later call any functions to add to the path it will affect the returned object
too. No reference is taken on the path so if you want to retain it you should take your own reference with cogl_object_ref
.
-
public weak FuncPtr get_proc_address (string name)
Gets a pointer to a given GL or GL ES extension function. This acts as a wrapper around
glXGetProcAddress or whatever is the appropriate function for the current backend.
-
public void get_projection_matrix (Matrix matrix)
Stores the current projection matrix in matrix.
-
public void get_viewport (float[] v)
Stores the current viewport in v. v[0] and v[1] get the x and y
position of the viewport and v[2] and v[3] get the width and height.
-
public Type indices_type_get_type ()
-
public bool is_path (Bitmap handle)
Gets whether the given handle references an existing path object.
-
public bool is_vertex_buffer_indices (Bitmap handle)
Checks whether handle is a handle to the indices for a vertex buffer object
-
public void ortho (float left, float right, float bottom, float top, float near, float far)
-
public void pango_ensure_glyph_cache_for_layout (Layout layout)
-
public void pango_render_layout (Layout layout, int x, int y, Color color, int flags)
-
public void pango_render_layout_line (LayoutLine line, int x, int y, Color color)
-
public void pango_render_layout_subpixel (Layout layout, int x, int y, Color color, int flags)
-
public void perspective (float fovy, float aspect, float z_near, float z_far)
Replaces the current projection matrix with a perspective matrix based on the provided values.
-
public Type pixel_format_get_type ()
-
public void polygon (TextureVertex[] vertices, bool use_color)
Draws a convex polygon using the current source material to fill / texture with according to the
texture coordinates passed.
-
public void pop_framebuffer ()
Restores the framebuffer that was previously at the top of the stack. All subsequent drawing will be
redirected to this framebuffer.
-
public void pop_matrix ()
Restores the current model-view matrix from the matrix stack.
-
public void push_framebuffer (Framebuffer buffer)
-
public void push_matrix ()
Stores the current model-view matrix on the matrix stack. The matrix can later be restored with
pop_matrix.
-
public void read_pixels (int x, int y, int width, int height, ReadPixelsFlags source, PixelFormat format, uchar pixels)
This reads a rectangle of pixels from the current framebuffer where position (0, 0) is the top left.
The pixel at (x, y) is the first read, and the data is returned with a rowstride of (width * 4).
-
public Type read_pixels_flags_get_type ()
-
public void rectangle (float x_1, float y_1, float x_2, float y_2)
Fills a rectangle at the given coordinates with the current source material
-
public void rectangle_with_multitexture_coords (float x1, float y1, float x2, float y2, float tex_coords, int tex_coords_len)
This function draws a rectangle using the current source material to texture or fill with. As a
material may contain multiple texture layers this interface lets you supply texture coordinates for each layer of the material.
-
public void rectangle_with_texture_coords (float x1, float y1, float x2, float y2, float tx1, float ty1, float tx2, float ty2)
Draw a rectangle using the current material and supply texture coordinates to be used for the first
texture layer of the material. To draw the entire texture pass in tx1=0.0 ty1=0.0 tx2=1.0
ty2=1.0.
-
public void rectangles (float[] verts, uint n_rects)
Draws a series of rectangles in the same way that
rectangle does. In some situations it can give a significant performance boost to use this function rather than calling
rectangle separately for each rectangle.
-
public void rectangles_with_texture_coords (float[] verts, uint n_rects)
-
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 vertex specified by
x, y and z. The rotation follows the right-hand thumb rule so for example rotating by 10
degrees about the vertex (0, 0, 1) causes a small counter-clockwise rotation.
-
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_backface_culling_enabled (bool setting)
Sets whether textures positioned so that their backface is showing should be hidden. This can be used
to efficiently draw two-sided textures or fully closed cubes without enabling depth testing. This only affects calls to the
cogl_rectangle* family of functions and cogl_vertex_buffer_draw*. Backface culling is disabled by default.
-
public void set_depth_test_enabled (bool setting)
Sets whether depth testing is enabled. If it is disabled then the order that actors are layered on the
screen depends solely on the order specified using clutter_actor_raise and clutter_actor_lower, otherwise
it will also take into account the actor's depth. Depth testing is disabled by default.
-
public void set_fog (Color fog_color, FogMode mode, float density, float z_near, float z_far)
Enables fogging. Fogging causes vertices that are further away from the eye to be rendered with a
different color. The color is determined according to the chosen fog mode; at it's simplest the color is linearly interpolated so
that vertices at z_near are drawn fully with their original color and vertices at z_far are drawn fully
with fog_color. Fogging will remain enabled until you call disable_fog
.
-
public void set_framebuffer (Framebuffer buffer)
This redirects all subsequent drawing to the specified framebuffer. This can either be an offscreen
buffer created with Offscreen.to_texture or in the
future it may be an onscreen framebuffers too.
-
public void set_modelview_matrix (Matrix matrix)
Loads matrix as the new model-view matrix.
-
public void set_path (Path path)
Replaces the current path with path. A reference is taken on the object so if you no
longer need the path you should unref with cogl_object_unref.
-
public void set_projection_matrix (Matrix matrix)
Loads matrix as the new projection matrix.
-
public void set_source (Material material)
This function changes the material at the top of the source stack. The material at the top of this
stack defines the GPU state used to process subsequent primitives, such as rectangles drawn with
rectangle or vertices drawn using
draw.
-
public void set_source_color (Color color)
This is a convenience function for creating a solid fill source material from the given color. This
color will be used for any subsequent drawing operation.
-
public void set_source_color4f (float red, float green, float blue, float alpha)
This is a convenience function for creating a solid fill source material from the given color using
normalized values for each component. This color will be used for any subsequent drawing operation.
-
public void set_source_color4ub (uchar red, uchar green, uchar blue, uchar alpha)
This is a convenience function for creating a solid fill source material from the given color using
unsigned bytes for each component. This color will be used for any subsequent drawing operation.
-
public void set_source_texture (Texture texture_handle)
This is a convenience function for creating a material with the first layer set to
texture_handle and setting that material as the source with cogl_set_source.
-
public void set_viewport (int x, int y, int width, int height)
Replaces the current viewport with the given values.
-
public int sqrti (int x)
Very fast fixed point implementation of square root for integers.
-
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.
-
public Type vertices_mode_get_type ()
-
public void viewport (uint width, uint height)
Replace the current viewport with the given values.