### Method

# Cogl Framebuffer draw_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`).

The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.

This is a high level drawing api that can handle any kind of `CoglTexture` 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`.

The given texture coordinates will only be used for the first texture layer of the pipeline and if your pipeline has more than one layer then all other layers will have default texture coordinates of `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.

#### Parameters

`pipeline`

  Type: `CoglPipeline`

  A `CoglPipeline` state object.

  The data is owned by the caller of the method.

`x_1`

  Type: `float`

  X coordinate upper left on screen.

`y_1`

  Type: `float`

  Y coordinate upper left on screen.

`x_2`

  Type: `float`

  X coordinate lower right on screen.

`y_2`

  Type: `float`

  Y coordinate lower right on screen.

`s_1`

  Type: `float`

  S texture coordinate of the top-left coorner.

`t_1`

  Type: `float`

  T texture coordinate of the top-left coorner.

`s_2`

  Type: `float`

  S texture coordinate of the bottom-right coorner.

`t_2`

  Type: `float`

  T texture coordinate of the bottom-right coorner.