20#define DEBUG_DRAW_START_ACTIVE true
22#define DEBUG_DRAW_START_ACTIVE false
43#pragma region static_functions
71#pragma region overridden_functions
75 return std::make_unique<DebugDraw>(*
this);
78 auto onUpdate(
float dt) ->
void override;
86 auto save(
Stream& stream)
const ->
void override;
91#pragma region DebugDraw_Functions
104#pragma region member_variables
107 std::vector<std::pair<gfx::Vertex, gfx::Vertex>>
lines;
115#pragma region helper_functions
120#pragma region static_variables
137#undef DEBUG_DRAW_START_ACTIVE
sys::Json Stream
Definition AudioObject.h:20
auto operator<<(sys::DebugDraw *debug, const Line &line) -> sys::DebugDraw *
stream insertion operator for adding lines to the debug draw system Uses DebugDraw pointer instead of...
Definition DebugDraw.cpp:190
#define DEBUG_DRAW_START_ACTIVE
Definition DebugDraw.h:22
unsigned int GLuint
Definition IndexBuffer.h:17
A struct for stroing vertexes and handing them to opengl.
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Type
Definition System.h:20
@ DebugDraw
Definition System.h:34
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
Definition DebugDraw.h:41
int lineWidth
Definition DebugDraw.h:110
auto operator=(const DebugDraw &other) -> DebugDraw &
Definition DebugDraw.cpp:51
auto operator=(DebugDraw &&other) noexcept -> DebugDraw &=default
auto addLine(const Line &line) -> void
add a line to the debug renderer.
Definition DebugDraw.cpp:178
DebugDraw(const DebugDraw &other)=default
auto onUpdate(float dt) -> void override
called once every frame.
Definition DebugDraw.cpp:65
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition DebugDraw.h:73
static auto getEnum() -> Type
function required by all systems
Definition DebugDraw.h:48
bool active
Definition DebugDraw.h:108
auto onRender() -> void override
called every frame after update has been called for every object.
Definition DebugDraw.cpp:99
static auto drawLine(const Line &line) -> void
add a line to the debug renderer.
Definition DebugDraw.cpp:36
std::vector< std::pair< gfx::Vertex, gfx::Vertex > > lines
Definition DebugDraw.h:107
DebugDraw()
Definition DebugDraw.cpp:41
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition DebugDraw.cpp:150
auto load(Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition DebugDraw.cpp:163
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition DebugDraw.cpp:168
auto setupMesh() -> GLuint
Definition DebugDraw.cpp:70
~DebugDraw() override=default
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition DebugDraw.cpp:173
std::shared_ptr< VertexBuffer > vertexBuffer
Definition DebugDraw.h:106
the type of elements in a basic_json container
Definition GameObject.h:32