Ember
A C++ 20 'game engine' built with SDL3 with wide platform support.
Public Member Functions | Public Attributes | List of all members
DrawCommand Struct Reference

Represents a single rendering command. More...

#include <ember_core.h>

Public Member Functions

 DrawCommand (DrawCommandType t, int z=0)
 Constructs a DrawCommand with type and optional z-index. More...
 

Public Attributes

DrawCommandType type = DrawCommandType::NONE
 Type of draw command. More...
 
std::vector< Vertexvertices
 Vertex data. More...
 
std::vector< uint32_t > indices
 Index buffer. More...
 
Uint32 texture_id = 0
 Texture used (if any). More...
 
float line_width = 1.0f
 Line thickness (if applicable). More...
 
int circle_segments = 32
 Number of segments for circles. More...
 
int z_index = 0
 Z-index (render order). More...
 

Detailed Description

Represents a single rendering command.

Constructor & Destructor Documentation

◆ DrawCommand()

DrawCommand::DrawCommand ( DrawCommandType  t,
int  z = 0 
)
inlineexplicit

Constructs a DrawCommand with type and optional z-index.

Parameters
tType of command.
zZ-index (default = 0).

Member Data Documentation

◆ circle_segments

int DrawCommand::circle_segments = 32

Number of segments for circles.

◆ indices

std::vector<uint32_t> DrawCommand::indices

Index buffer.

◆ line_width

float DrawCommand::line_width = 1.0f

Line thickness (if applicable).

◆ texture_id

Uint32 DrawCommand::texture_id = 0

Texture used (if any).

◆ type

Type of draw command.

◆ vertices

std::vector<Vertex> DrawCommand::vertices

Vertex data.

◆ z_index

int DrawCommand::z_index = 0

Z-index (render order).


The documentation for this struct was generated from the following file: