Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: gl_BackColor bug

  1. #1
    Intern Contributor
    Join Date
    Jan 2003
    Posts
    86

    gl_BackColor bug

    Code :
    void main()
    {
    	gl_FrontColor = vec4(0.0,0.0,1.0,1.0);
     	gl_BackColor = vec4(0.5,0.5,0.5,1.0);
    	gl_Position = ftransform();
    }
    Code :
    void main()
    {
    	gl_FragColor = vec4(gl_Color);
    }
    gl_BackColor gets ignored in the fragment shader.

    repro:

    0) start render monkey or shader designer and paste this code in
    1) disable backface culling
    2) set plane as a test model
    3) rotate the plane - plane back and front face have the same blue color when they should have blue at front and grey at back.

    Can any of you guys please double-check and confirm the bug?

  2. #2
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: gl_BackColor bug

    You have to enable GL_VERTEX_PROGRAM_TWO_SIDE_ARB.

  3. #3
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: gl_BackColor bug

    @humus...
    You are faster

    @speedy:
    Pozdrav!!!

  4. #4
    Intern Contributor
    Join Date
    Jan 2003
    Posts
    86

    Re: gl_BackColor bug

    Thanks, it worked out well!

    @yooyo:
    Hvala!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •