Sign in to follow this  
Sc4Freak

Difference between Surfaces and Textures?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this