All things are the same but render result

Started by
0 comments, last by remigius 13 years, 6 months ago
In our games, there is one problem about rendering speedTree. We start our game without changing anything, but all the speedTrees are rendered correctly sometimes and all are disappear sometimes.

I doubt that this problem may be caused by occlusion culling first. But I found that the vertexes were pushed to render queue. All the object in render queue would be rendered.

Then, I debug the program. I delete all the speedTrees but the test one on the map. I contrast the data about the vertex of speedTree disappeared with the correctly situation.

The vertexes, indexes, matrix and bounding box are the same when building the speedTree. And all the vertexes and indexes would pass to the D3D function called DrawIndexedPrimitive(). Before the function calledd, the vertexes and indexes are the same.

At last, I printed the render state in these two situations before calling DrawIndexedPrimitive(). And the render state are also the same.

I don't know why the speedTree can be render correctly.
Advertisement

Well, if the data & states are the same, it'll be hard to point out what can be causing this. Isn't there anything different at all between the two cases? Maybe something a bit more remote from the rendering, like a missing texture or alpha map?
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!

This topic is closed to new replies.

Advertisement