typedef void (GLAPIENTRY *array_func)( const void * );
typedef struct {
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
const struct gl_vertex_buffer_binding *binding;
int offset;
} AEarray;
typedef void (GLAPIENTRY *attrib_func)( GLuint indx, const void *data );
typedef struct {
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
const struct gl_vertex_buffer_binding *binding;
attrib_func func;
GLuint index;
typedef struct {
AEarray arrays[32];
AEattrib attribs[VERT_ATTRIB_MAX + 1];
- GLuint NewState;
+ GLbitfield NewState;
/* List of VBOs we need to map before executing ArrayElements */
struct gl_buffer_object *vbo[VERT_ATTRIB_MAX];
* Array [unnormalized/normalized/integer][size][type] of VertexAttrib
* functions
*/
-static attrib_func AttribFuncsARB[4][4][NUM_TYPES] = {
+static const attrib_func AttribFuncsARB[4][4][NUM_TYPES] = {
{
/* non-normalized */
{
/* conventional vertex arrays */
if (vao->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
aa->array = &vao->VertexAttrib[VERT_ATTRIB_COLOR_INDEX];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->binding->BufferObj);
aa++;
if (vao->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) {
aa->array = &vao->VertexAttrib[VERT_ATTRIB_EDGEFLAG];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
aa->offset = _gloffset_EdgeFlagv;
check_vbo(actx, aa->binding->BufferObj);
aa++;
if (vao->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
aa->array = &vao->VertexAttrib[VERT_ATTRIB_NORMAL];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->binding->BufferObj);
aa++;
if (vao->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) {
aa->array = &vao->VertexAttrib[VERT_ATTRIB_COLOR0];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->binding->BufferObj);
aa++;
if (vao->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) {
aa->array = &vao->VertexAttrib[VERT_ATTRIB_COLOR1];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->binding->BufferObj);
aa++;
if (vao->VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
aa->array = &vao->VertexAttrib[VERT_ATTRIB_FOG];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->binding->BufferObj);
aa++;
}
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- struct gl_vertex_attrib_array *attribArray =
+ struct gl_array_attributes *attribArray =
&vao->VertexAttrib[VERT_ATTRIB_TEX(i)];
if (attribArray->Enabled) {
/* NOTE: we use generic glVertexAttribNV functions here.
* If we ever remove GL_NV_vertex_program this will have to change.
*/
at->array = attribArray;
- at->binding = &vao->VertexBinding[attribArray->VertexBinding];
+ at->binding = &vao->BufferBinding[attribArray->BufferBindingIndex];
assert(!at->array->Normalized);
at->func = AttribFuncsNV[at->array->Normalized]
[at->array->Size-1]
/* generic vertex attribute arrays */
for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */
- struct gl_vertex_attrib_array *attribArray =
+ struct gl_array_attributes *attribArray =
&vao->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
if (attribArray->Enabled) {
GLint intOrNorm;
at->array = attribArray;
- at->binding = &vao->VertexBinding[attribArray->VertexBinding];
+ at->binding = &vao->BufferBinding[attribArray->BufferBindingIndex];
/* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV
* function pointer here (for float arrays) since the pointer may
* change from one execution of _ae_ArrayElement() to
* issued as the last (provoking) attribute).
*/
aa->array = &vao->VertexAttrib[VERT_ATTRIB_GENERIC0];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
assert(aa->array->Size >= 2); /* XXX fix someday? */
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->binding->BufferObj);
}
else if (vao->VertexAttrib[VERT_ATTRIB_POS].Enabled) {
aa->array = &vao->VertexAttrib[VERT_ATTRIB_POS];
- aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+ aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->binding->BufferObj);
aa++;
void
-_ae_invalidate_state(struct gl_context *ctx, GLuint new_state)
+_ae_invalidate_state(struct gl_context *ctx, GLbitfield new_state)
{
AEcontext *actx = AE_CONTEXT(ctx);