PDA

View Full Version : Question about GL color!``



3w
12-10-2002, 11:53 PM
the problem here:
i want to draw a scene with OGL.
While, after i draw the grid (by some blue lines),the sky become blue too. it's so dark
http://www.opengl.org/discussion_boards/ubb/frown.gif
the sky is made up of 6 texture .bmps.

i wonder what should i do to avoid this . NEED ur help ~~thx.

code following :

......

glDisable(GL_LIGHTING);
glDisable(GL_LIGHT0);

glColor3ub(0, 0, 255);
glBegin(GL_LINES);
DrawLines();//to get some grid
glEnd();

sky.DrawSky();//draw sky - a Box

glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);

......

Relic
12-11-2002, 12:50 AM
While you're drawing the sky lighting is off and the base color is blue. Either set it to white or set glTextEnv to use GL_DECAL (not the default GL_MODULATE) to get the pure texture colors on the sky geometry.

3w
12-12-2002, 12:34 AM
thx very much~!!~~

i change the grid color to white .then i can see the DAY sky, http://www.opengl.org/discussion_boards/ubb/smile.gif

thank u !~