mutter/tests/conform
Neil Roberts 2616ae0fa9 Add a GL 3 driver
This adds a new CoglDriver for GL 3 called COGL_DRIVER_GL3. When
requested, the GLX, EGL and SDL2 winsyss will set the necessary
attributes to request a forward-compatible core profile 3.1 context.
That means it will have no deprecated features.

To simplify the explosion of checks for specific combinations of
context->driver, many of these conditionals have now been replaced
with private feature flags that are checked instead. The GL and GLES
drivers now initialise these private feature flags depending on which
driver is used.

The fixed function backends now explicitly check whether the fixed
function private feature is available which means the GL3 driver will
fall back to always using the GLSL progend. Since Rob's latest patches
the GLSL progend no longer uses any fixed function API anyway so it
should just work.

The driver is currently lower priority than COGL_DRIVER_GL so it will
not be used unless it is specificly requested. We may want to change
this priority at some point because apparently Mesa can make some
memory savings if a core profile context is used.

In GL 3, getting the combined extensions string with glGetString is
deprecated so this patch changes it to use glGetStringi to build up an
array of extensions instead. _cogl_context_get_gl_extensions now
returns this array instead of trying to return a const string. The
caller is expected to free the array.

Some issues with this patch:

• GL 3 does not support GL_ALPHA format textures. We should probably
  make this a feature flag or something. Cogl uses this to render text
  which currently just throws a GL error and breaks so it's pretty
  important to do something about this before considering the GL3
  driver to be stable.

• GL 3 doesn't support client side vertex buffers. This probably
  doesn't matter because CoglBuffer won't normally use malloc'd
  buffers if VBOs are available, but it might but worth making
  malloc'd buffers a private feature and forcing it not to use them.

• GL 3 doesn't support the default vertex array object. This patch
  just makes it create and bind a single non-default vertex array
  object which gets used just like the normal default object. Ideally
  it would be good to use vertex array objects properly and attach
  them to a CoglPrimitive to cache the state.

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

(cherry picked from commit 66c9db993595b3a22e63f4c201ea468bc9b88cb6)
2013-01-22 17:48:01 +00:00
..
config.env.in tests: Improve thoroughness and reporting of make test 2012-02-24 14:42:31 +00:00
Makefile.am build: don't include deps/glib headers if glib enabled 2013-01-22 17:47:58 +00:00
run-tests.sh Add a GL 3 driver 2013-01-22 17:48:01 +00:00
test-atlas-migration.c Convert the test-atlas-migration test to a standalone Cogl test 2012-08-06 14:27:42 +01:00
test-backface-culling.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-bitmask.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-blend-strings.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-color-mask.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-conform-main.c cogl-gles2-context: Wrap glCopyTex{Sub,}Image2D to flip the result 2012-08-15 13:46:20 +01:00
test-custom-attributes.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-depth-test.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-euler-quaternion.c Add a basic conformance test for eulers and quaternions 2012-08-06 14:27:43 +01: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-gles2-context.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-just-vertex-shader.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-launcher.sh.in tests: Improve thoroughness and reporting of make test 2012-02-24 14:42:31 +00:00
test-layer-remove.c Add a conformance test for removing a pipeline layer 2012-08-06 14:27:45 +01:00
test-materials.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-multitexture.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-no-gl-header.c Mass rename CLUTTER_COMPILATION to COGL_COMPILATION 2012-08-06 14:27:45 +01:00
test-npot-texture.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-object.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-offscreen.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-path.c Replace cogl_path_{stroke,fill} with framebuffer API 2012-08-06 14:27:39 +01:00
test-pipeline-uniforms.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-pipeline-user-matrix.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-pixel-buffer.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-point-size.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-point-sprite.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-premult.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-primitive.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-read-texture-formats.c tests: Don't use g_test_verbose() as cogl doesn't use GTest anymore 2013-01-22 17:47:24 +00:00
test-readpixels.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-snippets.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-sparse-pipeline.c Adds cogl_framebuffer_draw_[*_]rectangle functions 2012-03-20 12:33:40 +00:00
test-sub-texture.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-texture-3d.c Adds CoglError api 2013-01-22 17:47:39 +00:00
test-texture-get-set-data.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-texture-mipmaps.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01: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 Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-utils.c Add a GL 3 driver 2013-01-22 17:48:01 +00:00
test-utils.h Adds gles2-context renderer constraint 2012-08-06 14:27:43 +01:00
test-version.c Add a cogl-version header 2012-08-06 14:27:40 +01: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 Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-wrap-modes.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
test-write-texture-formats.c tests: Don't use g_test_verbose() as cogl doesn't use GTest anymore 2013-01-22 17:47:24 +00:00