DrawHelper.txt 1.0 KB

1234567891011121314151617181920212223242526272829
  1. Add class DrawHelper:
  2. - Line2D_AA - Creates an emulated AA line using triangles. See Recast/imguiRenderGL::drawPolygon for implementation. Line vertices and colors
  3. are appended in the specified buffer. No actual drawing is done.
  4. - Line2D_Pixel - Creates a simple line using LINE primitive topology. Line vertices and colors are appended in the specified buffer.
  5. - Quad2D
  6. - QuadBorder2D_AA
  7. - QuadBorder2D_Pixel
  8. - LineList2D_AA
  9. - LineList2D_Pixel
  10. - RoundedRect2D - Also copy from Recast/imguiRenderGL::drawRoundedRect
  11. - Also 3D equivalents
  12. - Line, Quad, QuadBorder, Box, BoxBorder
  13. - Then I also need draw* equivalents of those methods. draw equivalents will also create the buffer and submit the draw call.
  14. --------------------------
  15. Only one material per viewport needs to exist, no need for separate material for each element
  16. -------------------------
  17. AA lines render but look a bit off.
  18. ---------
  19. Num verts/indices for polygon2d_AA method:
  20. (n * 2) vertices
  21. (n * 6) + max(0, n - 2) * 3