Home | History | Annotate | Download | only in vbo

Lines Matching refs:ctx

47 static void init_legacy_currval(struct gl_context *ctx)
49 struct vbo_context *vbo = vbo_context(ctx);
63 cl->Size = check_size(ctx->Current.Attrib[i]);
69 cl->Ptr = (const void *)ctx->Current.Attrib[i];
71 _mesa_reference_buffer_object(ctx, &cl->BufferObj,
72 ctx->Shared->NullBufferObj);
77 static void init_generic_currval(struct gl_context *ctx)
79 struct vbo_context *vbo = vbo_context(ctx);
93 cl->Ptr = (const void *)ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + i];
98 _mesa_reference_buffer_object(ctx, &cl->BufferObj,
99 ctx->Shared->NullBufferObj);
104 static void init_mat_currval(struct gl_context *ctx)
106 struct vbo_context *vbo = vbo_context(ctx);
138 cl->Ptr = (const void *)ctx->Light.Material.Attrib[i];
145 _mesa_reference_buffer_object(ctx, &cl->BufferObj,
146 ctx->Shared->NullBufferObj);
151 GLboolean _vbo_CreateContext( struct gl_context *ctx )
155 ctx->swtnl_im = (void *)vbo;
159 if (!ctx->aelt_context &&
160 !_ae_create_context( ctx )) {
164 init_legacy_currval( ctx );
165 init_generic_currval( ctx );
166 init_mat_currval( ctx );
191 vbo_exec_init( ctx );
192 if (ctx->API == API_OPENGL)
193 vbo_save_init( ctx );
201 void _vbo_InvalidateState( struct gl_context *ctx, GLuint new_state )
203 vbo_exec_invalidate_state(ctx, new_state);
207 void _vbo_DestroyContext( struct gl_context *ctx )
209 struct vbo_context *vbo = vbo_context(ctx);
211 if (ctx->aelt_context) {
212 _ae_destroy_context( ctx );
213 ctx->aelt_context = NULL;
220 _mesa_reference_buffer_object(ctx, &vbo->currval[i].BufferObj, NULL);
223 vbo_exec_destroy(ctx);
224 if (ctx->API == API_OPENGL)
225 vbo_save_destroy(ctx);
227 ctx->swtnl_im = NULL;
232 void vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func)
234 struct vbo_context *vbo = vbo_context(ctx);