Advertisement

game programming genesis articles

Started by February 20, 2001 03:11 PM
1 comment, last by omegasyphon 23 years, 11 months ago
i have a question about these articles, how is it possible that the code runs when it doesnt seem to be locking the backbuffer or any surface that i can find?
Which article are you talking about? All the demo programs are a bit different. But you seem to be under the assumption that you need to have some kind of surface lock to produce any results in DirectX, and that''s not the way it is. Locking surfaces is done when you want to read and write the actual RGB data on the surface (i.e. pixel plotting, manual fading/transparency, etc.). If you''re simply going to be using the blitter to move bitmaps back and forth, which is more common, then you don''t need a lock. In fact, the blitter will not work on a locked surface.

The sample code that comes with article #5 locks the surface because it is simply plotting pixels. The sample code for #3 obviously doesn''t lock a surface because it''s not using DirectX, and the sample code for articles #6 and #8 does all the graphics with the blitter.

-Ironblayde
 Aeon Software

Down with Tiberia!!
"Your superior intellect is no match for our puny weapons!"
Advertisement
well know wonder, i always thought u needed to lock the surface to display bitmaps, guess i just red it all wrong, thanks

This topic is closed to new replies.

Advertisement