VertexBuffer in DirectX not clearing? Advice?
So...I'm using the graphic device's "Clear" method before I begin a scene, however I still get some strange results when it draws to the screen. I would post the code snippets here...but there is too much.
In the application class, I call the BeginScene, and EndScene functions, and also clear and present the scenes....
In the Game1 class, I populate a "draw" method with a vertexbuffer class, and draw some basic primitives...
The problem is that I cannot get the device to properly dispose of the previous primitive data. If you press the assigned controls to move the primitives, you will see that the "box" continues drawing its previous positions underneath the current position...even when you close the .exe and reopen it.
The controls are as follows:
- Up: Move up
- Down: Move down
- Left: Move left
- Right: Move right
- Shift-Up: Zoom in
- Shift-Down: Zoom out
Any ideas on what I need to do in order to prevent it from drawing this way?