octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gl-render.cc: framework OpenGL on MacOSX


From: Thomas Treichl
Subject: Re: gl-render.cc: framework OpenGL on MacOSX
Date: Sat, 31 Jan 2009 09:39:07 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Shai Ayal schrieb:
On Sat, Jan 31, 2009 at 1:09 AM, Thomas Treichl <address@hidden> wrote:
Hi,

I'm currently trying to compile gl-render.cc against Mac's OpenGL framework.
If I compile against Mac's "X11/GL" then everything is just fine, but with
"framework OpenGL" I have got problems. I already was able to do a hack for
this:
but I'm not able to find out what the compiler wants from me for this:

gl-render.cc: In member function 'virtual void opengl_tesselator::init()':
gl-render.cc:273: error: invalid conversion from 'void (*)()' to 'GLvoid
(*)(...)'
gl-render.cc:273: error:   initializing argument 3 of 'void
gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)(...))'

The type for the gluTessCallback was always problematic. In fact in
octplot I dedicated a whole h file just for gettign it right. Have a
look for what used to work for octplot:
http://octplot.svn.sourceforge.net/viewvc/octplot/trunk/octplot/src/glutesscb.h?revision=437&view=markup

Thank you so much Shai, I nearly was going crazy ;) My quick hack in line 224 of gl-render.cc now is

  typedef GLvoid (CALLBACK *fcn) (...);

instead of

  typedef void (CALLBACK *fcn) (void);

I didn't know that (...) is something C++ valid. I can continue working on gl-render.cc in the evening. Thanks again!

The second question is: Are there any other platforms that have a header
"OpenGL/gl.h" instead of "GL/gl.h" or do we just have this "OpenGL/gl.h" on
Mac? I'm asking this question because I'd like to adjust the test procedure
OCTAVE_OPENGL in aclocal.m4.

Why don't you implement a test for the feature, not version -- i.e. if
"GL/gl.h" is not found, try "OpenGL/gl.h" ?

Right now "GL/gl.h" is found and "OpenGL/gl.h" is found, it depends on which -Ipath is given first ;) I'll have a look how I put the test for framework OpenGL into configure.in.

Best regards,

  Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]