When writing to gl_BackColor inside a GLSL vertex shader, it is ignored as long as no call to glEnable(GL_VERTEX_PROGRAM_TWO_SIDE) was made. So the fragment shader's gl_Color always ends up with the value of gl_FrontColor.
Would it be a problem to enable GL_VERTEX_PROGRAM_TWO_SIDE by default (i.e. in GLRenderSystem::initGL) ?
Enabling GL_VERTEX_PROGRAM_TWO_SIDE
- wernermarius
- Gnoblar
- Posts: 12
- Joined: Fri May 25, 2007 8:36 am
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
Have you tried this (in your GLSL)?
Code: Select all
#extension GL_VERTEX_PROGRAM_TWO_SIDE : enable
- wernermarius
- Gnoblar
- Posts: 12
- Joined: Fri May 25, 2007 8:36 am
If I do that in my vertex shader, I getsinbad wrote:Have you tried this (in your GLSL)?
Code: Select all
#extension GL_VERTEX_PROGRAM_TWO_SIDE : enable
Code: Select all
WARNING: 0:2: extension 'GL_VERTEX_PROGRAM_TWO_SIDE' is not supported- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
- wernermarius
- Gnoblar
- Posts: 12
- Joined: Fri May 25, 2007 8:36 am
