Jump to content
  • Advertisement
Sign in to follow this  

[D3D9] Texture vs Surface for Sprites

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

Hi EveryBody.

what would be better to use, IDirect3DTexture9 or IDirect3DSurface9 ?
i read Dissecting Sprites in D3D and see that a texture can only be as big as the Graphics card supports, where the surface has no limitation on size.

but other then that, what is the difference and why should i use the one instead of the other ?

sub question, i dont see a IDirect3DTexture10 / IDirect3DSurface10 interface, is that because it has not changed and is used in D3D 10/11 ?

Thanks in Advance.

Share this post

Link to post
Share on other sites
In general, a surface is just a memory area that holds images of a given pixel format.

A texture, on the other hand, is an union of 1 or more surfaces that can be used for texturing rendered geometry.

While it is possible to copy data directly between surfaces (offscreen to backbuffer, for example), the rendering of textures is generally faster.

Also, since textures do not limit you to rectangular copies, they are generally more suited to drawing transformable (movable, rotatable, scalable) objects such as game characters.

In D3D10 and D3D11, the interfaces are totally different from D3D9. The textures are more generalized as "shader resources", but there are still ID3D10Texture* specialized interfaces that implement typed mapping (analogous to locking) for these resources.

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!