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: Ben Abbott
Subject: Re: gl-render.cc: framework OpenGL on MacOSX
Date: Sun, 08 Feb 2009 11:58:56 -0500


On Feb 8, 2009, at 4:31 AM, Thomas Treichl wrote:

Ben Abbott schrieb:
Send all the files you want. I'm happy to do testing on Leopard.

Hi Ben,

I think I got it. I did some more Internet search and found a nice implementation that (from my point of view) is not the way how we should do it:

 #if defined(__APPLE_CC__) && __APPLE_CC__ > 4000 &&
  __APPLE_CC__ < 5450 && !defined(__INTEL_COMPILER)
    typedef GLvoid (*GLUTesselatorFunction)(...);
#elif defined( __mips ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __sun ) || defined (__CYGWIN__) ||
  defined (__APPLE__)
    typedef GLvoid (*GLUTesselatorFunction)();
 <SNIP>

but there are also some good implementations for this problem, eg.

 http://autoconf-archive.cryp.to/ax_check_glu.html

I created another macro "OCTAVE_GLUTESSCALLBACK_THREEDOTS" that is called if a valid framework OpenGL is found. It separates the way of calling gluTessCallback on our different Mac systems.

I attached a script "configure.in" to this email, can you please try this on your system (there are some files created while doing autoheader and autoconf, so the best would be if you put configure.in into /tmp and work there):

 bash$ autoheader && autoconf && ./configure

The relevant output on my machine that should be checked on your Mac is:

 checking whether ld accepts -framework OpenGL... yes
 configure: adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS
 checking whether gluTessCallback is called with "(...)"... yes
 OPENGL_LIBS: -Wl,-framework -Wl,OpenGL

On your Mac it should be "checking whether gluTessCallback is called with "(...)"... no". The second test is

$ autoheader && autoconf && ./configure
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether ld accepts -framework OpenGL... yes
configure: adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS
checking whether gluTessCallback is called with "(...)"... no
OPENGL_LIBS: -Wl,-framework -Wl,OpenGL
configure: creating ./config.status
config.status: creating config.h

bash$ autoheader && autoconf && ./configure --without-framework- opengl

my output once again then is

 checking whether ld accepts -framework OpenGL... yes
 configure: Framework rejected by --without-framework-opengl
 checking for GL/gl.h... no
 checking for OpenGL/gl.h... yes
 checking for GL/glu.h... no
 checking for OpenGL/glu.h... yes
 checking for glEnable in -lGL... yes
 OPENGL_LIBS: -L/usr/X11R6/lib -lGL -lGLU

ie. the OpenGL libs from our X11 system are taken. If this works and there is no other objection then I'll prepare the changeset for Octave and Mac's framework OpenGL.

$ autoheader && autoconf && ./configure --without-framework-opengl
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether ld accepts -framework OpenGL... yes
configure: Framework rejected by --without-framework-opengl
checking for GL/gl.h... no
checking for OpenGL/gl.h... yes
checking for GL/glu.h... no
checking for OpenGL/glu.h... yes
checking for glEnable in -lGL... yes
OPENGL_LIBS: -L/usr/X11R6/lib -lGL -lGLU
configure: creating ./config.status
config.status: creating config.h

Looks good!

Ben


reply via email to

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