Advertisement Jump to content
Sign in to follow this  

D3DXMESH vertex color changing

This topic is 4792 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, Is there any way to change vertex color in a d3dxmesh loaded from an x-file? After some experiments I've figured out that the vertex are in fvf as below: XYZ|NORMAL|TEX1 and these are the only things I can change right now. But my app uses dynamic lighting and that works on per-vertex basis (I guess xyz and normal are enough) so vertex colors got to be somewhere. Where? And is it available for me? Or maybe I have to make my own vertex format with color and convert the mesh's vertex buffer to it? I need access the colors directly (I have to find the time to learn those famous shaders ;-) ) to implement a simple shadow system. I know there are better methods but I'm trying to understand all this a little deeper. Thanks Bartiss

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!