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

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.

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

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?