1#ifndef _PRIMITIVE_RENDERER_H
2#define _PRIMITIVE_RENDERER_H
18namespace GefExtensions
20 class VertexColourUnlitShader;
24 PrimitiveRenderer(gef::Platform & platform, UInt32 max_num_lines = kDefaultMaxNumLines, UInt32 max_num_triangles = kDefaultMaxNumTriangles);
27 void Render(gef::Renderer3D & renderer_3d);
31 void AddLine(gef::Vector4
const & start, gef::Vector4
const & end, gef::Colour
const & colour);
32 void AddTriangle(gef::Vector4
const & v0, gef::Vector4
const & v1, gef::Vector4
const & v2, gef::Colour
const & colour);
34 void DrawLines(gef::Renderer3D & renderer3D);
35 void DrawTriangles(gef::Renderer3D & renderer3D);
37 static int constexpr kDefaultMaxNumLines = 512;
38 static int constexpr kDefaultMaxNumTriangles = 512;
42 UInt32 num_triangles_;
43 gef::VertexBuffer * lines_vertex_buffer_;
44 gef::VertexBuffer * triangles_vertex_buffer_;
45 gef::IndexBuffer * lines_index_buffer_;
46 gef::IndexBuffer * triangles_index_buffer_;
47 UInt32 max_num_lines_;
48 UInt32 max_num_triangles_;
Definition: primitive_renderer.h:22
Definition: vertex_colour_unlit_shader.h:19