Skip to content
Commit eb7ef457 authored by Neil Roberts's avatar Neil Roberts
Browse files

Add support for RG textures

This adds COGL_PIXEL_FORMAT_RG_88 and COGL_TEXTURE_COMPONENTS_RG in
order to support two-component textures. The RG components for a
texture is only supported if COGL_FEATURE_ID_TEXTURE_RG is advertised.
This is only available on GL 3, GL 2 with the GL_ARB_texture_rg
extension or GLES with the GL_EXT_texture_rg extension. The RG pixel
format is always supported for images because Cogl can easily do the
conversion if an application uses this format to upload to a texture
with a different format.

If an application tries to create an RG texture when the feature isn't
supported then it will raise an error when the texture is allocated.

https://bugzilla.gnome.org/show_bug.cgi?id=712830



Reviewed-by: default avatarRobert Bragg <robert@linux.intel.com>

(cherry picked from commit 568677ab)

Conflicts:
	cogl/cogl-bitmap-packing.h
	cogl/cogl-types.h
	cogl/driver/gl/gl/cogl-driver-gl.c
	tests/conform/test-read-texture-formats.c
	tests/conform/test-write-texture-formats.c
parent 06c75ea2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment