Advertisement

Procedural Planets for *nix

Started by November 19, 2005 05:30 AM
4 comments, last by s_p_oneil 19 years ago
Hi all, I finally bit the bullet and made all my procedural planet demos cross-platform. I installed FreeBSD 6.0, wrestled with the drivers and X.org until I got them working, created some autoconf/automake scripts to get it to compile, and then I tested it with a GeForce 6800 video card. I managed to get everything working except the font class (which uses wglUseFontBitmaps). I'm still pretty green when it comes to *nix, so I had someone who was trying to get it working on Linux try it out. He said he had to change -lSDL-1.1 to -lSDL in all the Makefile.am files, and he had to pass the configure script a different set of include and lib directories, but other than that it worked fine. Enjoy: http://sponeil.org/
Maybe this can help you with the SDL build issues.
Advertisement
Excellent work!

To get it working in Gentoo linux I had to change all SDL-1.1 to SDL and add an extra include directory, "/usr/include/SDL" as all sdl headers are located there. Both these problems will go away if you follow the instructions 255 linked it.

If you think copying stuff into your macro files etc etc is a bit dumb I'd recommend checking out SCons. Its a really nice build system where you write your makefiles in python. It works for windows too and seems to be gaining popularity in the linux world (KDE is moving to kdsys which is based on scons, and there are others).
Quote: Original post by 255
Maybe this can help you with the SDL build issues.


Thanks, but following those instructions caused the warnings below. When I ignored the warnings and ran all the steps through to configure, it failed to find SDL. A brief web search didn't find anything that helped. I'm out of my element in *nix, and the online documentation I read for autoconf/automake is incomplete and didn't prepare me for problems like this.

I've already spent a lot of hours just getting it working on FreeBSD, and I don't have much free time to spare. I did it as a favor to the developers who have asked me for a *nix port in the past. As long as they can get it working, I'm content to leave it the way it is for now. I need to get back to working on the article that will explain how the code works. ;-)

bash-2.05b$ aclocal/usr/X11R6/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK  run info '(automake)Extending aclocal'  or see http://sources.redhat.com/automake/automake.html#Extending-aclocalconfigure.in:20: warning: AC_ARG_PROGRAM was called before AC_CANONICAL_TARGETautoconf/general.m4:1657: AC_CANONICAL_TARGET is expanded from...configure.in:20: AC_CANONICAL_TARGET is required by...acinclude.m4:175: AM_PATH_SDL is expanded from...configure.in:20: the top levelbash-2.05b$ autoconf --versionautoconf (GNU Autoconf) 2.59Written by David J. MacKenzie and Akim Demaille.Copyright (C) 2003 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.bash-2.05b$ automake --versionautomake (GNU automake) 1.9.6Written by Tom Tromey <tromey@redhat.com>.Copyright 2005 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hmm, I run into problems with ScatterCPU/ScatterGPU. They both segfaults on line 280 in PixelBuffer.cpp
((float *)m_pBuffer)[nIndex++] = fRayleighDensityRatio;


I didnt get any other warning or anything.
EDIT: I'm running this on 64-bit linux, so maybe there are some pointer size problems. I'll poke around quickly and se eif I can find anything.
EDIT: I didnt find anything obvious, but there were quite a lot of pointer magic and alignment stuff going on so I'm sure its in there somewhere ;)

[Edited by - rollo on November 19, 2005 7:53:08 AM]
Quote: Original post by rollo
hmm, I run into problems with ScatterCPU/ScatterGPU. They both segfaults on line 280 in PixelBuffer.cpp
((float *)m_pBuffer)[nIndex++] = fRayleighDensityRatio;


I didnt get any other warning or anything.
EDIT: I'm running this on 64-bit linux, so maybe there are some pointer size problems. I'll poke around quickly and se eif I can find anything.
EDIT: I didnt find anything obvious, but there were quite a lot of pointer magic and alignment stuff going on so I'm sure its in there somewhere ;)


I've never tried it on a 64-bit CPU, but that function doesn't need to be called for ScatterGPU. Comment the call out in ScatterGPU, and that demo should stop crashing.

This topic is closed to new replies.

Advertisement