Home | History | Annotate | Download | only in main

Lines Matching refs:array

31  * Implementation of Vertex Array Objects (VAOs), from OpenGL 3.1+,
59 * Look up the array object for the given ID.
62 * Either a pointer to the array object with the specified ID or \c NULL for
74 _mesa_HashLookup(ctx->Array.Objects, id);
79 * Looks up the array object for the given ID.
82 * error if the array object does not exist. It also returns the default
83 * array object when ctx is a compatibility profile context and id is zero.
91 * zero, indicating the default vertex array object, or]
92 * the name of the vertex array object."
102 return ctx->Array.DefaultVAO;
106 if (ctx->Array.LastLookedUpVAO &&
107 ctx->Array.LastLookedUpVAO->Name == id) {
108 vao = ctx->Array.LastLookedUpVAO;
111 _mesa_HashLookup(ctx->Array.Objects, id);
117 * vertex array object."
125 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, vao);
134 * For all the vertex binding points in the array object, unbind any pointers
136 * This is done just prior to array object destruction.
152 * Allocate and initialize a new vertex array object.
165 * Delete an array object.
191 /* Unreference the old array object */
209 /* reference new array object */
212 /* this array's being deleted (look just above) */
214 _mesa_problem(NULL, "referencing deleted array object");
227 * Initialize attribtes of a vertex array within a vertex array object.
228 * \param vao the container vertex array object
229 * \param index which array in the VAO to initialize
238 struct gl_array_attributes *array = &vao->VertexAttrib[index];
241 array->Size = size;
242 array->Type = type;
243 array->Format = GL_RGBA; /* only significant for GL_EXT_vertex_array_bgra */
244 array->Stride = 0;
245 array->Ptr = NULL;
246 array->RelativeOffset = 0;
247 array->Enabled = GL_FALSE;
248 array->Normalized = GL_FALSE;
249 array->Integer = GL_FALSE;
250 array->Doubles = GL_FALSE;
251 array->_ElementSize = size * _mesa_sizeof_type(type);
252 array->BufferBindingIndex = index;
255 binding->Stride = array->_ElementSize;
259 /* Vertex array buffers */
316 * Add the given array object to the array object pool.
323 _mesa_HashInsert(ctx->Array.Objects, vao->Name, vao);
329 * Remove the given array object from the array object pool.
330 * Do not deallocate the array object though.
337 _mesa_HashRemove(ctx->Array.Objects, vao->Name);
392 * may contain array attributes that are bound but not enabled.
442 struct gl_vertex_array_object * const oldObj = ctx->Array.VAO;
448 return; /* rebinding the same array object- no change */
451 * Get pointer to new array object (newObj)
454 /* The spec says there is no array object named 0, but we use
457 newObj = ctx->Array.DefaultVAO;
460 /* non-default array object */
469 /* For APPLE version, generate a new array object now */
491 if (ctx->Array.DrawMethod == DRAW_ARRAYS) {
502 ctx->Array._DrawArrays = NULL;
503 ctx->Array.DrawMethod = DRAW_NONE;
507 _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj);
526 * Bind a new array.
542 array objects.
544 * \param n Number of array objects to delete.
545 * \param ids Array of \c n array object IDs.
564 /* If the array object is currently bound, the spec says "the binding
565 * for that object reverts to zero and the default vertex array
568 if ( obj == ctx->Array.VAO ) {
575 if (ctx->Array.LastLookedUpVAO == obj)
576 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, NULL);
578 /* Unreference the array object.
588 * Generate a set of unique array object IDs and store them in \c arrays.
593 * \param arrays Array of \c n locations to store the IDs.
613 first = _mesa_HashFindFreeKeyBlock(ctx->Array.Objects, n);
615 /* For the sake of simplicity we create the array objects in both
661 * Generates ID's and creates the array objects.
672 * Determine if ID is the name of an array object.
674 * \param id ID of the potential array object.
675 * \return \c GL_TRUE if \c id is the name of a array object,
697 * Sets the element array buffer binding of a vertex array object.
715 * existing vertex array object."
749 * vertex array object."