AnsweredAssumed Answered

Weird issue where a certain color causes render failure

Question asked by codr on Nov 14, 2015
Latest reply on Nov 16, 2015 by codr

I'm having an issue where triangles won't render if their green color component is greater than 55 (that's of 0-255 ubyte).


I'm using Ubuntu 15.10 with the fglrx-updates 2:15.201-0ubuntu1 driver. Hardware is R9 280x.


I'm rendering in orthographic "2D" mode using OpenGL 4.2 with 64-bit vertex coordinates.


I have created a simple SDL program that demonstrates the issue. See here:

c---/opengl-test · GitHub


I realize GL_QUADS are deprecated but I have also tested with GL_TRIANGLE_STRIP and it behaves the same way. If I set the color to 0,55,0,255 then everything renders fine. However, if I change the green color to anything higher than 55, then nothing renders. They seem to not even enter the shader because if I hard-code the vertex shader to always output the same color (frag_color in shader) I still see nothing rendering on the screen unless I set the green to 55 or less.


Bizarre eh? Bug in the driver or am I doing something wrong? This code works 100% correctly on nVidia hardware. I'm not sure about Intel, I'm trying to set up a new machine that will run the newer mesa with OGL4 support.