diff --git a/cogl/cogl-buffer-private.h b/cogl/cogl-buffer-private.h index ebd512ca0..4682e2f9b 100644 --- a/cogl/cogl-buffer-private.h +++ b/cogl/cogl-buffer-private.h @@ -68,6 +68,11 @@ typedef enum _CoglBufferFlags COGL_BUFFER_FLAG_MAPPED = 1UL << 1 } CoglBufferFlags; +typedef enum { + COGL_BUFFER_USAGE_HINT_TEXTURE, + COGL_BUFFER_USAGE_HINT_VERTICES +} CoglBufferUsageHint; + struct _CoglBuffer { CoglObject _parent; @@ -103,6 +108,10 @@ void _cogl_buffer_initialize (CoglBuffer *buffer, CoglBufferUsageHint usage_hint, CoglBufferUpdateHint update_hint); void _cogl_buffer_fini (CoglBuffer *buffer); + +CoglBufferUsageHint +_cogl_buffer_get_usage_hint (CoglBuffer *buffer); + void _cogl_buffer_bind (CoglBuffer *buffer, GLenum target); GLenum _cogl_buffer_access_to_gl_enum (CoglBufferAccess access); diff --git a/cogl/cogl-buffer.c b/cogl/cogl-buffer.c index f42641e99..d4734902d 100644 --- a/cogl/cogl-buffer.c +++ b/cogl/cogl-buffer.c @@ -205,28 +205,6 @@ cogl_buffer_get_size (CoglBuffer *buffer) return COGL_BUFFER (buffer)->size; } -void -cogl_buffer_set_usage_hint (CoglBuffer *buffer, - CoglBufferUsageHint hint) -{ - if (!cogl_is_buffer (buffer)) - return; - - if (G_UNLIKELY (hint > COGL_BUFFER_USAGE_HINT_TEXTURE)) - hint = COGL_BUFFER_USAGE_HINT_TEXTURE; - - buffer->usage_hint = hint; -} - -CoglBufferUsageHint -cogl_buffer_get_usage_hint (CoglBuffer *buffer) -{ - if (!cogl_is_buffer (buffer)) - return FALSE; - - return buffer->usage_hint; -} - void cogl_buffer_set_update_hint (CoglBuffer *buffer, CoglBufferUpdateHint hint) diff --git a/cogl/cogl-buffer.h b/cogl/cogl-buffer.h index 8406ba827..3688c7802 100644 --- a/cogl/cogl-buffer.h +++ b/cogl/cogl-buffer.h @@ -90,50 +90,6 @@ cogl_is_buffer (const void *object); unsigned int cogl_buffer_get_size (CoglBuffer *buffer); -/** - * CoglBufferUsageHint: - * @COGL_BUFFER_USAGE_HINT_TEXTURE: the buffer will be used as a source data - * for a texture - * - * The usage hint on a buffer allows the user to give some clue on how the - * buffer will be used. - * - * Since: 1.2 - * Stability: Unstable - */ -typedef enum { /*< prefix=COGL_BUFFER_USAGE_HINT >*/ - COGL_BUFFER_USAGE_HINT_TEXTURE, -} CoglBufferUsageHint; - -/** - * cogl_buffer_set_usage_hint: - * @buffer: a buffer object - * @hint: the new hint - * - * Sets the usage hint on a buffer. See #CoglBufferUsageHint for a description - * of the available hints. - * - * Since: 1.2 - * Stability: Unstable - */ -void -cogl_buffer_set_usage_hint (CoglBuffer *buffer, - CoglBufferUsageHint hint); - -/** - * cogl_buffer_get_usage_hint: - * @buffer: a buffer object - * - * Retrieves the usage hint set using cogl_buffer_set_usage_hint() - * - * Return value: the #CoglBufferUsageHint currently used by the buffer - * - * Since: 1.2 - * Stability: Unstable - */ -CoglBufferUsageHint -cogl_buffer_get_usage_hint (CoglBuffer *buffer); - /** * CoglBufferUpdateHint: * @COGL_BUFFER_UPDATE_HINT_STATIC: the buffer will not change over time