OpenGL-1.1.0 compile problem in cygwin-1.7

Brian Dessent brian@dessent.net
Tue Dec 9 15:07:00 GMT 2008


"Phan, Linh H" wrote:

>   gluTessCallback(tobj, (GLenum)GLU_BEGIN, (void (*)())glBegin);
>   gluTessCallback(tobj, (GLenum)GLU_END, glEnd);
>   gluTessCallback(tobj, (GLenum)GLU_VERTEX, (void (*)())glVertex2fv);
> }
> 
> And that fixed it for glEnd, but I don't know how to fix the glBegin and glVertex2fv.  This is not my code; it's part of the SGI OpenInventor library.

You can use a typedef to make life a little easier.  There's already one
in glu.h that you can reuse (although it looks like it's not meant to be
part of the public interface so it might not be the best idea to rely on
it):

typedef void (APIENTRY *_GLUfuncptr)();

Then the cast becomes just "(_GLUfuncptr)whatever".

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list