Jump to content
  • Advertisement
Sign in to follow this  
noatom

How would you debug this?

This topic is 2139 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

So I'm working on a small 3d engine with dx 9.The engine is stored in a dll,and then another project uses it.

 

Right now,all I'm trying to display is a cube,but that's just not happening.When I run the code,I see no cube.I went through the code and i'm setting the right buffers,fvf,matrices.

 

How should I debug this?

Share this post


Link to post
Share on other sites
Advertisement

I would place a breakpoint on the place it sends the data off to be rendered and inspect that the data you send is correct. I would also put a breakpoint in the receiving function and check that it gets the same data. Then place another one on the actual draw call and see that that's correct aswel. Also check all return values from D3D calls and see that they come back with S_OK.

Share this post


Link to post
Share on other sites

So,I already check all D3D calls return values.I also went directly to the draw call,and all the functions that set the buffers,transforms etc.It sends the right stuff,but nothing.

 

I'm gonna disable culling and change the cube to a simple polygon...that sounds worthless...but since i got nothing better to do...

 

UPDATE: Well,now i see a line...gonna scale the polygon down to see what happens(however something is wrong,the polygon should be colored,but it's not,it's the same color as the backbuffer)

 

UPDATE 2: Now when trying to run the same project in VS 2013 I get en exception(which guess what,points to no code(msvcr100d)).

 

After all of this i found that it's better to just better put the library code into an exe project that just creates a window an render to it.I'll go through all the code again,and when the bug gets fixed,I'll just get the library code out of the exe project and put it in a .dll project.

Edited by noatom

Share this post


Link to post
Share on other sites
I also advice to run your application with PIX, to see if the d3d calls you expect/ need are sent to the gpu/api.

Share this post


Link to post
Share on other sites

problem solved.It was the fvf that was not being set right, + some render options + the projection matrix...quite a lot....

 

Yea,i used pix to see if the vertices get to the gpu.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!