Search code examples
pythonopenglgtkshaderpyopengl

OpenGL embedded in gtk has colour badly displayed: shader at fault?


Note that this is a re-write now that I have more clues as to where the problem could be...

I am creating a GTK GUI which contains two embedded OpenGL displays. Both use the same shader code (complied once for each). On my normal hardware, this works fine. On a virtual machine running on the same hardware, I get horrible colours -- see images.

I suspect that the shader code is at fault -- certainly dropping a simpler shader does make the problem moot. However, I do need both diffuse and spot lights in my shader thus making it non-trivial.

Anyone has seen this before?

Normal Wrong


Solution

  • The shader code was at fault. It was doing too much in the wrong place and was crippling the GPU on the virtual machine. A different shader code made things work fine.