Jump to content
  • Advertisement


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


Cg debug frustration

This topic is 5140 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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 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); 
If anyone could offer some help here, would be most appreciated. THX! Edwinz

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!