Mercurial > LightClone
view LightClone/Source/VertexTypes.h @ 40:00d17d8f407d
Hookup game over dialog; Remove Code class
author | koryspansel |
---|---|
date | Thu, 22 Sep 2011 10:21:14 -0700 |
parents | 7e3a0ae9c016 |
children | efd2b1ca5b77 |
line wrap: on
line source
/* * VertexTypes */ #ifndef __VERTEXTYPES_H__ #define __VERTEXTYPES_H__ #include "Core.h" #include <d3d9.h> #include <d3dx9.h> /* * Vertex */ namespace Vertex { /* * Block */ struct Block { /* * Position */ D3DXVECTOR3 Position; /* * Normal */ D3DXVECTOR3 Normal; /* * TextureCoordinates */ D3DXVECTOR2 TextureCoordinates; /* * Declaration */ static IDirect3DVertexDeclaration9* Declaration; public: /* * Block */ Block(float fX, float fY, float fZ, float fNormalX, float fNormalY, float fNormalZ, float fU, float fV) { Position.x = fX; Position.y = fY; Position.z = fZ; Normal.x = fNormalX; Normal.y = fNormalY; Normal.z = fNormalZ; TextureCoordinates.x = fU; TextureCoordinates.y = fV; } }; /* * Quad */ struct Quad { /* * Position */ D3DXVECTOR3 Position; /* * TextureCoordinates */ D3DXVECTOR2 TextureCoordinates; /* * Declaration */ static IDirect3DVertexDeclaration9* Declaration; public: /* * Quad */ Quad(float fX, float fY, float fZ, float fU, float fV) { Position.x = fX; Position.y = fY; Position.z = fZ; TextureCoordinates.x = fU; TextureCoordinates.y = fV; } }; } /* * InitializeVertexTypes */ ErrorCode InitializeVertexTypes(IDirect3DDevice9* pDevice); /* * TerminateVertexTypes */ void TerminateVertexTypes(); #endif //__VERTEXTYPES_H__