In your message of 10 April 2000 you write:

> On Mon, 10 Apr 2000, Thomas Roell wrote:
> 
> > > > > ...Or the prototype function pointer could be left outside of the guardian
> > > > > ifdef in glext.h since gl.h won't define function *pointers* only the
> > > > > functions themselves.
> > > > 
> > > > This would cause a problem with gl.h implementations that include
> > > > function pointers for extensions supported directly in libGL ...
> > >  
> > > Does anyone actually do that (other than under Windoze that is) ?
> > 
> > Yep. We (Xi Graphics) do so. Why ? We started shipping a preliminary
> > gl.h/glext.h about half a year ago. Of course with no compile-time
> > define that would indicate that glext.h would be included or not. Now
> > for compatibility reasons a few extensions are declared the old style.
> > An example would be EXT_texture_object. Some applications ported from
> > other UNIX platforms really do use those things. Now glext.h must
> > include gl.h to get all the type defines. So some extensions end up in
> > gl.h and some in glext.h. Hence in order to avoid redefinitions or
> > redeclarations, you have to include at least the function pointers in
> > gl.h for the extensions that are defined there.
>  
> Are you confused about function *POINTERS* versus function *DEFINITIONS* ?

No, not at all.

> I realise that existing gl.h's will include function definitions
> 
> eg
> 
> void glTexImage3DEXT ( ...whatever... ) ;
> 
> ...but I don't see why you found the need to include function pointers:
> 
> typedef void PFNGLTEXIMAGE3DEXT ( ...whatever... ) ;
> 
> ...which were useless prior to GetProcAddress - and are the only
> thing that are at issue here.

Quite simple. As I said before, gl.h must be included somehow before
glext.h is included (or glext.h includes gl.h). This means that some
extensions will be defined in gl.h, and some in glext.h. If now
extensions in glext.h are guared properly against redefines and
redeclarations (ala #ifndef GL_EXT_XYZ), then you are missing the
function pointers for the extensions already declared in gl.h.

Somebody who includes glext.h clearly wants to have access to ALL
function pointers for all extensions. So not declaring the function
pointers for the extensions defined in gl.h would result in a mess.

- Thomas
-- 
             Thomas Roell   /\         An imperfect plan executed violently
             Xi Graphics   /  \/\ _     is far superior to a perfect plan. 
         [EMAIL PROTECTED]   /   /  \ \     
                         / Oelch! \ \             George Patton

Reply via email to