Jump to content
  • Advertisement
Sign in to follow this  
ocelot663

textures and colours

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

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
Advertisement
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
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!