0d58bb75ac2fc9b9346d66438cd5b0cff2a31e92
2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
6 * (C) Copyright IBM Corporation 2006
7 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL OR IBM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 #include "glformats.h"
39 * Functions for the GL_APPLE_vertex_array_object extension.
41 * \author Ian Romanick <idr@us.ibm.com>
49 extern struct gl_array_object
*
50 _mesa_new_array_object( struct gl_context
*ctx
, GLuint name
);
53 _mesa_delete_array_object( struct gl_context
*ctx
, struct gl_array_object
*obj
);
56 _mesa_reference_array_object_(struct gl_context
*ctx
,
57 struct gl_array_object
**ptr
,
58 struct gl_array_object
*arrayObj
);
61 _mesa_reference_array_object(struct gl_context
*ctx
,
62 struct gl_array_object
**ptr
,
63 struct gl_array_object
*arrayObj
)
66 _mesa_reference_array_object_(ctx
, ptr
, arrayObj
);
71 _mesa_initialize_array_object( struct gl_context
*ctx
,
72 struct gl_array_object
*obj
, GLuint name
);
76 _mesa_update_array_object_max_element(struct gl_context
*ctx
,
77 struct gl_array_object
*arrayObj
);
79 /** Returns the bitmask of all enabled arrays in fixed function mode.
81 * In fixed function mode only the traditional fixed function arrays
84 static inline GLbitfield64
85 _mesa_array_object_get_enabled_ff(const struct gl_array_object
*arrayObj
)
87 return arrayObj
->_Enabled
& VERT_BIT_FF_ALL
;
90 /** Returns the bitmask of all enabled arrays in arb/glsl shader mode.
92 * In arb/glsl shader mode all the fixed function and the arb/glsl generic
93 * arrays are available. Only the first generic array takes
94 * precedence over the legacy position array.
96 static inline GLbitfield64
97 _mesa_array_object_get_enabled_arb(const struct gl_array_object
*arrayObj
)
99 GLbitfield64 enabled
= arrayObj
->_Enabled
;
100 return enabled
& ~(VERT_BIT_POS
& (enabled
>> VERT_ATTRIB_GENERIC0
));
109 void GLAPIENTRY
_mesa_BindVertexArray( GLuint id
);
111 void GLAPIENTRY
_mesa_BindVertexArrayAPPLE( GLuint id
);
113 void GLAPIENTRY
_mesa_DeleteVertexArrays(GLsizei n
, const GLuint
*ids
);
115 void GLAPIENTRY
_mesa_GenVertexArrays(GLsizei n
, GLuint
*arrays
);
117 void GLAPIENTRY
_mesa_GenVertexArraysAPPLE(GLsizei n
, GLuint
*buffer
);
119 GLboolean GLAPIENTRY
_mesa_IsVertexArray( GLuint id
);
121 #endif /* ARRAYOBJ_H */