Adds support for a mirrored repeat wrap mode
This adds COGL_PIPELINE_WRAP_MODE_MIRRORED_REPEAT enum so that mirrored texture repeating can be used. This also adds support for emulating the MIRRORED_REPEAT mode via the cogl-spans API so it can also be used with meta textures such as sliced and atlas textures. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
@ -41,6 +41,9 @@
|
||||
#ifndef GL_CLAMP_TO_BORDER
|
||||
#define GL_CLAMP_TO_BORDER 0x812d
|
||||
#endif
|
||||
#ifndef GL_MIRRORED_REPEAT
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
#endif
|
||||
|
||||
typedef struct _CoglPipelineLayer CoglPipelineLayer;
|
||||
#define COGL_PIPELINE_LAYER(OBJECT) ((CoglPipelineLayer *)OBJECT)
|
||||
@ -54,6 +57,7 @@ typedef struct _CoglPipelineLayer CoglPipelineLayer;
|
||||
typedef enum _CoglPipelineWrapModeInternal
|
||||
{
|
||||
COGL_PIPELINE_WRAP_MODE_INTERNAL_REPEAT = GL_REPEAT,
|
||||
COGL_PIPELINE_WRAP_MODE_INTERNAL_MIRRORED_REPEAT = GL_MIRRORED_REPEAT,
|
||||
COGL_PIPELINE_WRAP_MODE_INTERNAL_CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE,
|
||||
COGL_PIPELINE_WRAP_MODE_INTERNAL_CLAMP_TO_BORDER = GL_CLAMP_TO_BORDER,
|
||||
COGL_PIPELINE_WRAP_MODE_INTERNAL_AUTOMATIC = GL_ALWAYS
|
||||
|
Reference in New Issue
Block a user