This topic is now archived and is closed to further replies.


Cg debug frustration

Recommended Posts

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;
	OUT.color = IN.color;
	return OUT;
ok, i run in debug 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); 
If anyone could offer some help here, would be most appreciated. THX! Edwinz

Share this post

Link to post
Share on other sites