Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.2 KiB

  1. #ifndef RENDERABLE_G_H
  2. #define RENDERABLE_G_H
  3. #ifdef COMPILER_MSVC
  4. #pragma once
  5. #endif
  6. #include "resourcefile/resourcefile.h"
  7. #include "resourcefile/resourcetype.h"
  8. #include "renderbuffer.g.h"
  9. //-----------------------------------------------------------------------------
  10. // Enum definitions
  11. //-----------------------------------------------------------------------------
  12. enum RenderPrimitiveType_t
  13. {
  14. RENDER_PRIM_POINTS = 0,
  15. RENDER_PRIM_LINES,
  16. RENDER_PRIM_LINES_WITH_ADJACENCY,
  17. RENDER_PRIM_LINE_STRIP,
  18. RENDER_PRIM_LINE_STRIP_WITH_ADJACENCY,
  19. RENDER_PRIM_TRIANGLES,
  20. RENDER_PRIM_TRIANGLES_WITH_ADJACENCY,
  21. RENDER_PRIM_TRIANGLE_STRIP,
  22. RENDER_PRIM_TRIANGLE_STRIP_WITH_ADJACENCY,
  23. RENDER_PRIM_INSTANCED_QUADS,
  24. RENDER_PRIM_HETEROGENOUS,
  25. RENDER_PRIM_TYPE_COUNT,
  26. };
  27. //-----------------------------------------------------------------------------
  28. // Structure definitions
  29. //-----------------------------------------------------------------------------
  30. schema struct RenderBufferBinding_t
  31. {
  32. CResourceReference< RenderBufferBits_t > m_pRenderBuffer;
  33. uint32 m_nBindOffsetBytes;
  34. uint8 m_padding[4];
  35. };
  36. schema struct MaterialDrawDescriptor_t
  37. {
  38. int32 m_nBaseVertex;
  39. int32 m_nVertexCount;
  40. int32 m_nStartIndex;
  41. int32 m_nIndexCount;
  42. int32 m_nStartInstance;
  43. int32 m_nInstanceCount;
  44. uint8 m_nPrimitiveType; // See RenderPrimitiveType_t
  45. uint8 m_padding[3];
  46. CResourceArray< RenderBufferBinding_t > m_Buffers;
  47. CResourceString m_pMaterialName;
  48. //! opaquePointer
  49. void *m_pMaterial;
  50. };
  51. schema struct PermRenderableBounds_t
  52. {
  53. Vector m_MinBounds;
  54. Vector m_MaxBounds;
  55. };
  56. //! uncacheableStruct = PermRenderableBounds_t
  57. schema struct Renderable_t
  58. {
  59. CResourceArray< MaterialDrawDescriptor_t > m_DrawCalls;
  60. };
  61. class CRenderable; // Forward declaration of associated runtime class
  62. DEFINE_RESOURCE_CLASS_TYPE( Renderable_t, CRenderable, RESOURCE_TYPE_RENDERABLE );
  63. typedef const ResourceBinding_t< CRenderable > *HRenderable;
  64. typedef CStrongHandle< CRenderable > HRenderableStrong;
  65. #define RENDERABLE_HANDLE_INVALID ( (HRenderable)0 )
  66. #endif // RENDERABLE_G_H