Lines Matching refs:Array
138 struct gl_array_attributes *array = &vao->VertexAttrib[attribIndex];
145 if (array->BufferBindingIndex != bindingIndex) {
150 vao->BufferBinding[array->BufferBindingIndex]._BoundArrays &= ~array_bit;
153 array->BufferBindingIndex = bindingIndex;
265 * \param attrib The index of the attribute array
285 struct gl_array_attributes *const array = &vao->VertexAttrib[attrib];
297 array->Size = size;
298 array->Type = type;
299 array->Format = format;
300 array->Normalized = normalized;
301 array->Integer = integer;
302 array->Doubles = doubles;
303 array->RelativeOffset = relativeOffset;
304 array->_ElementSize = elementSize;
311 * Does error checking and updates the format in an attrib array.
316 * \param attrib The index of the attribute array
343 if (ctx->Array.LegalTypesMask == 0 || ctx->Array.LegalTypesMaskAPI != ctx->API) {
349 ctx->Array.LegalTypesMask = get_legal_types_mask(ctx);
350 ctx->Array.LegalTypesMaskAPI = ctx->API;
353 legalTypesMask &= ctx->Array.LegalTypesMask;
454 * \param attrib the attribute array index to update
464 * \param ptr the address (or offset inside VBO) of the array data
475 struct gl_vertex_array_object *vao = ctx->Array.VAO;
476 struct gl_array_attributes *array;
481 * "Client vertex arrays - all vertex array attribute pointers must
482 * refer to buffer objects (section 2.9.2). The default vertex array
484 * VertexAttribPointer when no buffer object or no vertex array object
489 if (ctx->API == API_OPENGL_CORE && (vao == ctx->Array.DefaultVAO)) {
490 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(no array object bound)",
515 * organization of vertex array data are called while zero is bound
520 !_mesa_is_bufferobj(ctx->Array.ArrayBufferObj)) {
521 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-VBO array)", func);
535 array = &vao->VertexAttrib[attrib];
536 array->Stride = stride;
537 array->Ptr = ptr;
540 effectiveStride = stride != 0 ? stride : array->_ElementSize;
542 ctx->Array.ArrayBufferObj, (GLintptr) ptr,
668 const GLuint unit = ctx->Array.ActiveTexture;
716 * Set a generic vertex attribute array.
748 * Set an integer-valued vertex attribute array.
825 enable_vertex_array_attrib(ctx, ctx->Array.VAO, index,
841 * array object."
878 disable_vertex_array_attrib(ctx, ctx->Array.VAO, index,
894 * array object."
905 * Return info for a vertex attribute array (no alias with legacy
915 const struct gl_array_attributes *array;
924 array = &vao->VertexAttrib[VERT_ATTRIB_GENERIC(index)];
928 return array->Enabled;
930 return (array->Format == GL_BGRA) ? GL_BGRA : array->Size;
932 return array->Stride;
934 return array->Type;
936 return array->Normalized;
938 return vao->BufferBinding[array->BufferBindingIndex].BufferObj->Name;
943 return array->Integer;
948 return array->Doubles;
954 return vao->BufferBinding[array->BufferBindingIndex].InstanceDivisor;
959 return array->BufferBindingIndex - VERT_ATTRIB_GENERIC0;
964 return array->RelativeOffset;
993 ARRAY_SIZE(ctx->Array.VAO->VertexAttrib));
1011 params[0] = (GLfloat) get_vertex_array_attrib(ctx, ctx->Array.VAO,
1033 params[0] = (GLdouble) get_vertex_array_attrib(ctx, ctx->Array.VAO,
1056 params[0] = (GLdouble) get_vertex_array_attrib(ctx, ctx->Array.VAO,
1078 params[0] = (GLint) get_vertex_array_attrib(ctx, ctx->Array.VAO,
1099 params[0] = (GLint) get_vertex_array_attrib(ctx, ctx->Array.VAO,
1120 params[0] = get_vertex_array_attrib(ctx, ctx->Array.VAO,
1143 ARRAY_SIZE(ctx->Array.VAO->VertexAttrib));
1146 ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Ptr;
1162 * vertex array object."
1225 * vertex array object."
1516 if (ctx->Array.LockCount != 0) {
1521 ctx->Array.LockFirst = first;
1522 ctx->Array.LockCount = count;
1538 if (ctx->Array.LockCount == 0) {
1543 ctx->Array.LockFirst = 0;
1544 ctx->Array.LockCount = 0;
1623 if (ctx->Array.RestartIndex != index) {
1625 ctx->Array.RestartIndex = index;
1641 struct gl_vertex_array_object * const vao = ctx->Array.VAO;
1680 if (ctx->Array.PrimitiveRestartFixedIndex) {
1693 return ctx->Array.RestartIndex;
1792 * "An INVALID_OPERATION error is generated if no vertex array object
1796 ctx->Array.VAO == ctx->Array.DefaultVAO) {
1798 "glBindVertexBuffer(No array object bound)");
1802 vertex_array_vertex_buffer(ctx, ctx->Array.VAO, bindingIndex,
1818 * existing vertex array object."
1956 * vertex array object is bound."
1959 ctx->Array.VAO == ctx->Array.DefaultVAO) {
1961 "glBindVertexBuffers(No array object bound)");
1965 vertex_array_vertex_buffers(ctx, ctx->Array.VAO, first, count,
1983 * existing vertex array object."
2009 * - if no vertex array object is currently bound (see section 2.10);
2018 ctx->Array.VAO == ctx->Array.DefaultVAO) {
2020 "%s(No array object bound)", func);
2039 update_array_format(ctx, func, ctx->Array.VAO,
2093 * existing vertex array object."
2202 * "An INVALID_OPERATION error is generated if no vertex array object
2206 ctx->Array.VAO == ctx->Array.DefaultVAO) {
2208 "glVertexAttribBinding(No array object bound)");
2212 vertex_array_attrib_binding(ctx, ctx->Array.VAO,
2228 * existing vertex array object."
2276 * "An INVALID_OPERATION error is generated if no vertex array object
2280 ctx->Array.VAO == ctx->Array.DefaultVAO) {
2282 "glVertexBindingDivisor(No array object bound)");
2286 vertex_array_binding_divisor(ctx, ctx->Array.VAO,
2303 * existing vertex array object."
2315 * Copy one client vertex array to another.
2368 * Print current vertex object/array info. For debug.
2373 const struct gl_vertex_array_object *vao = ctx->Array.VAO;
2375 fprintf(stderr, "Array Object %u\n", vao->Name);
2379 const struct gl_array_attributes *array = &vao->VertexAttrib[i];
2380 if (!array->Enabled)
2384 &vao->BufferBinding[array->BufferBindingIndex];
2390 array->Ptr, _mesa_enum_to_string(array->Type), array->Size,
2391 array->_ElementSize, binding->Stride, bo->Name,
2398 * Initialize vertex array state for given context.
2403 ctx->Array.DefaultVAO = _mesa_new_vao(ctx, 0);
2404 _mesa_reference_vao(ctx, &ctx->Array.VAO, ctx->Array.DefaultVAO);
2405 ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */
2407 ctx->Array.Objects = _mesa_NewHashTable();
2412 * Callback for deleting an array object. Called by _mesa_HashDeleteAll().
2424 * Free vertex array state for given context.
2429 _mesa_HashDeleteAll(ctx->Array.Objects, delete_arrayobj_cb, ctx);
2430 _mesa_DeleteHashTable(ctx->Array.Objects);