My Project
DropShadowRenderer.h
1 
2 
3 #pragma once
4 #include <stdint.h>
5 #include"ParaEngine.h"
6 #include "VertexFVF.h"
7 
8 namespace ParaEngine
9 {
11  {
12  public:
13  Vector3 Position;
14  float InstanceIndex;
15  float v;
16 
18  };
19 
21  {
22  public:
25  void Render();
26  void CreateBuffer();
27  void BeginFrame();
28  void DropShadowRenderer::AddInstance(Vector3& worldPos,Vector3& renderPos,float size);
29 
30  uint32_t GetInstanceCount(){return m_instanceCount;}
31  uint32_t GetMaxInstanceCount(){return g_maxInstanceCount;}
32 
33  void InitDeviceObjects();
34  void InvalidateDeviceObjects();
35  void DeleteDeviceObjects();
36  void Cleanup();
37 
38  private:
39  static const uint32_t g_maxInstancePerBatch = 70;
40  static const uint32_t g_maxInstanceCount = 100;
41 
42  IDirect3DVertexBuffer9* m_pGeometryBuffer;
43  IDirect3DIndexBuffer9* m_pIndexBuffer;
44 
45  uint16_t m_instanceVertexCount;
46  uint16_t m_instanceIndexCount;
47 
48  uint16_t m_totalVertexCount;
49  uint16_t m_totalIndexCount;
50 
51  uint16_t m_instanceCount;
52 
53  std::vector<float> m_constantBuffer;
54 
55  void CreateCylinder(float height,float radius,int tesselationFactor,Vector3* pVertices,uint16_t* pIndices);
56 
57  void DrawAllBatch(IDirect3DDevice9* pDevice);
58  };
59 }
Definition: DropShadowRenderer.h:10
different physics engine has different winding order.
Definition: EventBinding.h:32
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
Definition: DropShadowRenderer.h:20