HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
Static Public Member Functions | Static Private Attributes | List of all members
Renderer::PrimitiveRenderer Class Reference

A static helper for drawing immediate-mode debug shapes (Lines, Cubes). Useful for visualizing physics colliders, raycasts, and axes. More...

#include <src/renderer/PrimitiveRenderer.h>

Collaboration diagram for Renderer::PrimitiveRenderer:
Collaboration graph

Static Public Member Functions

static void Init ()
 Initializes the debug shader and static geometry buffers. Must be called after OpenGL context is created.
 
static void Shutdown ()
 Cleans up shaders and buffers.
 
static void DrawCube (const Core::Vec3 &position, const Core::Vec3 &size, const Core::Vec3 &color, const Core::Mat4 &viewProjMatrix)
 Draws a wireframe cube.
 
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.
 

Static Private Attributes

static Shader * m_pPrimitiveShader = nullptr
 
static VertexArray * m_pCubeVAO = nullptr
 
static VertexBuffer * m_pCubeVBO = nullptr
 
static VertexArray * m_pLineVAO = nullptr
 
static VertexBuffer * m_pLineVBO = nullptr
 

Detailed Description

A static helper for drawing immediate-mode debug shapes (Lines, Cubes). Useful for visualizing physics colliders, raycasts, and axes.

Member Function Documentation

◆ DrawCube()

void Renderer::PrimitiveRenderer::DrawCube ( const Core::Vec3 &  position,
const Core::Vec3 &  size,
const Core::Vec3 &  color,
const Core::Mat4 &  viewProjMatrix 
)
static

Draws a wireframe cube.

Parameters
positionCenter of the cube.
sizeHalf-extents (Radius) of the cube.
colorRGB color.
viewProjMatrixCamera View * Projection matrix.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawLine()

void Renderer::PrimitiveRenderer::DrawLine ( const Core::Vec3 &  objVecStart,
const Core::Vec3 &  objVecEnd,
const Core::Vec3 &  color,
const Core::Mat4 &  viewProjMatrix 
)
static

Draws a line between two points.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init()

void Renderer::PrimitiveRenderer::Init ( )
static

Initializes the debug shader and static geometry buffers. Must be called after OpenGL context is created.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Shutdown()

void Renderer::PrimitiveRenderer::Shutdown ( )
static

Cleans up shaders and buffers.

Here is the caller graph for this function:

Member Data Documentation

◆ m_pCubeVAO

VertexArray * Renderer::PrimitiveRenderer::m_pCubeVAO = nullptr
staticprivate

◆ m_pCubeVBO

VertexBuffer * Renderer::PrimitiveRenderer::m_pCubeVBO = nullptr
staticprivate

◆ m_pLineVAO

VertexArray * Renderer::PrimitiveRenderer::m_pLineVAO = nullptr
staticprivate

◆ m_pLineVBO

VertexBuffer * Renderer::PrimitiveRenderer::m_pLineVBO = nullptr
staticprivate

◆ m_pPrimitiveShader

Shader * Renderer::PrimitiveRenderer::m_pPrimitiveShader = nullptr
staticprivate

The documentation for this class was generated from the following files: