1
0
Fork 0

Rename COGL_ERROR_MISSING_FEATURE to COGL_ERROR_UNSUPPORTED

We can use this error in more unsupported situations than just when we
have a Cogl feature flag for the error. For example if a non-sliced
texture is created with dimensions that are too large then we could
throw this error. Therefore it seems good to rename to something more
general.
This commit is contained in:
Neil Roberts 2010-07-13 12:59:24 +01:00
parent c3489a0a22
commit 396ef40d43
2 changed files with 20 additions and 5 deletions

View file

@ -2556,7 +2556,7 @@ cogl_material_set_layer_point_sprite_coords_enabled (CoglMaterial *material,
{
if (error)
{
g_set_error (error, COGL_ERROR, COGL_ERROR_MISSING_FEATURE,
g_set_error (error, COGL_ERROR, COGL_ERROR_UNSUPPORTED,
"Point sprite texture coordinates are enabled "
"for a layer but the GL driver does not support it.");
}
@ -4345,7 +4345,7 @@ cogl_material_set_depth_range (CoglMaterial *material,
#else
g_set_error (error,
COGL_ERROR,
COGL_ERROR_MISSING_FEATURE,
COGL_ERROR_UNSUPPORTED,
"glDepthRange not available on GLES 1");
return FALSE;
#endif

View file

@ -429,18 +429,33 @@ cogl_blend_string_error_quark (void);
/**
* CoglError:
* @COGL_ERROR_MISSING_FEATURE: You tried to use a feature not
* currently available; likely because of missing driver support.
* @COGL_ERROR_UNSUPPORTED: You tried to use a feature or
* configuration not currently available.
*
* Error enumeration for Cogl
*
* The @COGL_ERROR_UNSUPPORTED error can be thrown for a variety of
* reasons. For example:
*
* <itemizedlist>
* <listitem><para>You've tried to use a feature that is not
* advertised by cogl_get_features(). This could happen if you create
* a non-sliced texture with a non-power-of-two size when
* %COGL_FEATURE_TEXTURE_NPOT is not advertised.</para></listitem>
* <listitem><para>The GPU can not handle the configuration you have
* requested. An example might be if you try to use too many texture
* layers in a single #CoglMaterial</para></listitem>
* <listitem><para>The driver does not support some
* configuration.</para></listiem>
* </itemizedlist>
*
* Currently this is only used by Cogl API marked as experimental so
* this enum should also be considered experimental.
*
* Since: 1.4
*/
typedef enum { /*< prefix=COGL_ERROR >*/
COGL_ERROR_MISSING_FEATURE
COGL_ERROR_UNSUPPORTED
} CoglError;
GQuark