Method
CoglFramebufferdraw_textured_rectangle
Declaration [src]
void
cogl_framebuffer_draw_textured_rectangle (
CoglFramebuffer* framebuffer,
CoglPipeline* pipeline,
float x_1,
float y_1,
float x_2,
float y_2,
float s_1,
float t_1,
float s_2,
float t_2
)
Description [src]
Draws a textured rectangle to framebuffer
using the given
pipeline
state with the top left corner positioned at (x_1
, y_1
)
and the bottom right corner positioned at (x_2
, y_2
). The top
left corner will have texture coordinates of (s_1
, t_1
) and the
bottom right corner will have texture coordinates of (s_2
, t_2
).
This is a high level drawing api that can handle any kind of
CoglMetaTexture
texture such as CoglTexture2DSliced
textures
which may internally be comprised of multiple low-level textures.
This is unlike low-level drawing apis such as cogl_primitive_draw()
which only support low level texture types that are directly
supported by GPUs such as CoglTexture2D
.
s_1
=0.0 t_1
=0.0 s_2
=1.0 t_2
=1.0
The given texture coordinates should always be normalized such that
(0, 0) corresponds to the top left and (1, 1) corresponds to the
bottom right. To map an entire texture across the rectangle pass
in s_1
=0, t_1
=0, s_2
=1, t_2
=1.
Stability: | Unstable |
Available since: | 1.10 |
Parameters
pipeline |
CoglPipeline |
A |
|
The data is owned by the caller of the function. | |
x_1 |
float |
X coordinate upper left on screen. |
|
y_1 |
float |
Y coordinate upper left on screen. |
|
x_2 |
float |
X coordinate lower right on screen. |
|
y_2 |
float |
Y coordinate lower right on screen. |
|
s_1 |
float |
S texture coordinate of the top-left coorner. |
|
t_1 |
float |
T texture coordinate of the top-left coorner. |
|
s_2 |
float |
S texture coordinate of the bottom-right coorner. |
|
t_2 |
float |
T texture coordinate of the bottom-right coorner. |