Quote:Original post by juxie
When I specify the D3DLOCK_DISCARD, i will get errors on debug runtime.
What should I specify if I am trying to efficiently render particle system.
Then that's a seperate bug that should be fixed. The correct way to render a particle system is described in the Documentation, under
Using Dynamic Vertex and Index Buffers. You should have a huge vertex buffer (Usually enough for at least 2 frames of data), and lock it in chunks. Keep looking the next "chunk" using D3DLOCK_NOOVERWRITE, and then when you get to the end of the buffer, lock with D3DLOCK_DISCARD and start from the start again.
Quote:Original post by juxie
Yes if I take screen shot, i will just be a solid green screen.
Does that mean it's alright?
Nope, that just confirms that it is the debug runtimes filling the backbuffer with green.
I had a thought - do you actually have a Z-buffer? If you don't, Clear() will fail (Because you're telling it to clear the Z-buffer too), which will cause exactly what you're seeing. If that's not it, is Clear() actually failing?