PDA

View Full Version : I can not found the gl_FragColor struct.



Treehouse
7th January 2010, 15:14
Hello,

i have a very strange problem. I get from a camera 8Bit grayscale images very fast and often. I use a QGLWidget to display the images,
thats works very nice with a low CPU performance.

Now i have to tint the color white which have the number 255 in the grayscale table, as white. In an other forum i get the tip from a user
to use a fragment shader to switch all white pixels to red.

Now i have the problem that i could not define the fragment shader struct because the the "gl_FragColor " struct is not define.
Can anyone give me a hint how i could use a fragment shader with QT 4.5.3.

Perhaps anyone of you have another idea to draw the pixels in red, with not some much cpu cycles.

Thanks in advanced

Treehouse