summaryrefslogtreecommitdiff
path: root/src/mesa/main/mtypes.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-09-17 03:40:11 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-09-17 03:40:11 +0000
commit148a2847a105ce9d9189ad3081091de60f803a33 (patch)
tree103a9c215249d036f6bd44ffb8db812ca903f3ad /src/mesa/main/mtypes.h
parent4561f8418331f74cabf29649e9a4df7e92504a90 (diff)
More work on ARB_vertex_buffer_object.
Use GLubyte * instead of void * for gl_client_array->Ptr to simplify upcoming pointer arithmetic changes.
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r--src/mesa/main/mtypes.h50
1 files changed, 29 insertions, 21 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a2acb1f400..341a028ee6 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1252,6 +1252,22 @@ struct gl_attrib_node {
/**
+ * GL_ARB_vertex_buffer_object buffer object
+ */
+struct gl_buffer_object {
+ GLint RefCount;
+ GLuint Name;
+ GLenum Target;
+ GLenum Usage;
+ GLenum Access;
+ GLvoid *Pointer; /**< Only valid while buffer is mapped */
+ GLuint Size; /**< Size of data array in bytes */
+ GLubyte *Data; /**< The storage */
+};
+
+
+
+/**
* Client pixel packing/unpacking attributes
*/
struct gl_pixelstore_attrib {
@@ -1279,11 +1295,13 @@ struct gl_client_array {
GLenum Type;
GLsizei Stride; /**< user-specified stride */
GLsizei StrideB; /**< actual stride in bytes */
- void *Ptr;
+ GLubyte *Ptr;
GLuint Flags;
GLuint Enabled; /**< one of the _NEW_ARRAY_ bits */
GLboolean Normalized; /**< GL_ARB_vertex_program */
- GLuint BufferBinding; /**< GL_ARB_vertex_buffer_object */
+
+ /**< GL_ARB_vertex_buffer_object */
+ struct gl_buffer_object *BufferObj;
};
@@ -1304,15 +1322,17 @@ struct gl_array_attrib {
GLint TexCoordInterleaveFactor;
GLint ActiveTexture; /**< Client Active Texture */
- GLuint LockFirst;
- GLuint LockCount;
+ GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */
+ GLuint LockCount; /**< GL_EXT_compiled_vertex_array */
GLuint _Enabled; /**< _NEW_ARRAY_* - bit set if array enabled */
GLuint NewState; /**< _NEW_ARRAY_* */
- /* GL_ARB_vertex_buffer_object */
- GLuint ArrayBufferBinding;
- GLuint ElementArrayBufferBinding;
+#if FEATURE_ARB_vertex_buffer_object
+ struct gl_buffer_object *NullBufferObj;
+ struct gl_buffer_object *ArrayBufferObj;
+ struct gl_buffer_object *ElementArrayBufferObj;
+#endif
};
@@ -1589,8 +1609,9 @@ struct gl_shared_state
#endif
/*@}*/
- /** GL_ARB_vertex_buffer_objects */
+#if FEATURE_ARB_vertex_buffer_object
struct _mesa_HashTable *BufferObjects;
+#endif
void *DriverData; /**< Device driver shared state */
};
@@ -1979,7 +2000,6 @@ typedef union node Node;
/* This has to be included here. */
-struct gl_buffer_object;
#include "dd.h"
@@ -2216,18 +2236,6 @@ struct __GLcontextRec {
struct gl_tnl_module TnlModule;
/**
- * \name GL_ARB_vertex_buffer_object state
- *
- * These pointers track the buffer objects last bound via
- * \c glBindBufferObjectARB. If it the last bound object ID was 0 for a
- * given target, the pointer will be \c NULL.
- */
- /*@{*/
- struct gl_buffer_object * ArrayBuffer;
- struct gl_buffer_object * ElementArrayBuffer;
- /*@}*/
-
- /**
* \name Hooks for module contexts.
*
* These will eventually live in the driver or elsewhere.