Sign in to follow this  

textures and colours

Recommended Posts

ocelot663    122
hi first off can i just say thanks to all the people who have answered my previous questions...i would have given up a long time ago without your help ok heres my next problem... i have used a number of tutorials to build a textured cube using a FVF of (D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1) this allows objects to be covered in textures right? and (D3DFVF_XYZRHW | D3DFVF_DIFFUSE) means i can use colours on the vertices? my question is how can i use these say i had two cubes and i wanted one to have a texture and one with each vertex a different colour? sorry its probably a really stupid question, but i just cant figure it out. thanks

Share this post

Link to post
Share on other sites
jollyjeffers    1570
Just to add to Steve's reply... there are a few tricks you can play with render-states to allow diffuse components and lighting in the same vertex but that's probably overkill for what you're doing.

For the most part consider D3DFVF_DIFFUSE and D3DFVF_NORMAL as interchangeable and mutually exclusive - the rest of the vertex remains the same.

As Steve said, given that the vertex type is actually different you would want to define/create/store/render them seperately.


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