Class
CoglOnscreen
Ancestors
- CoglFramebuffer
- GObject
Instance methods
cogl_onscreen_add_dirty_callback
Installs a callback
function that will be called whenever the
window system has lost the contents of a region of the onscreen
buffer and the application should redraw it to repair the buffer.
For example this may happen in a window system without a compositor
if a window that was previously covering up the onscreen window has
been moved causing a region of the onscreen to be exposed.
Available since: 1.16
cogl_onscreen_add_frame_callback
Installs a callback
function that will be called for significant
events relating to the given onscreen
framebuffer.
Available since: 1.14
cogl_onscreen_add_frame_info
cogl_onscreen_direct_scanout
cogl_onscreen_get_frame_counter
Gets the value of the framebuffers frame counter. This is
a counter that increases by one each time
cogl_onscreen_swap_buffers()
or cogl_onscreen_swap_region()
is called.
Available since: 1.14
cogl_onscreen_queue_damage_region
Implementation for https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_partial_update.txt This immediately queues state to OpenGL that will be used for the next swap. This needs to be called every frame.
cogl_onscreen_remove_dirty_callback
Removes a callback and associated user data that were previously
registered using cogl_onscreen_add_dirty_callback()
.
Available since: 1.16
cogl_onscreen_remove_frame_callback
Removes a callback and associated user data that were previously
registered using cogl_onscreen_add_frame_callback()
.
Available since: 1.14
cogl_onscreen_swap_buffers
Swaps the current back buffer being rendered too, to the front for display.
Available since: 1.10
cogl_onscreen_swap_buffers_with_damage
Swaps the current back buffer being rendered too, to the front for display and provides information to any system compositor about what regions of the buffer have changed (damage) with respect to the last swapped buffer.
Available since: 1.16
cogl_onscreen_swap_region
Swaps a region of the back buffer being rendered too, to the front for
display. rectangles
represents the region as array of n_rectangles
each
defined by 4 sequential (x, y, width, height) integers.
Available since: 1.10
Methods inherited from CoglFramebuffer (59)
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.
Available since: 1.8
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.
Available since: 1.8
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.
Available since: 1.8
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.
Available since: 1.8
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.
Available since: 1.10
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
).
Available since: 1.10
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.
Available since: 1.10
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
).
Available since: 1.10
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.
Available since: 1.10
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.
Available since: 1.10
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.
Available since: 1.10
cogl_framebuffer_get_alpha_bits
Retrieves the number of alpha bits of framebuffer
.
Available since: 1.8
cogl_framebuffer_get_blue_bits
Retrieves the number of blue bits of framebuffer
.
Available since: 1.8
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.
Available since: 1.8
cogl_framebuffer_get_depth_bits
Retrieves the number of depth bits of framebuffer
.
Available since: 2.0
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()
.
Available since: 1.18
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.
Available since: 1.8
cogl_framebuffer_get_green_bits
Retrieves the number of green bits of framebuffer
.
Available since: 1.8
cogl_framebuffer_get_height
Queries the current height of the given framebuffer
.
Available since: 1.8
cogl_framebuffer_get_is_stereo
cogl_framebuffer_get_modelview_matrix
Stores the current model-view matrix in matrix
.
Available since: 1.10
Class structure
struct CoglOnscreenClass {
void (* bind) (
CoglOnscreen* onscreen
);
void (* swap_buffers_with_damage) (
CoglOnscreen* onscreen,
const int* rectangles,
int n_rectangles,
CoglFrameInfo* info,
gpointer user_data
);
void (* swap_region) (
CoglOnscreen* onscreen,
const int* rectangles,
int n_rectangles,
CoglFrameInfo* info,
gpointer user_data
);
void (* queue_damage_region) (
CoglOnscreen* onscreen,
const int* rectangles,
int n_rectangles
);
gboolean (* direct_scanout) (
CoglOnscreen* onscreen,
CoglScanout* scanout,
CoglFrameInfo* info,
gpointer user_data,
GError** error
);
int (* get_buffer_age) (
CoglOnscreen* onscreen
);
}
Class members
bind |
|
No description available. | |
swap_buffers_with_damage |
|
No description available. | |
swap_region |
|
No description available. | |
queue_damage_region |
|
No description available. | |
direct_scanout |
|
No description available. | |
get_buffer_age |
|
No description available. |
Virtual methods
Cogl.OnscreenClass.bind
Cogl.OnscreenClass.direct_scanout
Cogl.OnscreenClass.get_buffer_age
Gets the current age of the buffer contents.
Available since: 1.14
Cogl.OnscreenClass.queue_damage_region
Implementation for https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_partial_update.txt This immediately queues state to OpenGL that will be used for the next swap. This needs to be called every frame.
Cogl.OnscreenClass.swap_buffers_with_damage
Swaps the current back buffer being rendered too, to the front for display and provides information to any system compositor about what regions of the buffer have changed (damage) with respect to the last swapped buffer.
Available since: 1.16
Cogl.OnscreenClass.swap_region
Swaps a region of the back buffer being rendered too, to the front for
display. rectangles
represents the region as array of n_rectangles
each
defined by 4 sequential (x, y, width, height) integers.
Available since: 1.10