BsRendererObject.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. namespace BansheeEngine
  7. {
  8. /** @addtogroup RenderBeast
  9. * @{
  10. */
  11. struct MaterialSamplerOverrides;
  12. /**
  13. * @copydoc RenderableElement
  14. *
  15. * Contains additional data specific to RenderBeast renderer.
  16. */
  17. class BeastRenderableElement : public RenderableElement
  18. {
  19. public:
  20. /**
  21. * Optional overrides for material sampler states. Used when renderer wants to override certain sampling properties
  22. * on a global scale (for example filtering most commonly).
  23. */
  24. MaterialSamplerOverrides* samplerOverrides;
  25. /** All GPU parameters from the material used by the renderable. */
  26. SPtr<GpuParamsSetCore> params;
  27. /** Identifier of the owner renderable. */
  28. UINT32 renderableId;
  29. /** Identifier of the animation running on the renderable's mesh. -1 if no animation. */
  30. UINT64 animationId;
  31. /** Index of the technique in the material to render the element with. */
  32. UINT32 techniqueIdx;
  33. /**
  34. * Parameter for setting global bone pose transforms used for an element with skeletal animation, null otherwise.
  35. */
  36. MaterialParamBufferCore boneMatricesParam;
  37. /** GPU buffer containing element's bone matrices, if it requires any. */
  38. SPtr<GpuBufferCore> boneMatrixBuffer;
  39. };
  40. /** Contains information about a Renderable, used by the Renderer. */
  41. struct RendererObject
  42. {
  43. RenderableCore* renderable;
  44. Vector<BeastRenderableElement> elements;
  45. };
  46. /** @} */
  47. }