How would you debug this?

Started by
3 comments, last by noatom 10 years, 7 months ago

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?

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.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

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.

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

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

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.

This topic is closed to new replies.

Advertisement