/** @author Barsi Attila @copyright BMGE Department of Control Engineering and Informatics @brief Direct3D FVFs and vertex structures. */ #pragma once #ifndef d3ddefs_h #define d3ddefs_h //constants #define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ | D3DFVF_TEX1) #define D3DFVF_CUSTOMVERTEX_MODEL2 (D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_LASTBETA_D3DCOLOR) #define D3DFVF_CUSTOMVERTEX_MODEL (D3DFVF_XYZW | D3DFVF_DIFFUSE| D3DFVF_TEX0| D3DFVF_TEX1 | D3DFVF_TEX2| D3DFVF_NORMAL |D3DFVF_TEXCOORDSIZE2(0)|D3DFVF_TEXCOORDSIZE3(1)|D3DFVF_TEXCOORDSIZE4(2)) /** D3D vertex structure corresponds to D3DFVF_CUSTOMVERTEX. */ //structures typedef struct D3DVERTEX_1 { float fX, fY, fZ; float fU, fV; public: D3DVERTEX_1(); D3DVERTEX_1(float fX,float fY,float fZ,float fU,float fV); } D3DVERTEX_1; /** D3D vertex model structure. Corresponds to D3DFVF_CUSTOMVERTEX_MODEL */ typedef struct D3DVERTEX_MODEL { float fX, fY, fZ, fW; float colorRGBr, colorRGBg, colorRGBb, colorRGBa; float u1, v1; float u2, v2, w2; float u3, v3, w3, a3; float nX, nY, nZ, nW; } D3DVERTEX_MODEL; #endif