Skip to main content
GameDev.net gamedev.net
🔒 Locked

D3DFVF_MODELVERTEX

Started by tom76 Oct 15, 2001 at 8:26 AM 2 replies 150+ views
Original Post
tom76
tom76
what does D3DFVF_MODELVERTEX mean? I know it''s a Flexible Vertex Format flag, but I can''t find the definition in the SDK''s help file. Anyone? Taken from round about line 868 (LoadTerrainModel function) // Set the FVF to a reasonable type g_pTerrain->SetFVF( g_pd3dDevice, D3DFVF_MODELVERTEX ); Observe everything, remember more!
if (witisism == !witty) return to_hole
necr0
necr0
You haven''t mention what sample this code comes from and what version of DX you are using, but I will take a guess.

DX used to have three Flexy vertex formats defined (D3D_VERTEX, D3D_LVERTEX, D3D_TLVERTEX) in DX8 you no longer get these and have to define your own.

So the easy answer is (probably) MODELVERTEX is an application specific vertex format.
That is not dead can eternal lie, and even in sleep death may die.
tom76
tom76
I''m using directx8, the donuts3D example on the SDK

Observe everything, remember more!
if (witisism == !witty) return to_hole
necr0
necr0
MODEVERTEX is defined as :
struct MODELVERTEX
{
D3DXVECTOR3 p;
D3DXVECTOR3 n;
FLOAT tu, tv;
};

the D3DFVF_MODELVERTEX is defined as :

#define D3DFVF_MODELVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1)


This basically tells DirectX what 'attributes' to expect for this vertex type (this is a very simple and crude explanation) Read the SDK for more information. You you be surprised how usefull this is. Read the section in DirectX Graphics->Using DirectX Graphics->Vertex Formats.

D3DFVF_MODELVERTEX tells directx that this vertex has a position vector, a normal vector and texture coordinates

Edited by - necr0 on October 15, 2001 11:41:00 AM
That is not dead can eternal lie, and even in sleep death may die.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.