Archived

This topic is now archived and is closed to further replies.

martin76

help, directx problem.

Recommended Posts

can anyone help me, the problem is: i am writing a simple RTS game, 800x600 16bit color. game screen dimension is 800x416, interface dimension is 800x184. the game screen portion is updated entirely each frames, but the interface portion is updated only when necessary (dirty rectangle). before the game started, i write the interface portion at primary and backbuffer, so no matter how page flipped, my interface image still there (this is what i expect) i succeeded in low vram vcard (such as 2mb vram), but totally fail at higher vram vcard (8mb or above), the interface portion flicker, it seems that the directdraw back buffer is not located at the same place of vram everytime, it will change, am I rite?? if so, how do solve this kind of problem? i use page flipping, but some portion i don''t want redraw every frame. ok, thanx

Share this post


Link to post
Share on other sites
if your using the standard double buffering method with directdraw you don''t need (or should) write anything to the primary surface. Draw everything to the backbuffer and VSync when flipping buffers.

If this dos''nt solve your problem then are you clearing the backbuffer before drawing, with the dirty rectangle method you should''nt.

,Jay

Share this post


Link to post
Share on other sites