2
0

BsRenderableHandler.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsPrerequisites.h"
  5. namespace BansheeEngine
  6. {
  7. /** @addtogroup Renderer-Engine-Internal
  8. * @{
  9. */
  10. /**
  11. * Abstract class that provides an interface for initializing renderable elements of a certain type, along with their
  12. * GPU parameter buffers.
  13. *
  14. * Essentially this class holds all the information that is needed for rendering an element of a certain renderable
  15. * type.
  16. */
  17. class BS_EXPORT RenderableHandler
  18. {
  19. public:
  20. virtual ~RenderableHandler() {}
  21. /**
  22. * Initializes the specified renderable element, making it ready to be used. Caller must ensure the renderable
  23. * element actually supports this handler.
  24. */
  25. virtual void initializeRenderElem(RenderableElement& element) = 0;
  26. /** Binds per object GPU parameter buffers to the provided element. */
  27. virtual void bindPerObjectBuffers(const RenderableElement& element) = 0;
  28. /** Binds global GPU parameter buffers used for this Renderable type to the provided element. */
  29. virtual void bindGlobalBuffers(const RenderableElement& element);
  30. };
  31. /** @} */
  32. }