summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/d3d11/StreamOutSkinnedMesh.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/d3d11/StreamOutSkinnedMesh.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/GfxDevice/d3d11/StreamOutSkinnedMesh.h')
-rw-r--r--Runtime/GfxDevice/d3d11/StreamOutSkinnedMesh.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/d3d11/StreamOutSkinnedMesh.h b/Runtime/GfxDevice/d3d11/StreamOutSkinnedMesh.h
new file mode 100644
index 0000000..7d95232
--- /dev/null
+++ b/Runtime/GfxDevice/d3d11/StreamOutSkinnedMesh.h
@@ -0,0 +1,42 @@
+#ifndef __STREAMOUTSKINNEDMESH_H__
+#define __STREAMOUTSKINNEDMESH_H__
+
+#include "External/DirectX/builds/dx11include/d3d11.h"
+#include "Runtime/GfxDevice/GPUSkinningInfo.h"
+class VBO;
+class Matrix4x4f;
+class ThreadedStreamBuffer;
+class GfxDeviceD3D11;
+
+// MemExport mesh skinning data.
+class StreamOutSkinningInfo : public GPUSkinningInfo
+{
+ friend class GfxDeviceD3D11;
+private:
+ ID3D11Buffer* m_SourceVBO;
+ ID3D11Buffer* m_SourceSkin;
+ ID3D11Buffer* m_SourceBones;
+
+ //! Stores the bone count from the previous call to UpdateSourceBones. Used to select the most suitable shader version.
+ int m_BoneCount;
+
+ // Private constructor and destructor , called from GfxDeviceD3D11
+ StreamOutSkinningInfo() : GPUSkinningInfo(), m_SourceVBO(NULL), m_SourceSkin(NULL), m_SourceBones(NULL) {}
+ virtual ~StreamOutSkinningInfo();
+
+
+ // Actual implementation methods, called from GfxDeviceD3D11
+
+ void UpdateSourceData(const void *vertData, const BoneInfluence *skinData, bool dirty);
+ void UpdateSourceBones(const int boneCount, const Matrix4x4f* cachedPose);
+ void SkinMesh(bool last);
+
+public:
+
+ //! Clean up created shaders
+ static void CleanUp();
+
+};
+
+
+#endif