37#ifndef H_OGF_RENDERER_CONTEXT_OVERLAY_H
38#define H_OGF_RENDERER_CONTEXT_OVERLAY_H
45 class RenderingContext;
62 ) : rendering_context_(rendering_context) {
176 return GL_to_imgui(
vec2f(
float(XY_GL.x),
float(XY_GL.y)));
192 Numeric::uint32 color;
196 void add_primitive(Primitive& prim);
197 vector<Primitive> primitives_;
198 RenderingContext* rendering_context_;
A display list that memorizes simple graphic primitives to be displayed over the 3D rendering window.
void segment(vec2 p1, vec2 p2, Color color, double thickness=1.0)
Adds a segment to the display list.
vec2f GL_to_imgui(const vec2f &XY_GL) const
Converts OpenGL coordinates to Dear ImGui coordinate.
vec2f GL_to_imgui(const vec2 &XY_GL) const
Converts OpenGL coordinates to Dear ImGui coordinate.
void fillquad(vec2 p1, vec2 p2, vec2 p3, vec2 p4, Color color)
Adds a filled triangle to the display list.
void fillrect(vec2 p1, vec2 p2, Color color)
Adds a filled rectangle to the display list.
void rect(vec2 p1, vec2 p2, Color color, double thickness=1.0)
Adds a rectangle to the display list.
vec2f imgui_to_GL(const vec2f &XY_imgui) const
Converts Dear ImGui coordinates to OpenGL coordinate.
void circle(vec2 p1, double R, Color color, double thickness=1.0)
Adds a circle to the display list.
void fillcircle(vec2 p1, double R, Color color)
Adds a filled circle to the display list.
void clear()
Removes all primitives to be displayed.
void playback()
Plays back this overlay to the current ImGui context.
void filltriangle(vec2 p1, vec2 p2, vec2 p3, Color color)
Adds a filled triangle to the display list.
Helper class for OpenGL context management.
Global Graphite namespace.
Definitions common to all include files in the renderer library.