When I draw something on a DirectX surface it sometimes flashes. Why?
Printable View
When I draw something on a DirectX surface it sometimes flashes. Why?
No
Thats the problem ;) use a backbuffer
Look up double-buffering (or even triple-buffering) for info on using a back buffer. Basically you create a secondary surface the same size as your primary surface and construct your image on that, and then you 'flip' the whole secondary surface onto your primary. This way it doesn't flicker, unless the frame rate is very low.
hm, with low frame rates you dont get flickering... since you just flip the buffers you will probably have 3 pictures per second but it wont flicker ;)
Thanks... I'll try using backbuffers.
Fox - well err yeah I didn't really mean flickering, just general jerkiness. My mistake.
ok - accepted ;)