Method
CoglFramebufferset_viewport
Declaration [src]
void
cogl_framebuffer_set_viewport (
CoglFramebuffer* framebuffer,
float x,
float y,
float width,
float height
)
Description [src]
Defines a scale and offset for everything rendered relative to the top-left of the destination framebuffer.
By default the viewport has an origin of (0,0) and width and height that match the framebuffer’s size. Assuming a default projection and modelview matrix then you could translate the contents of a window down and right by leaving the viewport size unchanged by moving the offset to (10,10). The viewport coordinates are measured in pixels. If you left the x and y origin as (0,0) you could scale the windows contents down by specify and width and height that’s half the real size of the framebuffer.
Stability: | Unstable |
Available since: | 1.8 |
Parameters
x |
float |
The top-left x coordinate of the viewport origin (only integers supported currently) |
|
y |
float |
The top-left y coordinate of the viewport origin (only integers supported currently) |
|
width |
float |
The width of the viewport (only integers supported currently) |
|
height |
float |
The height of the viewport (only integers supported currently) |