Jump to content
  • Advertisement
Sign in to follow this  
snakecjy

How to make FVF for my Vertex???

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

typedef struct { D3DXVECTOR3 p; D3DXVECTOR3 n; D3DXVECTOR3 p2; // Wave Height Scale FLOAT tu1, tv1, tw1; D3DXVECTOR3 t; } VERTEX; and my fvf is const DWORD D3DFVF_TLVERTEX = ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEXCOORDSIZE3(0) | D3DFVF_TEXCOORDSIZE3(1) | D3DFVF_TEXCOORDSIZE3(2) ); I don't think it's right , but I don't know how to make the right thing. Could someone tell me???? Appreciate your help!!!

Share this post


Link to post
Share on other sites
Advertisement
A minor tip for associating fvf with the vertex type :



typedef struct
{
D3DXVECTOR3 p;
D3DXVECTOR3 n;
D3DXVECTOR3 p2; // Wave Height Scale
FLOAT tu1, tv1, tw1;
D3DXVECTOR3 t;

enum
{
FVF = ( D3DFVF_XYZ |
D3DFVF_NORMAL |
D3DFVF_TEX3 |
D3DFVF_TEXCOORDSIZE3(0) |
D3DFVF_TEXCOORDSIZE3(1) |
D3DFVF_TEXCOORDSIZE3(2) )
)
};

} VERTEX;




Then you just reference it with VERTEX::FVF

Share this post


Link to post
Share on other sites
Quote:
Original post by SimmerD
A minor tip for associating fvf with the vertex type :

*** Source Snippet Removed ***

Then you just reference it with VERTEX::FVF


thats nice, tnx for a tip. i was using #define VERTEX_FVF D3DFVF_XYZ|D3DFVF_NORMAL...

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.

GameDev.net 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!