/** * Initialize the attribute groups in a GL context. * * \param ctx GL context. * * Initializes all the attributes, calling the respective <tt>init*</tt> * functions for the more complex data structures. */ static GLboolean init_attrib_groups(GLcontext *ctx) { assert(ctx); /* Constants */ _mesa_init_constants( ctx ); /* Extensions */ _mesa_init_extensions( ctx ); /* Attribute Groups */ _mesa_init_accum( ctx ); _mesa_init_attrib( ctx ); _mesa_init_buffer_objects( ctx ); _mesa_init_color( ctx ); _mesa_init_colortables( ctx ); _mesa_init_current( ctx ); _mesa_init_depth( ctx ); _mesa_init_debug( ctx ); _mesa_init_display_list( ctx ); _mesa_init_eval( ctx ); _mesa_init_fbobjects( ctx ); _mesa_init_feedback( ctx ); _mesa_init_fog( ctx ); _mesa_init_histogram( ctx ); _mesa_init_hint( ctx ); _mesa_init_line( ctx ); _mesa_init_lighting( ctx ); _mesa_init_matrix( ctx ); _mesa_init_multisample( ctx ); _mesa_init_pixel( ctx ); _mesa_init_pixelstore( ctx ); _mesa_init_point( ctx ); _mesa_init_polygon( ctx ); _mesa_init_program( ctx ); _mesa_init_queryobj( ctx ); #if FEATURE_ARB_sync _mesa_init_sync( ctx ); #endif _mesa_init_rastpos( ctx ); _mesa_init_scissor( ctx ); _mesa_init_shader_state( ctx ); _mesa_init_stencil( ctx ); _mesa_init_transform( ctx ); _mesa_init_varray( ctx ); _mesa_init_viewport( ctx ); if (!_mesa_init_texture( ctx )) return GL_FALSE; _mesa_init_texture_s3tc( ctx ); /* Miscellaneous */ ctx->NewState = _NEW_ALL; ctx->ErrorValue = (GLenum) GL_NO_ERROR; ctx->varying_vp_inputs = ~0; return GL_TRUE; }
static unsigned get_version(struct pipe_screen *screen, struct st_config_options *options, gl_api api) { struct gl_constants consts = {0}; struct gl_extensions extensions = {0}; GLuint version; if (_mesa_override_gl_version_contextless(&consts, &api, &version)) { return version; } _mesa_init_constants(&consts, api); _mesa_init_extensions(&extensions); st_init_limits(screen, &consts, &extensions); st_init_extensions(screen, &consts, &extensions, options, GL_TRUE); return _mesa_get_version(&extensions, &consts, api); }