Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Problem with setting vertex struct

This topic is 5802 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, I have a problem with shaders and compatibiliti between Cg shader and FVF "shader"(I don''t know, how to describe it)How to set a struct for vertex format. If I use "D3DXCOLOR color", it doesn''t work with CG because it uses only floats and if I use float r,g,b,a, it doesn''t work with D3DFVF_DIFFUSE. struct AWMVERTEX { float x,y,z; float nx,ny,nz; float color[4]; float tu,tv; }; ... I need to do something like this: if(bUseCGShader) CGShader.VertexProgramContainer->SetShaderActive(); else Device->SetVertexShader(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1); please help, thx Y2K.bug

Share this post

Link to post
Share on other sites

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