Jump to content
  • Advertisement
Sign in to follow this  
Sc4Freak

Difference between Surfaces and Textures?

This topic is 4399 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

I've just started on Direct3D9, and I'm confused. I've had past experience with DirectDraw, and in DirectDraw every texture/bitmap/array of pixels was called a "surface". But in Direct3D9 they seem to be 2 different things. I thought they would be the same, just an array of pixels. But I guess not. So what's the difference between a surface and a texture in Direct3D9? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Basically there's no difference, texture is just a superset of surfaces. One texture could have more surfaces(corresponding to each mip level)

Share this post


Link to post
Share on other sites
A texture can also be volumetric (3d) or a box of six main surfaces (for cube mapping).

The concept of textures and surfaces is primarily abstract - they exist to ease the allocation and management of essentially flat video memory. DirectDraw just happens to implement this abstraction a little bit differently than D3D8 and up (and most programmers greatly prefer the new style).

In D3D9, people generally use texture objects and only extract the surface interfaces from them if some custom copying operation between the surfaces is needed. D3DX has many helpful routines for direct texture loading, so a new programmer (with a small project) may not need to access surfaces explicitly at all.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!