HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
PrimitiveRenderer.h
Go to the documentation of this file.
1#pragma once
2
3#include "../core/MathUtils.h"
4#include "../core/Matrix.h"
5#include "Buffer.h"
6#include "Shader.h"
7#include "VertexArray.h"
8
9namespace Renderer {
10
17public:
22 static void Init();
23
27 static void Shutdown();
28
36 static void DrawCube(const Core::Vec3& position,
37 const Core::Vec3& size,
38 const Core::Vec3& color,
39 const Core::Mat4& viewProjMatrix);
40
44 static void DrawLine(const Core::Vec3& objVecStart,
45 const Core::Vec3& objVecEnd,
46 const Core::Vec3& color,
47 const Core::Mat4& viewProjMatrix);
48
49private:
51
52 // Cube Resources
55
56 // Line Resources
59};
60} // namespace Renderer
A static helper for drawing immediate-mode debug shapes (Lines, Cubes). Useful for visualizing physic...
Definition PrimitiveRenderer.h:16
static VertexBuffer * m_pLineVBO
Definition PrimitiveRenderer.h:58
static void DrawCube(const Core::Vec3 &position, const Core::Vec3 &size, const Core::Vec3 &color, const Core::Mat4 &viewProjMatrix)
Draws a wireframe cube.
Definition PrimitiveRenderer.cpp:68
static VertexBuffer * m_pCubeVBO
Definition PrimitiveRenderer.h:54
static Shader * m_pPrimitiveShader
Definition PrimitiveRenderer.h:50
static void Init()
Initializes the debug shader and static geometry buffers. Must be called after OpenGL context is crea...
Definition PrimitiveRenderer.cpp:14
static VertexArray * m_pCubeVAO
Definition PrimitiveRenderer.h:53
static void DrawLine(const Core::Vec3 &objVecStart, const Core::Vec3 &objVecEnd, const Core::Vec3 &color, const Core::Mat4 &viewProjMatrix)
Draws a line between two points.
Definition PrimitiveRenderer.cpp:93
static void Shutdown()
Cleans up shaders and buffers.
Definition PrimitiveRenderer.cpp:44
static VertexArray * m_pLineVAO
Definition PrimitiveRenderer.h:57
Definition Shader.h:11
Wrapper for OpenGL VAO (Vertex Array Object). Stores the configuration of vertex attributes (layout) ...
Definition VertexArray.h:13
Wrapper for OpenGL VBO (Vertex Buffer Object). Stores raw vertex data (positions, colors,...
Definition Buffer.h:11
Definition Buffer.h:4
A 4x4 Matrix structure stored in Column-Major order (OpenGL Standard).
Definition Matrix.h:18
A 3-component vector structure (x, y, z) with standard math operations.
Definition MathUtils.h:11