Sign in to follow this  
derek7

what do you do about material and texture?

Recommended Posts

derek7    100
I do it this way: I put mesh and material and texture file in a class . but I find some engine(like ogre) put material and texture into seperate class. so what is good this way?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Reuse of resources most likely. A material is a composition of textures and effects, while a texture is strictly RGB(A) data. The same textures can be used in several materials, and it is better to reuse it in all materials, than having several copies of the same data.

Share this post


Link to post
Share on other sites
JohnBolton    1372
A material contains other data in addition to textures (such as shaders and colors). A material can reference multiple textures, and different materials can reference the same texture.

So, materials and textures should be separate.

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