From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/d3d/VertexDeclarations.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Runtime/GfxDevice/d3d/VertexDeclarations.h (limited to 'Runtime/GfxDevice/d3d/VertexDeclarations.h') 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 + + +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; +}; -- cgit v1.1-26-g67d0