Method
CoglFramebufferdraw_rectangles
Declaration [src]
void
cogl_framebuffer_draw_rectangles (
CoglFramebuffer* framebuffer,
CoglPipeline* pipeline,
const float* coordinates,
unsigned int n_rectangles
)
Description [src]
Draws a series of rectangles to framebuffer
with the given
pipeline
state in the same way that
cogl_framebuffer_draw_rectangle()
does.
The top left corner of the first rectangle is positioned at (coordinates[0], coordinates[1]) and the bottom right corner is positioned at (coordinates[2], coordinates[3]). The positions for the second rectangle are (coordinates[4], coordinates[5]) and (coordinates[6], coordinates[7]) and so on…
The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.
As a general rule for better performance its recommended to use
this this API instead of calling
cogl_framebuffer_draw_textured_rectangle()
separately for multiple
rectangles if all of the rectangles will be drawn together with the
same pipeline
state.
Parameters
pipeline
-
Type:
CoglPipeline
A
CoglPipeline
state object.The data is owned by the caller of the method. coordinates
-
Type: An array of
float
An array of coordinates containing groups of 4 float values: [x_1, y_1, x_2, y_2] that are interpreted as two position coordinates; one for the top left of the rectangle (x1, y1), and one for the bottom right of the rectangle (x2, y2).
The data is owned by the caller of the method. n_rectangles
-
Type:
unsigned int
Number of rectangles defined in
coordinates
.