}
-/**
- * Allocate and initialize a struct gl_context structure.
- * Note that the driver needs to pass in its dd_function_table here since
- * we need to at least call driverFunctions->NewTextureObject to initialize
- * the rendering context.
- *
- * \param api the GL API type to create the context for
- * \param visual a struct gl_config pointer (we copy the struct contents) or
- * NULL to create a configless context
- * \param share_list another context to share display lists with or NULL
- * \param driverFunctions points to the dd_function_table into which the
- * driver has plugged in all its special functions.
- *
- * \return pointer to a new __struct gl_contextRec or NULL if error.
- */
-struct gl_context *
-_mesa_create_context(gl_api api,
- const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions)
-{
- struct gl_context *ctx;
-
- ctx = calloc(1, sizeof(struct gl_context));
- if (!ctx)
- return NULL;
-
- if (_mesa_initialize_context(ctx, api, visual, share_list,
- driverFunctions)) {
- return ctx;
- }
- else {
- free(ctx);
- return NULL;
- }
-}
-
-
/**
* Free the data associated with the given context.
*
struct gl_context *share_list,
const struct dd_function_table *driverFunctions);
-extern struct gl_context *
-_mesa_create_context(gl_api api,
- const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions);
-
extern void
_mesa_free_context_data( struct gl_context *ctx );
memset(&funcs, 0, sizeof(funcs));
st_init_driver_functions(pipe->screen, &funcs);
- ctx = _mesa_create_context(api, visual, shareCtx, &funcs);
- if (!ctx) {
+ ctx = calloc(1, sizeof(struct gl_context));
+ if (!ctx)
+ return NULL;
+
+ if (!_mesa_initialize_context(ctx, api, visual, shareCtx, &funcs)) {
+ free(ctx);
return NULL;
}