Advertisement

2 questions

Started by February 20, 2000 01:46 PM
2 comments, last by NewDeal 25 years ago
i got two probably fairly simple questions. I consider myself a newbie and havent really got that much experience with game programming. Anyways ... Here''s qhat id like to know: 1) How fast is a directdraw colorfill ?... Is it faster than blitting a fullscreen bitmap... The same amount of data will need to be transfered... or not ? 2) Why am i locking my directdraw surfaces ? ... my apps seems to work just as well if i dont. Thanx
1) colorfill is faster, i don''t know why but it is written down somewhere.

2) you can lock surfaces to access their memory directly, for example to perform translucent blits between surfaces.
however you don''t need to do this if you don''t want to manipulate the surface data on your own
Advertisement
Colorfill is faster because there is no need to read image pixels.

You have to lock your surfaces to get the pointer, so that DX can move the actual data as needed. It not often that the data needs to be moved though, that is why it works without locking.
Thats all i need to know.

Thanx

This topic is closed to new replies.

Advertisement