cogl: Adds a COGL_FEATURE_SHADERS_ARBFP feature flag

This adds a public feature flag for ARBfp so developers can determine if
the cogl API supports ARBfp or not.
This commit is contained in:
Robert Bragg 2010-08-05 10:59:03 +01:00
parent b025a4a020
commit 11045c724c
5 changed files with 8 additions and 6 deletions

View File

@ -219,7 +219,7 @@ _cogl_xlib_remove_filter (CoglXlibFilterFunc func,
typedef enum _CoglFeatureFlagsPrivate
{
COGL_FEATURE_PRIVATE_ARB_FP = (1 << 0)
COGL_FEATURE_PRIVATE_PLACE_HOLDER = (1 << 0)
} CoglFeatureFlagsPrivate;
gboolean

View File

@ -256,7 +256,7 @@ _cogl_material_backend_arbfp_start (CoglMaterial *material,
_COGL_GET_CONTEXT (ctx, FALSE);
if (!_cogl_features_available_private (COGL_FEATURE_PRIVATE_ARB_FP))
if (!cogl_features_available (COGL_FEATURE_SHADERS_ARBFP))
return FALSE;
/* TODO: support fog */

View File

@ -226,6 +226,7 @@ typedef enum { /*< prefix=COGL_PIXEL_FORMAT >*/
* @COGL_FEATURE_TEXTURE_YUV: ycbcr conversion support
* @COGL_FEATURE_TEXTURE_READ_PIXELS: glReadPixels() support
* @COGL_FEATURE_SHADERS_GLSL: GLSL support
* @COGL_FEATURE_SHADERS_ARBFP: ARBFP support
* @COGL_FEATURE_OFFSCREEN: FBO support
* @COGL_FEATURE_OFFSCREEN_MULTISAMPLE: Multisample support on FBOs
* @COGL_FEATURE_OFFSCREEN_BLIT: Blit support on FBOs
@ -276,7 +277,8 @@ typedef enum
COGL_FEATURE_TEXTURE_NPOT_MIPMAP = (1 << 16),
COGL_FEATURE_TEXTURE_NPOT_REPEAT = (1 << 17),
COGL_FEATURE_POINT_SPRITE = (1 << 18),
COGL_FEATURE_TEXTURE_3D = (1 << 19)
COGL_FEATURE_TEXTURE_3D = (1 << 19),
COGL_FEATURE_SHADERS_ARBFP = (1 << 20)
} CoglFeatureFlags;
/**

View File

@ -522,7 +522,7 @@ _cogl_features_available_private (CoglFeatureFlagsPrivate features)
_cogl_features_init ();
if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_DISABLE_ARBFP))
ctx->feature_flags_private &= ~COGL_FEATURE_PRIVATE_ARB_FP;
ctx->feature_flags_private &= ~COGL_FEATURE_SHADERS_ARBFP;
return (ctx->feature_flags_private & features) == features;
}

View File

@ -119,8 +119,8 @@ COGL_FEATURE_END ()
COGL_FEATURE_BEGIN (arbfp, 255, 255,
"ARB\0",
"fragment_program\0",
0,
COGL_FEATURE_PRIVATE_ARB_FP)
COGL_FEATURE_SHADERS_ARBFP,
0)
COGL_FEATURE_FUNCTION (void, glGenPrograms,
(GLsizei n,
GLuint *programs))