Home | Info | Community | Development | myReactOS | Contact Us
[static]
Calls all the various one-time-init functions in Mesa.
While holding a global mutex lock, calls several initialization functions, and sets the glapi callbacks if the MESA_DEBUG environment variable is defined.
MESA_DEBUG
Definition at line 372 of file context.c.
Referenced by _mesa_initialize_context().
{ static GLboolean alreadyCalled = GL_FALSE; (void) ctx; _glthread_LOCK_MUTEX(OneTimeLock); if (!alreadyCalled) { GLuint i; /* do some implementation tests */ assert( sizeof(GLbyte) == 1 ); assert( sizeof(GLubyte) == 1 ); assert( sizeof(GLshort) == 2 ); assert( sizeof(GLushort) == 2 ); assert( sizeof(GLint) == 4 ); assert( sizeof(GLuint) == 4 ); _mesa_init_sqrt_table(); #if _HAVE_FULL_GL _math_init(); for (i = 0; i < 256; i++) { _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F; } #endif #ifdef USE_SPARC_ASM _mesa_init_sparc_glapi_relocs(); #endif if (_mesa_getenv("MESA_DEBUG")) { _glapi_noop_enable_warnings(GL_TRUE); _glapi_set_warning_func( (_glapi_warning_func) _mesa_warning ); } else { _glapi_noop_enable_warnings(GL_FALSE); } #if defined(DEBUG) && defined(__DATE__) && defined(__TIME__) _mesa_debug(ctx, "Mesa %s DEBUG build %s %s\n", MESA_VERSION_STRING, __DATE__, __TIME__); #endif alreadyCalled = GL_TRUE; } _glthread_UNLOCK_MUTEX(OneTimeLock); }