Results 1 to 3 of 3

Thread: Question about GL color!``

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2002
    Posts
    2

    Question about GL color!``

    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

    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);

    ......

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Question about GL color!``

    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.

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2002
    Posts
    2

    Re: Question about GL color!``

    thx very much~!!~~

    i change the grid color to white .then i can see the DAY sky,

    thank u !~

Similar Threads

  1. Color question
    By foolishfish in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-10-2013, 08:51 PM
  2. question about color composing using GLSL
    By imported_billconan in forum OpenGL: GLSL
    Replies: 11
    Last Post: 02-03-2010, 09:29 PM
  3. Question about exporting diffuse color
    By laeuchli in forum COLLADA
    Replies: 1
    Last Post: 12-02-2009, 11:09 AM
  4. a simple color question
    By blender in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-09-2002, 08:06 AM
  5. color depth question
    By Morphius in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-26-2002, 10:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean