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.
Parameters
x-
Type:
floatThe top-left x coordinate of the viewport origin (only integers supported currently)
y-
Type:
floatThe top-left y coordinate of the viewport origin (only integers supported currently)
width-
Type:
floatThe width of the viewport (only integers supported currently)
height-
Type:
floatThe height of the viewport (only integers supported currently)