Home | History | Annotate | Download | only in main

Lines Matching full:ctx

66 lookup_arrayobj(struct gl_context *ctx, GLuint id)
72 _mesa_HashLookup(ctx->Array.Objects, id);
82 unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj)
87 _mesa_reference_buffer_object(ctx, &obj->VertexAttrib[i].BufferObj, NULL);
98 _mesa_new_array_object( struct gl_context *ctx, GLuint name )
102 _mesa_initialize_array_object(ctx, obj, name);
114 _mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
116 (void) ctx;
117 unbind_array_object_vbos(ctx, obj);
118 _mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj, NULL);
130 _mesa_reference_array_object_(struct gl_context *ctx,
152 ASSERT(ctx->Driver.DeleteArrayObject);
153 ctx->Driver.DeleteArrayObject(ctx, oldObj);
184 init_array(struct gl_context *ctx,
198 _mesa_reference_buffer_object(ctx, &array->BufferObj,
199 ctx->Shared->NullBufferObj);
207 _mesa_initialize_array_object( struct gl_context *ctx,
222 init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_WEIGHT], 1, GL_FLOAT);
225 init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_NORMAL], 3, GL_FLOAT);
228 init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_COLOR1], 3, GL_FLOAT);
231 init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_FOG], 1, GL_FLOAT);
234 init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX], 1, GL_FLOAT);
237 init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_EDGEFLAG], 1, GL_BOOL);
241 init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_POINT_SIZE], 1, GL_FLOAT);
245 init_array(ctx, &obj->VertexAttrib[i], 4, GL_FLOAT);
250 _mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj,
251 ctx->Shared->NullBufferObj);
259 save_array_object( struct gl_context *ctx, struct gl_array_object *obj )
263 _mesa_HashInsert(ctx->Array.Objects, obj->Name, obj);
273 remove_array_object( struct gl_context *ctx, struct gl_array_object *obj )
277 _mesa_HashRemove(ctx->Array.Objects, obj->Name);
311 _mesa_update_array_object_max_element(struct gl_context *ctx,
316 if (!ctx->VertexProgram._Current ||
317 ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) {
319 } else if (ctx->VertexProgram._Current->IsNVProgram) {
341 bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
343 struct gl_array_object * const oldObj = ctx->Array.ArrayObj;
345 ASSERT_OUTSIDE_BEGIN_END(ctx);
359 newObj = ctx->Array.DefaultArrayObj;
363 newObj = lookup_arrayobj(ctx, id);
366 _mesa_error(ctx, GL_INVALID_OPERATION, "glBindVertexArray(id)");
371 newObj = (*ctx->Driver.NewArrayObject)(ctx, id);
373 _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindVertexArrayAPPLE");
377 save_array_object(ctx, newObj);
392 ctx->NewState |= _NEW_ARRAY;
393 _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, newObj);
396 if (ctx->Driver.BindArrayObject && newObj)
397 ctx->Driver.BindArrayObject(ctx, newObj);
410 GET_CURRENT_CONTEXT(ctx);
411 bind_vertex_array(ctx, id, GL_TRUE);
426 GET_CURRENT_CONTEXT(ctx);
427 bind_vertex_array(ctx, id, GL_FALSE);
440 GET_CURRENT_CONTEXT(ctx);
442 ASSERT_OUTSIDE_BEGIN_END(ctx);
445 _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteVertexArrayAPPLE(n)");
450 struct gl_array_object *obj = lookup_arrayobj(ctx, ids[i]);
459 if ( obj == ctx->Array.ArrayObj ) {
464 remove_array_object(ctx, obj);
469 _mesa_reference_array_object(ctx, &obj, NULL);
483 gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays)
487 ASSERT_OUTSIDE_BEGIN_END(ctx);
490 _mesa_error(ctx, GL_INVALID_VALUE, "glGenVertexArraysAPPLE");
498 first = _mesa_HashFindFreeKeyBlock(ctx->Array.Objects, n);
505 obj = (*ctx->Driver.NewArrayObject)( ctx, name );
507 _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenVertexArraysAPPLE");
510 save_array_object(ctx, obj);
523 GET_CURRENT_CONTEXT(ctx);
524 gen_vertex_arrays(ctx, n, arrays);
535 GET_CURRENT_CONTEXT(ctx);
536 gen_vertex_arrays(ctx, n, arrays);
551 GET_CURRENT_CONTEXT(ctx);
552 ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
557 obj = lookup_arrayobj(ctx, id);