help, directx problem.

Started by
1 comment, last by martin76 22 years, 2 months ago
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
Advertisement
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
mebbe teh card has more than 2 buffers. try drawing the interface and flipping a few times and see if that fixes it.
I''m not interested, really.

This topic is closed to new replies.

Advertisement