Ok! I am not a *guru*, but I''ll try to help you the best way I can. "Dirty Rectangles" is a technique to make the bliting of your bitmaps faster. The general idea is to update only the part of the bitmap that has changed and not the whole bitmap. To do it, you "patch" the portion of the bitmap that has changed (the "dirty" portion) with the portion that you wish to display next and that''s it! An example of use? Hmm! Imagine you have a large bitmap, that is your background, and a smaller one, that is your hero, loaded to your offscreen surface. The first time, you blit the background to the backbuffer surface and on top of it you blit the hero. Then, if you wish to move your hero to another position you aren''t bliting the whole background, but rather blit only the part of the background that is enough to "cover" the hero in its old position and then blit the hero in the new position. Hope that helps. Tell me if you need more help.
Oh yes! Kneelz.. if you can''t help then it''s better to keep your mouth shut. Pathetic lamer!
ah okey ghost1206, i got you point very well, you use RECT structures to do those stuff, but the things i''ve read on, they used clippers to do the stuff, that''s my problem, all i know about clippers is, it lets you NOT draw on the surface with clippers,
oh btw, your style, i used that to animate directly to the primary surface, that means no flipping,
As far as I know you never blit on the primary surface. You must always use the scheme: offscreen Surface, primary Surface, secondary Surface(s). You load all the bitmaps on the offscreen surface and from there you blit to the secondary and flip. If you are using v.studio 6.* take a look at the ddex4 example to clarify this. Play with it a bit (by changing it) and make sure you understand what''s going on. If you can master this little, but to the point, example you''ll be ready to play with direct draw surfaces.
I guess using clippers make things easier but, to be honest, I''ve never used them. The simpler the better!