BsDrawOps.h 1.2 KB

12345678910111213141516171819202122232425262728
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. namespace BansheeEngine
  6. {
  7. /** @addtogroup RenderAPI
  8. * @{
  9. */
  10. /** Describes operation that will be used for rendering a certain set of vertices. */
  11. enum DrawOperationType
  12. {
  13. DOT_POINT_LIST = 1, /**< Each vertex represents a point. */
  14. DOT_LINE_LIST = 2, /**< Each sequential pair of vertices represent a line. */
  15. DOT_LINE_STRIP = 3, /**< Each vertex (except the first) forms a line with the previous vertex. */
  16. DOT_TRIANGLE_LIST = 4, /**< Each sequential 3-tuple of vertices represent a triangle. */
  17. DOT_TRIANGLE_STRIP = 5, /**< Each vertex (except the first two) form a triangle with the previous two vertices. */
  18. DOT_TRIANGLE_FAN = 6 /**< Each vertex (except the first two) form a triangle with the first vertex and previous vertex. */
  19. };
  20. /** Converts the number of vertices to number of primitives based on the specified draw operation. */
  21. UINT32 BS_CORE_EXPORT vertexCountToPrimCount(DrawOperationType type, UINT32 elementCount);
  22. /** @} */
  23. }