- public void debug_matrix_entry_print (MatrixEntry entry)
Allows visualizing the operations that build up the given
entry
for debugging purposes by printing to stdout.
- public void debug_matrix_print (Matrix matrix)
Prints the contents of a
Matrix to stdout.
- public void debug_object_foreach_type (DebugObjectForeachTypeCallback func)
Invokes func
once for each type of object that Cogl
uses and passes a count of the number of objects for that type.
- public void debug_object_print_instances ()
Prints a list of all the object types that Cogl uses along with the
number of objects of that type that are currently in use.
- public void foreach_feature (Context context, FeatureCallback callback)
Iterates through all the context level features currently supported
for a given context
and for each feature callback
is called.
- public int64 get_clock_time (Context context)
Returns the current time value from Cogl's internal clock.
- public weak Framebuffer get_draw_framebuffer ()
Gets the current
Framebuffer as set using cogl_push_framebuffer
- public weak Indices get_rectangle_indices (Context context, int n_rectangles)
- public unowned Quaternion get_static_identity_quaternion ()
Returns a pointer to a singleton quaternion constant describing the
canonical identity [1 (0, 0, 0)] which represents no rotation.
- public unowned Quaternion get_static_zero_quaternion ()
- public Bool gles2_texture_get_handle (Texture texture, uint handle, uint target)
Gets an OpenGL ES 2.0 texture handle for a
Texture that can then be referenced by a
GLES2Context.
- public Source glib_renderer_source_new (Renderer renderer, int priority)
Creates a SignalSource which handles
Cogl's internal system event processing.
- public Source glib_source_new (Context context, int priority)
Creates a SignalSource which handles
Cogl's internal system event processing.
- public Type gtype_matrix_get_type ()
- public Bool has_feature (Context context, FeatureID feature)
Checks if a given feature
is currently available
- public void kms_display_queue_modes_reset (Display display)
Asks Cogl to explicitly reset the crtc output modes at the next
Onscreen swap_buffers request.
- public void kms_display_set_ignore_crtc (Display display, uint32 id, Bool ignore)
Tells cogl to ignore (or stop ignoring) a ctrc which means it never
flips buffers at this crtc.
- public Bool kms_display_set_layout (Display display, int width, int height, KmsCrtc crtcs, int n_crtcs) throws Error
Configures display
to use a framebuffer sized
width
x height
, covering the CRTCS in crtcs
.
- public int kms_renderer_get_kms_fd (Renderer renderer)
Queries the file descriptor Cogl is using internally for
communicating with the kms driver.
- public void kms_renderer_set_kms_fd (Renderer renderer, int fd)
Sets the file descriptor Cogl should use to communicate to the kms
driver.
- public void poll_renderer_dispatch (Renderer renderer, PollFD[] poll_fds)
This should be called whenever an application is woken up from going
idle in its main loop.
- public int poll_renderer_get_info (Renderer renderer, out PollFD[] poll_fds, out int64 timeout)
Is used to integrate Cogl with an application mainloop that is based
on the unix poll(2) api (or select
or something equivalent).
- public void pop_gles2_context (Context ctx)
Restores the previously active
GLES2Context if there were nested calls to
push_gles2_context or otherwise restores the ability to render with the
Cogl api instead of OpenGLES 2.0.
- public Bool push_gles2_context (Context ctx, GLES2Context gles2_ctx, Framebuffer read_buffer, Framebuffer write_buffer) throws Error
Pushes the given gles2_ctx
onto a stack associated with
ctx
so that the OpenGLES 2.0 api can be used instead of the Cogl rendering apis to read and write to the specified
framebuffers.
- public void vector3_add (float result, float a, float b)
Adds each of the corresponding components in vectors a
and b
storing the results in result
.
- public float vector3_copy (float vector)
Allocates a new 3 component float vector on the heap initializing
the components from the given vector
and returns a pointer to the newly allocated vector.
- public void vector3_cross_product (float result, float u, float v)
Calculates the cross product between the two vectors u
and v
.
- public float vector3_distance (float a, float b)
If you consider the two given vectors as (x,y,z) points instead then
this will compute the distance between those two points.
- public void vector3_divide_scalar (float vector, float scalar)
Divides each of the vector
components by the given
scalar.
- public float vector3_dot_product (float a, float b)
Calculates the dot product of the two 3 component vectors.
- public Bool vector3_equal (void* v1, void* v2)
Compares the components of two vectors and returns TRUE if they are
the same.
- public Bool vector3_equal_with_epsilon (float vector0, float vector1, float epsilon)
Compares the components of two vectors using the given epsilon and
returns TRUE if they are the same, using an internal epsilon for comparing the floats.
- public void vector3_free (float vector)
Frees a 3 component vector that was previously allocated with
vector3_copy
- public void vector3_init (float vector, float x, float y, float z)
Initializes a 3 component, single precision float vector which can
then be manipulated with the cogl_vector convenience APIs.
- public void vector3_init_zero (float vector)
Initializes a 3 component, single precision float vector with zero
for each component.
- public void vector3_invert (float vector)
Inverts/negates all the components of the given vector
.
- public float vector3_magnitude (float vector)
Calculates the scalar magnitude or length of vector
.
- public void vector3_multiply_scalar (float vector, float scalar)
Multiplies each of the vector
components by the given
scalar.
- public void vector3_normalize (float vector)
Updates the vector so it is a "unit vector" such that the
vector
<!-- -->s magnitude or length is equal to 1.
- public void vector3_subtract (float result, float a, float b)
Subtracts each of the corresponding components in vector b
from a
storing the results in result
.
- public void wayland_display_set_compositor_display (Display display, void* wayland_display)
Informs Cogl of a compositor's Wayland display pointer.
- public void wayland_onscreen_resize (Onscreen onscreen, int width, int height, int offset_x, int offset_y)
Resizes the backbuffer of the given onscreen
framebuffer to the given size.
- public void wayland_onscreen_set_foreign_surface (Onscreen onscreen, void* surface)
Allows you to explicitly notify Cogl of an existing Wayland surface
to use, which prevents Cogl from allocating a surface and shell surface for the onscreen
.
- public void wayland_renderer_set_event_dispatch_enabled (Renderer renderer, Bool enable)
- public void wayland_renderer_set_foreign_display (Renderer renderer, void* display)
Allows you to explicitly control what Wayland display you want Cogl
to work with instead of leaving Cogl to automatically connect to a wayland compositor.
- public Bool wayland_texture_set_region_from_shm_buffer (Texture texture, int src_x, int src_y, int width, int height, void* shm_buffer, int dst_x, int dst_y, int level) throws Error
Sets the pixels in a rectangular subregion of texture
from a Wayland SHM buffer.
- public uint32 x11_onscreen_get_visual_xid (Onscreen onscreen)
- public uint32 x11_onscreen_get_window_xid (Onscreen onscreen)
Assuming you know the given onscreen
framebuffer is
based on an x11 window this queries the XID of that window.