Sign in to follow this  
ocelot663

textures and colours

Recommended Posts

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 together...like 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
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.

hth
Jack

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