Apologies if this isn’t the place for Cg questions, I haven’t found a forum devoted to that yet…
There seems to be very little documentation available for the Cg Standard Library. Anyone know a good reference?
In particular…
-
If I have a fragment program which needs to access a texture, is it enough to specify the coordinate
samplerRECT tex : TEXUNIT0
? I read somewhere that these parameters have to be uniform, but that doesn’t make sense to me—the glBindTexture call should be all the higher-level code has to do. It shouldn’t need to call cgGLSetTextureParameter as well, or so my sensibility goes. -
How does the texRECT function behave when presented with texture coordinates outside the range [0,h]x[0,w]? Is this dependent on the OpenGL texture mode?
-
How do I retrieve the width and height of a samplerRECT object? If necessary I could pass them as a uniform float2, but that seems like a waste, again…
-
Can uniform parameters be int2, etc, or just floating-point types? I ask because (again, due to lack of a good reference list) I only see versions of cgGLSetParameter* which take floats and doubles.
Thanks…