mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
tracing code can now be selected by setting GLSTUB_TRACE to a non-zero
value (eg, export GLSTUB_TRACE=1)
This commit is contained in:
parent
1d420edcd0
commit
b5ed8a7ddb
2 changed files with 394 additions and 1 deletions
|
@ -56,16 +56,23 @@ void *
|
|||
glXGetProcAddressARB (const GLubyte *procName)
|
||||
{
|
||||
static int called;
|
||||
static int trace;
|
||||
gl_stub_t *stub;
|
||||
gl_stub_t key;
|
||||
|
||||
if (!called) {
|
||||
char *glstub_trace;
|
||||
|
||||
qsort (gl_stub_funcs, NUM_FUNCS, sizeof (gl_stub_t), cmp);
|
||||
called = 1;
|
||||
|
||||
glstub_trace = getenv ("GLSTUB_TRACE");
|
||||
if (glstub_trace)
|
||||
trace = atoi (glstub_trace);
|
||||
}
|
||||
key.name = procName;
|
||||
stub = bsearch (&key, gl_stub_funcs, NUM_FUNCS, sizeof (gl_stub_t), cmp);
|
||||
if (!stub)
|
||||
return 0;
|
||||
return stub->norm;
|
||||
return trace ? stub->trace : stub->norm;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue