PDA

View Full Version : GLUT Examples - Mesademos - Bouncing Ball - Color Painting Issues



chaq686
12-08-2012, 01:29 PM
Greetings fellow developers,

I just got the Mesademos GLUT examples (http://www.opengl.org/archives/resources/code/samples/glut_examples/mesademos/mesademos.html).

I compiled the bouncing ball example (http://www.opengl.org/archives/resources/code/samples/glut_examples/mesademos/bounce.c) and I had no problem with compilation.

But when I run it, the window didn't show any color.
http://www.keepandshare.com/userpics/c/h/a/q/686/2012-12/ss/opengl_bouncing_ball_help-91659891.jpg?ts=1354999709

That only happens if use glIndexi, because when I check other examples from video tutorials rocks (http://www.videotutorialsrock.com/) I have no problems using colors with sentences like glColor3f.

This is how you supposed to set the color with glut.
glutSetColor(RED, 1.0, 0.0, 0.0);
glutSetColor(WHITE, 1.0, 1.0, 1.0);
glutSetColor(CYAN, 0.0, 1.0, 1.0);

I'm developing on Cywing. These is the package list I have installed for OpenGL and GLUT
http://www.keepandshare.com/userpics/c/h/a/q/686/2012-12/sm/package_list-50909037.jpg?ts=1355001637

I don't know if the problem is the setting the colors or accessing to their index.

Any suggestions? Should I'll keep using GLUT for drawing and rendering?