Gjsify LogoGjsify Logo

The wrap mode specifies what happens when texture coordinates outside the range 0→1 are used. Note that if the filter mode is anything but %COGL_PIPELINE_FILTER_NEAREST then texels outside the range 0→1 might be used even when the coordinate is exactly 0 or 1 because OpenGL will try to sample neighbouring pixels. For example if you are trying to render the full texture then you may get artifacts around the edges when the pixels from the other side are merged in if the wrap mode is set to repeat.

Index

Enumeration Members

AUTOMATIC: number

Cogl will try to automatically decide which of the above two to use. For cogl_rectangle(), it will use repeat mode if any of the texture coordinates are outside the range 0→1, otherwise it will use clamp to edge. For cogl_polygon() it will always use repeat mode. For cogl_vertex_buffer_draw() it will use repeat mode except for layers that have point sprite coordinate generation enabled. This is the default value.

CLAMP_TO_EDGE: number

The coordinates outside the range 0→1 will sample copies of the edge pixels of the texture. This is useful to avoid artifacts if only one copy of the texture is being rendered.

MIRRORED_REPEAT: number
REPEAT: number

The texture will be repeated. This is useful for example to draw a tiled background.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method