Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


A question about Surface & BackBuffer

This topic is 5426 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Essentially, a surface is a block of memory that holds pixel data and other attributes. This surface can either be stored in hardware (video memory) or software, each of which having its own advantages. You can write pixels to/from surfaces swiftly using direct memory access or "blitting" - bit block transfer - entire sections of memory at a time. You use them by creating them in DirectX and then copying data to them.

A backbuffer is just another surface. When you render something, you don''t render it straight to the screen (generally) - you render it to the backbuffer. When you''ve finished rendering everything, you wait for a vertical retrace and then place the backbuffer on the screen using either page flipping or copying. This method insures that there is no flickering, and back in the day (I believe) it was actually faster than writing straight to the screen. It also eliminates an effect called tearing.

There''s a lot of vocab there, and I''m not going to go through all of it. Keep in mind, though, that the version of DirectX you use will change terminology a bit. In DirectX 7 using DirectDraw, a surface is called a surface. In DirectX9, you have to use DirectGraphics and the way you use surfaces is a bit different.

Anyhow, I hope that helped.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!