Original Post
Hello,
I wrote my own batching system to replace D3DXSprite because I wanted more flexibility. Recently I started getting this problem - when I drop my in game console and start typing, some of the triangles rendered later in a batch than the console text suddenly start flashing with the wrong texture.
It's as if, for a duration of one frame, when a new pair of triangles gets added to the render batch for typed character, something in the batch processing code goes wrong and one of the renderables gets the texture from a previous or next renderable in sequence.
I realize there is nothing you can do that would be much better than what I can do, since I wrote the code, but the reason I am asking is because when I do a PIX run and record every single frame from start to finish.... The flashing doesn't show up!
How can this be? If I can see some triangles with the wrong texture applied for a split second that means at least one frame must have those triangles textured with the wrong texture. Yet as I looked though every single frame in Pix capture, all the rendering was spot-on perfect and all the D3D calls were perfect. What's worse, this problem only happens in Release mode! So I can't even step through anything to debug and try to see what goes on.
Has anyone had an experience such as this one? Can you recommend some other debugging method to catch what's happening? I just finished writing some debugging code that dumps the contents of render queue each time it gets submitted to DirectX, looked carefully through the thousands of entries for every triangle and every batch, and everything looks perfect as well! I really don't know what to do any more.
I wrote my own batching system to replace D3DXSprite because I wanted more flexibility. Recently I started getting this problem - when I drop my in game console and start typing, some of the triangles rendered later in a batch than the console text suddenly start flashing with the wrong texture.
It's as if, for a duration of one frame, when a new pair of triangles gets added to the render batch for typed character, something in the batch processing code goes wrong and one of the renderables gets the texture from a previous or next renderable in sequence.
I realize there is nothing you can do that would be much better than what I can do, since I wrote the code, but the reason I am asking is because when I do a PIX run and record every single frame from start to finish.... The flashing doesn't show up!
How can this be? If I can see some triangles with the wrong texture applied for a split second that means at least one frame must have those triangles textured with the wrong texture. Yet as I looked though every single frame in Pix capture, all the rendering was spot-on perfect and all the D3D calls were perfect. What's worse, this problem only happens in Release mode! So I can't even step through anything to debug and try to see what goes on.
Has anyone had an experience such as this one? Can you recommend some other debugging method to catch what's happening? I just finished writing some debugging code that dumps the contents of render queue each time it gets submitted to DirectX, looked carefully through the thousands of entries for every triangle and every batch, and everything looks perfect as well! I really don't know what to do any more.