Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


pls be kind to submit a 'dirty rectangle' scheme article....


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 mickey   Members   -  Reputation: 100

Like
Likes
Like

Posted 13 January 2002 - 12:25 AM

thanks!!! or can you just explain in very simple matter how someone does that?

Sponsor:

#2 Kneelz   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 January 2002 - 08:04 PM

If you want a dirty rectangle, then start Paint. Make a 256x256 bitmap and use the sprayer. The bitmap then looks very dirty.


#3 ghost1206   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 January 2002 - 12:16 AM

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!

#4 mickey   Members   -  Reputation: 100

Like
Likes
Like

Posted 14 January 2002 - 01:57 AM

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,

maybe Kneelz really meant that?

#5 ghost1206   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 January 2002 - 05:40 AM

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!

Kneelz made a bad joke.

#6 mickey   Members   -  Reputation: 100

Like
Likes
Like

Posted 15 January 2002 - 06:14 AM

yup me too! i also even don''t use palettes,




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS