OpenGL-1.1.0 compile problem in cygwin-1.7

Phan, Linh H linh.h.phan@jpl.nasa.gov
Tue Dec 9 20:19:00 GMT 2008


That worked.

Thanks Brian,

Linh

-----Original Message-----
From: cygwin-xfree-owner@cygwin.com [mailto:cygwin-xfree-owner@cygwin.com] On Behalf Of Brian Dessent
Sent: Tuesday, December 09, 2008 7:07 AM
To: cygwin-xfree@cygwin.com
Subject: Re: OpenGL-1.1.0 compile problem in cygwin-1.7

"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/


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