PDA

View Full Version : Can't get red book example texture3d.c to work on MAC.



KraftDinner
09-30-2004, 11:45 AM
texture3d.c (http://www.designlab.ukans.edu/~miller/OGL_GLUT_GLUI/RedBook1.2/texture3d.c)

I have been banging my head trying to get this to show anything but a black on the screen. Are there any mac os x users here?

dorbie
09-30-2004, 12:45 PM
Try with a 2D texture first see if everything is OK, then try 3D texture with everything else exactly the same. Make sure the coordinates sample texture data through the 3D volume where you have placed interesting non black data.

arekkusu
09-30-2004, 06:03 PM
I changed
#include <GL/glut.h>
to
#include <GLUT/glut.h>

and compiled as
gcc -Os -s -o texture3d texture3d.c -framework OpenGL -framework GLUT -lobjc ; ./texture3d

and it shows me two color shaded squares.

This is with a Radeon 9600 under 10.3.5. Be aware that some video hardware (namely: the Rage128, GF2MX, GF4MX) does not support 3D texturing, and there is no software fallback on OS X.

KraftDinner
10-01-2004, 07:00 AM
Thank you all.
I was able to get the glut example to run perfectly.
However when I integrate the code into the NeHe Lession01_OSXCocoa example I see nothing. I suspect it may be an initialization issue.

I am leaving the NeHe example behind for now to persue the real issue which is of course 3D texture mapping.

Thank you both.