By definition, an application which is "legal" according to the oglbase spec
should not have any problems when confronted by glext.h.  Any app which does
not comply to oglbase has no guarantee of working anyway... the fact that
some legacy apps might compile w/o glext.h but fail with it indicates that
they are not oglbase compliant.  I'm not sure this is a compelling argument
against including glext.h unconditionally.

If you want to get fancy, gl.h could have:

#if !defined(__GL_NO_EXTENSIONS)
#include <GL/glext.h>
#endif

so legacy apps could continue to work by adding -D__GL_NO_EXTENSIONS to
their LCDEFS.


> -----Original Message-----
> From: Stephen J Baker [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 21, 2000 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [oglbase-discuss] detecting if <GL/glext.h> 
> exists without
> compile errors
> 
> 
> I can think of one reason why you must NOT #include glext.h from
> within gl.h and that is that it could wreck existing programs
> that conditionally compile extension code on the assumption
> that they will be compiled and run on the same machine.
>  
> #ifdef GL_EXT_something_or_other
>   glSomethingOrOtherEXT () ;
> #endif
>  
> Since glext.h defines ALL extensions for all machines, an
> existing program that was only intended to run on the machine
> it was compiled on would certainly break if glext.h were
> rammed down it's throat by virtue of forced inclusion within
> gl.h.
>  
> In effect, the meaning of GL_EXT_whatever tokens is
> subtly changed in programs that include glext.h
> 
> Since that older program doesn't know about oglbase, it won't
> include glext.h itself and should work just fine under the
> proposed scheme where glext.h has to be explicitly included.
> 
> Dunno if this was the original reason - but we can't do
> something that would break existing legal OpenGL programs,
> so gl.h can't include glext.h (at least not unconditionally).
> 
> Steve Baker                      (817)619-2657 (Vox/Vox-Mail)
> L3Com/Link Simulation & Training (817)619-2466 (Fax)
> Work: [EMAIL PROTECTED]            http://www.hti.com
> Home: [EMAIL PROTECTED]       http://web2.airmail.net/sjbaker1
> 

Reply via email to