Jump to content
  • Advertisement
Sign in to follow this  
jor1980

Which is the diference between surface and texture

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

Advertisement
Hey mate,

Maybe you should have a read through this:

hhttp://en.wikipedia.org/wiki/Computer_graphics#Concepts_and_principles

Quote:
Texture mapping
Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in 1974. A texture map is applied (mapped) to the surface of a shape, or polygon.


Let me know if you have any specific questions!

Cheers,
Bach

Share this post


Link to post
Share on other sites
Quote:
Original post by thebach
Hey mate,

Maybe you should have a read through this:

hhttp://en.wikipedia.org/wiki/Computer_graphics#Concepts_and_principles

Quote:
Texture mapping
Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in 1974. A texture map is applied (mapped) to the surface of a shape, or polygon.


Let me know if you have any specific questions!

Cheers,
Bach


i don´t have it clear. So if i have a 3d model i can render it with either a surface or a texture?

Share this post


Link to post
Share on other sites
I think he is talking about the difference between Direct3D textures and surfaces.

Needforhint best describes it on this forum http://forums.xna.com/forums/p/15292/80148.aspx:

"texture is a c++ object allocated in system memory while surface is a member of this object, allocated in video memory,"

The MSDN library confirms this.

"A surface represents a linear area of display memory and usually resides in the display memory of the display card, although surfaces can exist in system memory.",
http://msdn.microsoft.com/en-us/library/bb219683(v=VS.85).aspx

Needforhint also states that surfaces can be locked for further operations which would bring them down to system memory.

Share this post


Link to post
Share on other sites
Quote:
Original post by tariqwalji

I think he is talking about the difference between Direct3D textures and surfaces.

Needforhint best describes it on this forum http://forums.xna.com/forums/p/15292/80148.aspx:

"texture is a c++ object allocated in system memory while surface is a member of this object, allocated in video memory,"


yes i was talking about that, because i was using slimdx to convert textures between differnt dxt types but i can only do it with surfaces and not with textures, and i don´t understand why i can convert surfaces to the dxt type that i want and why i can´t do the same with textures

Share this post


Link to post
Share on other sites
Quote:
Original post by jor1980
yes i was talking about that, because i was using slimdx to convert textures between differnt dxt types but i can only do it with surfaces and not with textures, and i don´t understand why i can convert surfaces to the dxt type that i want and why i can´t do the same with textures
A texture is a collection of one or more surfaces, one for each mip level. Both surfaces and textures can be stored in system or video memory.

If you want to convert a texture from one format to another, you need to iterate through each surface level (In C++ that's done with the GetSurfaceLevel() function, and GetDesc() to get the number of surfaces in it), and convert each surface level in turn.

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!