topical media & game development

talk show tell print

graphic-directx-game-08-MeshDemo-Vertex.cpp / cpp



  //=============================================================================
  // Vertex.cpp by Frank Luna (C) 2005 All Rights Reserved.
  //=============================================================================
  
  include <Vertex.h>
  include <d3dUtil.h>
  
  // Initialize static variables.
  IDirect3DVertexDeclaration9* VertexPos::Decl = 0;
  
  void InitAllVertexDeclarations()
  {
          //===============================================================
          // VertexPos
  
          D3DVERTEXELEMENT9 VertexPosElements[] = 
          {
                  {0, 0,  D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
                  D3DDECL_END()
          };        
          HR(gd3dDevice->CreateVertexDeclaration(VertexPosElements, &VertexPos::Decl));
  }
  
  void DestroyAllVertexDeclarations()
  {
          ReleaseCOM(VertexPos::Decl);
  }


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.