Which is the diference between surface and texture

Started by
5 comments, last by Evil Steve 13 years, 6 months ago
Hi, i would like to know which is the diference between surface and texture in directx
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
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?
3d Model:

Texture:


A texture is used to "colour" or "texture" a 3d model or a 3d surface.

Hope it helps!

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

This topic is closed to new replies.

Advertisement