BsRendererObject.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 BansheeEngine
  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. /**
  37. * Parameter for setting global bone pose transforms used for an element with skeletal animation, null otherwise.
  38. */
  39. MaterialParamBufferCore boneMatricesParam;
  40. /** GPU buffer containing element's bone matrices, if it requires any. */
  41. SPtr<GpuBufferCore> boneMatrixBuffer;
  42. /** Vertex buffer containing element's morph shape vertices, if it has any. */
  43. SPtr<VertexBufferCore> morphShapeBuffer;
  44. /** Version of the morph shape vertices in the buffer. */
  45. mutable UINT32 morphShapeVersion;
  46. };
  47. /** Contains information about a Renderable, used by the Renderer. */
  48. struct RendererObject
  49. {
  50. RenderableCore* renderable;
  51. Vector<BeastRenderableElement> elements;
  52. };
  53. /** @} */
  54. }