Home | History | Annotate | Download | only in main

Lines Matching refs:Array

111  * \param attrib  the attribute array index to update
120 * \param ptr the address (or offset inside VBO) of the array data
131 struct gl_client_array *array;
138 * "Client vertex arrays - all vertex array attribute pointers must
139 * refer to buffer objects (section 2.9.2). The default vertex array
141 * VertexAttribPointer when no buffer object or no vertex array object
147 && (ctx->Array.ArrayObj == ctx->Array.DefaultArrayObj)) {
148 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(no array object bound)",
244 * organization of vertex array data are called while zero is bound
248 if (ptr != NULL && ctx->Array.ArrayObj->ARBsemantics &&
249 !_mesa_is_bufferobj(ctx->Array.ArrayBufferObj)) {
250 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-VBO array)", func);
256 array = &ctx->Array.ArrayObj->VertexAttrib[attrib];
257 array->Size = size;
258 array->Type = type;
259 array->Format = format;
260 array->Stride = stride;
261 array->StrideB = stride ? stride : elementSize;
262 array->Normalized = normalized;
263 array->Integer = integer;
264 array->Ptr = (const GLubyte *) ptr;
265 array->_ElementSize = elementSize;
267 _mesa_reference_buffer_object(ctx, &array->BufferObj,
268 ctx->Array.ArrayBufferObj);
271 ctx->Array.ArrayObj->NewArrays |= VERT_BIT(attrib);
390 const GLuint unit = ctx->Array.ActiveTexture;
436 * Set a vertex attribute array.
470 * Set a generic vertex attribute array.
503 * Set an integer-valued vertex attribute array.
544 arrayObj = ctx->Array.ArrayObj;
571 arrayObj = ctx->Array.ArrayObj;
586 * Return info for a vertex attribute array (no alias with legacy
594 const struct gl_client_array *array;
601 ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib));
603 array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)];
607 return array->Enabled;
609 return array->Size;
611 return array->Stride;
613 return array->Type;
615 return array->Normalized;
617 return array->BufferObj->Name;
622 return array->Integer;
628 return array->InstanceDivisor;
662 ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib));
790 ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib));
792 *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Ptr;
1044 if (ctx->Array.LockCount != 0) {
1049 ctx->Array.LockFirst = first;
1050 ctx->Array.LockCount = count;
1065 if (ctx->Array.LockCount == 0) {
1070 ctx->Array.LockFirst = 0;
1071 ctx->Array.LockCount = 0;
1151 if (ctx->Array.RestartIndex != index) {
1153 ctx->Array.RestartIndex = index;
1166 struct gl_client_array *array;
1181 ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib));
1183 array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)];
1184 if (array->InstanceDivisor != divisor) {
1186 array->InstanceDivisor = divisor;
1187 ctx->Array.ArrayObj->NewArrays |= VERT_BIT(VERT_ATTRIB_GENERIC(index));
1194 * Copy one client vertex array to another.
1219 * Print vertex array's fields.
1222 print_array(const char *name, GLint index, const struct gl_client_array *array)
1229 array->Ptr, array->Type, array->Size,
1230 array->_ElementSize, array->StrideB,
1231 array->BufferObj->Name, (unsigned long) array->BufferObj->Size,
1232 array->_MaxElement);
1237 * Print current vertex object/array info. For debug.
1242 struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
1247 printf("Array Object %u\n", arrayObj->Name);
1265 * Initialize vertex array state for given context.
1270 ctx->Array.DefaultArrayObj = ctx->Driver.NewArrayObject(ctx, 0);
1271 _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj,
1272 ctx->Array.DefaultArrayObj);
1273 ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */
1275 ctx->Array.Objects = _mesa_NewHashTable();
1280 * Callback for deleting an array object. Called by _mesa_HashDeleteAll().
1292 * Free vertex array state for given context.
1297 _mesa_HashDeleteAll(ctx->Array.Objects, delete_arrayobj_cb, ctx);
1298 _mesa_DeleteHashTable(ctx->Array.Objects);