Lines Matching refs:Array
31 * Implementation of Vertex Array Objects (VAOs), from OpenGL 3.1+ /
58 * Look up the array object for the given ID.
61 * Either a pointer to the array object with the specified ID or \c NULL for
74 if (ctx->Array.LastLookedUpVAO &&
75 ctx->Array.LastLookedUpVAO->Name == id) {
76 vao = ctx->Array.LastLookedUpVAO;
79 _mesa_HashLookupLocked(ctx->Array.Objects, id);
81 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, vao);
90 * Looks up the array object for the given ID.
93 * error if the array object does not exist. It also returns the default
94 * array object when ctx is a compatibility profile context and id is zero.
102 * zero, indicating the default vertex array object, or]
103 * the name of the vertex array object."
113 return ctx->Array.DefaultVAO;
117 if (ctx->Array.LastLookedUpVAO &&
118 ctx->Array.LastLookedUpVAO->Name == id) {
119 vao = ctx->Array.LastLookedUpVAO;
122 _mesa_HashLookupLocked(ctx->Array.Objects, id);
128 * vertex array object."
136 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, vao);
145 * For all the vertex binding points in the array object, unbind any pointers
147 * This is done just prior to array object destruction.
163 * Allocate and initialize a new vertex array object.
176 * Delete an array object.
201 /* Unreference the old array object */
215 /* reference new array object */
225 * Initialize attribtes of a vertex array within a vertex array object.
226 * \param vao the container vertex array object
227 * \param index which array in the VAO to initialize
236 struct gl_array_attributes *array = &vao->VertexAttrib[index];
239 array->Size = size;
240 array->Type = type;
241 array->Format = GL_RGBA; /* only significant for GL_EXT_vertex_array_bgra */
242 array->Stride = 0;
243 array->Ptr = NULL;
244 array->RelativeOffset = 0;
245 array->Enabled = GL_FALSE;
246 array->Normalized = GL_FALSE;
247 array->Integer = GL_FALSE;
248 array->Doubles = GL_FALSE;
249 array->_ElementSize = size * _mesa_sizeof_type(type);
250 array->BufferBindingIndex = index;
253 binding->Stride = array->_ElementSize;
257 /* Vertex array buffers */
359 * may contain array attributes that are bound but not enabled.
407 struct gl_vertex_array_object *const oldObj = ctx->Array.VAO;
413 return; /* rebinding the same array object- no change */
416 * Get pointer to new array object (newObj)
419 /* The spec says there is no array object named 0, but we use
422 newObj = ctx->Array.DefaultVAO;
425 /* non-default array object */
436 if (ctx->Array.DrawMethod == DRAW_ARRAYS) {
447 ctx->Array._DrawArrays = NULL;
448 ctx->Array.DrawMethod = DRAW_NONE;
452 _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj);
473 * Delete a set of array objects.
475 * \param n Number of array objects to delete.
476 * \param ids Array of \c n array object IDs.
489 /* If the array object is currently bound, the spec says "the binding
490 * for that object reverts to zero and the default vertex array
493 if (obj == ctx->Array.VAO)
497 _mesa_HashRemoveLocked(ctx->Array.Objects, obj->Name);
499 if (ctx->Array.LastLookedUpVAO == obj)
500 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, NULL);
502 /* Unreference the array object.
534 * Generate a set of unique array object IDs and store them in \c arrays.
539 * \param arrays Array of \c n locations to store the IDs.
553 first = _mesa_HashFindFreeKeyBlock(ctx->Array.Objects, n);
555 /* For the sake of simplicity we create the array objects in both
569 _mesa_HashInsertLocked(ctx->Array.Objects, obj->Name, obj);
610 * Generates ID's and creates the array objects.
629 * Determine if ID is the name of an array object.
631 * \param id ID of the potential array object.
632 * \return \c GL_TRUE if \c id is the name of a array object,
649 * Sets the element array buffer binding of a vertex array object.
668 * zero or] the name of an existing vertex array object."
726 * vertex array object."