4 * An object oriented GL/GLES Abstraction/Utility Layer
6 * Copyright (C) 2010 Intel Corporation.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library. If not, see <http://www.gnu.org/licenses/>.
24 * Robert Bragg <robert@linux.intel.com>
27 #if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
28 #error "Only <cogl/cogl.h> can be included directly."
31 #ifndef __COGL_ATTRIBUTE_BUFFER_H__
32 #define __COGL_ATTRIBUTE_BUFFER_H__
34 /* We forward declare the CoglAttributeBuffer type here to avoid some circular
35 * dependency issues with the following headers.
37 typedef struct _CoglAttributeBuffer CoglAttributeBuffer;
39 #include <cogl/cogl-context.h>
44 * SECTION:cogl-attribute-buffer
45 * @short_description: Functions for creating and manipulating attribute
51 #define COGL_ATTRIBUTE_BUFFER(buffer) ((CoglAttributeBuffer *)(buffer))
54 * cogl_attribute_buffer_new:
55 * @context: A #CoglContext
56 * @bytes: The number of bytes to allocate for vertex attribute data.
57 * @data: An optional pointer to vertex data to upload immediately.
59 * Declares a new #CoglAttributeBuffer of @size bytes to contain arrays of vertex
60 * attribute data. Once declared, data can be set using cogl_buffer_set_data()
61 * or by mapping it into the application's address space using cogl_buffer_map().
63 * If @data isn't %NULL then @size bytes will be read from @data and
64 * immediately copied into the new buffer.
70 cogl_attribute_buffer_new (CoglContext *context,
75 * cogl_is_attribute_buffer:
76 * @object: A #CoglObject
78 * Gets whether the given object references a #CoglAttributeBuffer.
80 * Returns: %TRUE if the handle references a #CoglAttributeBuffer,
87 cogl_is_attribute_buffer (void *object);
91 #endif /* __COGL_ATTRIBUTE_BUFFER_H__ */