summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/d3d/VertexDeclarations.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/GfxDevice/d3d/VertexDeclarations.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/GfxDevice/d3d/VertexDeclarations.h')
-rw-r--r--Runtime/GfxDevice/d3d/VertexDeclarations.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/d3d/VertexDeclarations.h b/Runtime/GfxDevice/d3d/VertexDeclarations.h
new file mode 100644
index 0000000..f737f5a
--- /dev/null
+++ b/Runtime/GfxDevice/d3d/VertexDeclarations.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "D3D9Includes.h"
+#include "Runtime\Filters\Mesh\VertexData.h"
+#include <map>
+
+
+class VertexDeclarations
+{
+public:
+ VertexDeclarations();
+ ~VertexDeclarations();
+
+ IDirect3DVertexDeclaration9* GetVertexDecl( const ChannelInfoArray channels );
+ void Clear();
+
+private:
+ struct KeyType
+ {
+ bool operator < (const KeyType& rhs) const;
+ ChannelInfoArray channels;
+ };
+
+ typedef UNITY_MAP(kMemVertexData, KeyType, IDirect3DVertexDeclaration9*) VertexDeclMap;
+ VertexDeclMap m_VertexDeclMap;
+};