Cogl.OnscreenTemplate

g Cogl.Object Cogl.Object Cogl.OnscreenTemplate Cogl.OnscreenTemplate Cogl.Object->Cogl.OnscreenTemplate

Subclasses:

None

Methods

Inherited:

Cogl.Object (2)

class

new (swap_chain)

set_samples_per_pixel (n)

set_stereo_enabled (enabled)

set_swap_throttled (throttled)

Virtual Methods

None

Fields

None

Class Details

class Cogl.OnscreenTemplate
Bases:

Cogl.Object

Abstract:

No

classmethod new(swap_chain)
Parameters:

swap_chain (Cogl.SwapChain) –

Return type:

Cogl.OnscreenTemplate

set_samples_per_pixel(n)
Parameters:

n (int) – The minimum number of samples per pixel

Requires that any future Cogl.Onscreen framebuffers derived from this template must support making at least n samples per pixel which will all contribute to the final resolved color for that pixel.

By default this value is usually set to 0 and that is referred to as “single-sample” rendering. A value of 1 or greater is referred to as “multisample” rendering.

There are some semantic differences between single-sample rendering and multisampling with just 1 point sample such as it being redundant to use the Cogl.Framebuffer.resolve_samples() and Cogl.Framebuffer.resolve_samples_region() apis with single-sample rendering.

New in version 1.10.

set_stereo_enabled(enabled)
Parameters:

enabled (int) – Whether framebuffers are created with stereo buffers

Sets whether future Cogl.Onscreen framebuffers derived from this template are attempted to be created with both left and right buffers, for use with stereo display. If the display system does not support stereo, then creation of the framebuffer will fail.

New in version 1.20.

set_swap_throttled(throttled)
Parameters:

throttled (int) – Whether throttling should be enabled

Requests that any future Cogl.Onscreen framebuffers derived from this template should enable or disable swap throttling according to the given throttled argument.

New in version 1.10.