Changes

Jump to: navigation, search

GAM670/DPS905 Weekly Schedule 20121

371 bytes added, 08:01, 22 February 2012
Week 5 - Feb 6
* Vertex Declarations
*: [http://msdn.microsoft.com/en-us/library/windows/desktop/bb172559%28v=vs.85%29.aspx FVF Codes]
<syntaxhighlight lang="cpp">
template <class T = Vertex>
class APIVertexDeclaration {
 
static D3DVERTEXELEMENT9 fmt[MAXD3DDECLLENGTH + 1];
static unsigned vertexSize;
 
public:
static D3DVERTEXELEMENT9* format() { return fmt; }
static unsigned size() { return vertexSize; }
};
</syntaxhighlight>
<syntaxhighlight lang="cpp">
template <>
template<>
unsigned APIVertexDeclaration<Vertex>::vertexSize = 32;
</syntaxhighlight>
<syntaxhighlight lang="cpp">
template <>
unsigned APIVertexDeclaration<LitVertex>::vertexSize = 16;
</syntaxhighlight>
*:: [http://msdn.microsoft.com/en-us/library/windows/desktop/bb172630%28v=vs.85%29.aspx D3DVERTEXELEMENT9 struct]
* The Pipeline
*: [http://en.wikipedia.org/wiki/Instruction_pipeline What is a pipeline]

Navigation menu