OpenGL-1.1.0 compile problem in cygwin-1.7
André Bleau
andre_bleau@hotmail.com
Tue Dec 9 13:38:00 GMT 2008
"Phan, Linh H" wrote:
>
> Hi Brian,
>
> Can you show me how I can fix the cast? I tried this:
>
> #include
> #include
> void test (void)
> {
> GLUtesselator *tobj = (GLUtesselator *)gluNewTess();
> 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.
>
> Thank you,
>
> Linh
>
Hi Linh,
Did you try:
#include
#include
void test (void)
{
GLUtesselator *tobj = gluNewTess();
gluTessCallback(tobj, (GLenum)GLU_BEGIN, glBegin);
gluTessCallback(tobj, (GLenum)GLU_END, glEnd);
gluTessCallback(tobj, (GLenum)GLU_VERTEX, glVertex2fv);
}
Anyway, glu.h shows that the prototype for gluTessCallback is:
GLAPI void APIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
so (_GLUfuncptr) is the obvious cast, no?
- André Bleau, Cygwin's volunteer OpenGL package maintainer.
Please direct any question or comment about the OpenGL package to cygwin at cygwin dot com
_________________________________________________________________
--
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