1
0
Fork 0
mutter-performance-source/tests/conform
Neil Roberts eb7ef457cb 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: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 568677ab3bcb62ababad1623be0d6b9b117d0a26)

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
2014-01-20 14:40:45 +00:00
..
Makefile.am Add support for RG textures 2014-01-20 14:40:45 +00:00
test-alpha-test.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-alpha-textures.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-atlas-migration.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-backface-culling.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-blend-strings.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-blend.c Add _primitive_draw to replace _framebuffer_draw_primitive 2013-07-29 18:31:36 +01:00
test-color-hsl.c Declare interface types as void and remove cast macros 2013-11-27 19:33:44 +00:00
test-color-mask.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-conform-main.c Add support for RG textures 2014-01-20 14:40:45 +00:00
test-copy-replace-texture.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-custom-attributes.c gl: bind position attribute to location 0 2013-08-19 22:44:45 +01:00
test-depth-test.c Add API to control per-framebuffer depth writing 2013-10-28 16:34:58 +00:00
test-euler-quaternion.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-fence.c Declare interface types as void and remove cast macros 2013-11-27 19:33:44 +00:00
test-fixed.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-fixtures.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-framebuffer-get-bits.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-gles2-context.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-just-vertex-shader.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-layer-remove.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-map-buffer-range.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-materials.c tests: stop using cogl-auto-texture apis 2013-07-29 17:56:07 +01:00
test-multitexture.c tests: stop using cogl-auto-texture apis 2013-07-29 17:56:07 +01:00
test-no-gl-header.c Don't include cogl/cogl.h from test-utils.h 2013-07-04 11:50:31 +01:00
test-npot-texture.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-object.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-offscreen.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-path-clip.c Add a test for cogl_framebuffer_push_path_clip 2013-12-03 15:28:24 +00:00
test-path.c Separate out CoglPath api into sub-library 2013-08-19 22:44:35 +01:00
test-pipeline-cache-unrefs-texture.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-pipeline-shader-state.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-pipeline-uniforms.c tests: Don't report success when the test is skipped 2013-01-22 17:48:06 +00:00
test-pipeline-user-matrix.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-pixel-buffer.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-point-size-attribute.c Add _primitive_draw to replace _framebuffer_draw_primitive 2013-07-29 18:31:36 +01:00
test-point-size.c Add _primitive_draw to replace _framebuffer_draw_primitive 2013-07-29 18:31:36 +01:00
test-point-sprite.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-premult.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-primitive-and-journal.c Add _primitive_draw to replace _framebuffer_draw_primitive 2013-07-29 18:31:36 +01:00
test-primitive.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-read-texture-formats.c Add support for RG textures 2014-01-20 14:40:45 +00:00
test-readpixels.c offscreen: rename _new_to_texture to _new_with_texture 2013-08-19 22:44:44 +01:00
test-snippets.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-sparse-pipeline.c tests: update inline with master 2013-01-22 17:48:06 +00:00
test-sub-texture.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-texture-3d.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-texture-get-set-data.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-texture-mipmaps.c tests: stop using cogl-auto-texture apis 2013-07-29 17:56:07 +01:00
test-texture-no-allocate.c texture-rectangle: update _new_with_size in line with master 2014-01-13 17:35:05 +00:00
test-texture-pixmap-x11.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-texture-rectangle.c tests: stop using cogl-auto-texture apis 2013-07-29 17:56:07 +01:00
test-texture-rg.c Add support for RG textures 2014-01-20 14:40:45 +00:00
test-version.c Declare interface types as void and remove cast macros 2013-11-27 19:33:44 +00:00
test-vertex-buffer-contiguous.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-vertex-buffer-interleved.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-vertex-buffer-mutability.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-viewport.c offscreen: rename _new_to_texture to _new_with_texture 2013-08-19 22:44:44 +01:00
test-wrap-modes.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-wrap-rectangle-textures.c remove internal_format and redundant error arguments 2014-01-09 15:49:47 +00:00
test-write-texture-formats.c Add support for RG textures 2014-01-20 14:40:45 +00:00