mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
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:
parent
f781bcec7e
commit
5741e28cdc
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user