ko this is it!
Debugging Cg doesnt quite make sense to me...
i created a fragment program that takes in a "-debug" argument,
and a vertex program that doesnt.
next my simple fragment code:
struct Fragment
{
fixed4 position : POSITION;
fixed4 color : COLOR0;
};
struct Pixel
{
float4 color : COLOR;
};
Pixel MyFragmentProgram(Fragment IN)
{
Pixel OUT;
debug(float4(0.5f,1.0f,0.6f,0.3f));
OUT.color = IN.color;
return OUT;
}
ok, i run in debug VC++.net mode, and saw a black screen.
so i tried retrieving the color values in both the front and back buffers, but to no avail, am i getting the right results...
float data[4];
glReadBuffer(GL_BACK);//or front
glReadPixels(10, 10, 1, 1, GL_RGBA, GL_FLOAT, data);
Debug::WriteLine(data[0].ToString());
Debug::WriteLine(data[1].ToString());
Debug::WriteLine(data[2].ToString());
Debug::WriteLine(data[3].ToString());
If anyone could offer some help here, would be most appreciated.
THX!
Edwinz