Method
CoglFramebufferset_samples_per_pixel
Declaration [src]
void
cogl_framebuffer_set_samples_per_pixel (
CoglFramebuffer* framebuffer,
int samples_per_pixel
)
Description [src]
Requires that when rendering to framebuffer
then n
point samples
should be made per pixel which will all contribute to the final
resolved color for that pixel. The idea is that the hardware aims
to get quality similar to what you would get if you rendered
everything twice as big (for 4 samples per pixel) and then scaled
that image back down with filtering. It can effectively remove the
jagged edges of polygons and should be more efficient than if you
were to manually render at a higher resolution and downscale
because the hardware is often able to take some shortcuts. For
example the GPU may only calculate a single texture sample for all
points of a single pixel, and for tile based architectures all the
extra sample data (such as depth and stencil samples) may be
handled on-chip and so avoid increased demand on system memory bandwidth.
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.
cogl_framebuffer_resolve_samples()
and
cogl_framebuffer_resolve_samples_region()
apis with single-sample
rendering.
cogl_framebuffer_resolve_samples_region()
be explicitly used at the
end of rendering to a point sample buffer to minimize the number of
samples that get resolved. By default Cogl will implicitly resolve
all framebuffer samples but if only a small region of a
framebuffer has changed this can lead to redundant work being
done.
Stability: | Unstable |
Available since: | 1.8 |