|
| Similarly, it is still desired by some people to use OpenGL
| under Linux without X. Those people won't take kindly to
| the inability to query gl functions because the query
| routine is in glX.
I find it hard to imagine that someone would use OpenGL without
establishing some embedding for it. The query function could live
in the embedding. I mostly don't think of GL existing without
some sort of embedding. This isn't a strong argument, just
an observation.
|
| 2) We might fondly imagine a day when this extension
| is universally adopted - even under Windoze, Apple, OS/2
| implementations.
|
| When that happens, portable programs will be able to call
| glGetFuncAddress and gluGetFuncAddress without nasty compile
| time hacks...In fact, the only time you'd need such hacks
| would be if you needed to check for glX/agl/pgl or wgl
| extensions...which are by definition not portable anyway.
| I think it's worth the tiny amount of extra hassle to
| keep things clean.
|
| You can still legally say:
|
#ifndef WINDOZE
| void *wglGetFuncAddress ( char *s )
| {
| void *f ;
|
| if(!(f= glGetFuncAddress(s))) return f;
| if(!(f=gluGetFuncAddress(s))) return f;
| #ifdef X_WIN
| if(!(f=glXGetFuncAddress(s))) return f;
| #endif
| #ifdef MAC_OS
| if(!(f=aglGetFuncAddress(s))) return f;
| #endif
| #ifdef OS2
| if(!(f=pglGetFuncAddress(s))) return f;
| #endif
| return NULL ;
| }
| #endif
|
| ...which covers all the bases in the meantime.
Are we that sure a bogus query shouldn't raise an error
as well?
david