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* ?

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.

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