Hello all,
I am trying to use the GL_EXT_texture_integer and GL_EXT_gpu_shader4 extensions with a simple application. I create an unsigned integer RGB texture, attach it to an FBO and I am trying to write from my fragment shader to gl_FragColor.
My OpenGL code seems fine and am able to attach the uint texture to the FBO. My problem seems to stem from not being able to output a uvec4 value to gl_FragColor. I get the following error from my simple fragment shader:
(5) : error C7011: implicit cast from “uvec4” to “vec4”
#version 120
#extension GL_EXT_gpu_shader4 : enable
void main()
{
gl_FragColor = uvec4(1u,1u,1u,1u);
}
If I bind my FBO first and then link and attach my shader, then it goes from an error to a warning, but with the same end result (undefined output).
Haven’t tried it under linux yet, but on my XP partition I am using the 169.21 driver for my nVidia 8800 GTS.
Has anyone been able to successfully write to an integer texture from within a fragment program? Any help would be appreciated.
Chuck