BsRendererObject.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsRenderBeastPrerequisites.h"
  5. #include "BsRenderableElement.h"
  6. #include "BsRenderable.h"
  7. namespace bs
  8. {
  9. /** @addtogroup RenderBeast
  10. * @{
  11. */
  12. struct MaterialSamplerOverrides;
  13. /**
  14. * @copydoc RenderableElement
  15. *
  16. * Contains additional data specific to RenderBeast renderer.
  17. */
  18. class BeastRenderableElement : public RenderableElement
  19. {
  20. public:
  21. /**
  22. * Optional overrides for material sampler states. Used when renderer wants to override certain sampling properties
  23. * on a global scale (for example filtering most commonly).
  24. */
  25. MaterialSamplerOverrides* samplerOverrides;
  26. /** All GPU parameters from the material used by the renderable. */
  27. SPtr<GpuParamsSetCore> params;
  28. /** Identifier of the owner renderable. */
  29. UINT32 renderableId;
  30. /** Identifier of the animation running on the renderable's mesh. -1 if no animation. */
  31. UINT64 animationId;
  32. /** Type of animation applied to this element, if any. */
  33. RenderableAnimType animType;
  34. /** Index of the technique in the material to render the element with. */
  35. UINT32 techniqueIdx;
  36. /** Index to which should the per-camera param block buffer be bound to. */
  37. UINT32 perCameraBindingIdx;
  38. /**
  39. * Parameter for setting global bone pose transforms used for an element with skeletal animation, null otherwise.
  40. */
  41. MaterialParamBufferCore boneMatricesParam;
  42. /** GPU buffer containing element's bone matrices, if it requires any. */
  43. SPtr<GpuBufferCore> boneMatrixBuffer;
  44. /** Vertex buffer containing element's morph shape vertices, if it has any. */
  45. SPtr<VertexBufferCore> morphShapeBuffer;
  46. /** Vertex declaration used for rendering meshes containing morph shape information. */
  47. SPtr<VertexDeclarationCore> morphVertexDeclaration;
  48. /** Version of the morph shape vertices in the buffer. */
  49. mutable UINT32 morphShapeVersion;
  50. };
  51. /** Contains information about a Renderable, used by the Renderer. */
  52. struct RendererObject
  53. {
  54. RenderableCore* renderable;
  55. Vector<BeastRenderableElement> elements;
  56. };
  57. /** @} */
  58. }