make COGL_FEATURE_VBOS a private feature

Cogl provides a consistent public interface regardless of whether the
underlying GL driver supports VBOs so it doesn't make much sense to have
this feature as part of the public api.  We can't break the api by
removing the enum but at least we no longer ever set the feature flag.

We now have a replacement private feature flag COGL_PRIVATE_FEATURE_VBOS
which cogl now checks for internally.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg
2011-10-13 09:36:46 +01:00
parent 69b44ac86d
commit c86f698eb9
7 changed files with 20 additions and 9 deletions

View File

@ -32,6 +32,7 @@
#include "cogl-object-private.h"
#include "cogl-attribute-buffer.h"
#include "cogl-attribute-buffer-private.h"
#include "cogl-context-private.h"
static void _cogl_attribute_buffer_free (CoglAttributeBuffer *array);
@ -43,7 +44,9 @@ cogl_attribute_buffer_new (gsize bytes, const void *data)
CoglAttributeBuffer *array = g_slice_new (CoglAttributeBuffer);
gboolean use_malloc;
if (!cogl_features_available (COGL_FEATURE_VBOS))
_COGL_GET_CONTEXT (ctx, NULL);
if (!(ctx->private_feature_flags & COGL_PRIVATE_FEATURE_VBOS))
use_malloc = TRUE;
else
use_malloc = FALSE;