Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
BlamRendering::RenderStack Namespace Reference

Namespace containing things relating to the Render Stack. More...

Classes

class  Bitmap
 Class containing data for a Bitmap object. More...
 
class  BitmapText
 Class representing text drawn using a Bitmap-based engine font. More...
 
class  ConsoleMessage
 
class  ConsoleUI
 
class  CrashScreen
 
class  DebugMenu
 Stack item representing the debug menu. More...
 
class  DebugMenuItem
 Stack item representing a single item within the debug menu. More...
 
class  DWText
 Class containing data for a text object using DirectWrite. More...
 
class  Ellipse
 Class containing data for an Ellipse object. More...
 
class  FPSCounter
 Class used for the FPS counter. More...
 
class  ImGUIObject
 Specialized class for rendering ImGUI using the render stack. More...
 
class  Line
 Class containing data for a Line object. More...
 
class  Rectangle
 Class containing data for a Rectangle object. More...
 
class  RoundedRectangle
 Class containing data for a Rounded Rectangle object. More...
 
class  StackGroup
 Unfinished class. More...
 
class  StackObjectBase
 Base class for all render stack objects. More...
 
class  Stats
 Work-in-progress reimplementation of Stats display to use the new UI system. More...
 
class  Text
 Class used to wrap around BitmapText and DWText, making the usage of both of them directly unnecessary. More...
 
class  TickCounter
 Class to contain the onscreen tick counter display. More...
 

Functions

BLAM int AddToStack (std::string id, StackObjectBase *object)
 Adds an item to the render stack. More...
 
BLAM void RemoveFromStack (std::string id)
 Removes an item from the render stack. More...
 
BLAM void RemoveFromStack (int index)
 Removes an item from the render stack. More...
 
BLAM StackObjectBaseGetStackItem (std::string id)
 Retrieves an item from the render stack. More...
 
BLAM bool ContainsImGUIObject ()
 Determines whether or not an ImGUI stack object has been added. More...
 
BLAM void Cleanup ()
 Cleans up any render stack data. More...
 
BLAM std::vector< StackObjectBase * > * GetStack ()
 Retrieves the render stack contents. More...
 
BLAM std::string GetStackTypeLabel (StackType type)
 Retrieves a string representation of the specified stack type. More...
 
BLAM std::string GetDrawModeLabel (StackItemDrawMode type)
 Retrieves a string representation of the specified drawing mode. More...
 
BLAM std::vector< StackTypeGetStackTypesList ()
 Retrieves a list of all available stack types. More...
 
BLAM std::vector< StackItemDrawModeGetDrawModesList ()
 Retrieves a list of all available drawing modes. More...
 

Detailed Description

Namespace containing things relating to the Render Stack.

The render stack is a way to manage rendering a wide number of 2D elements. Items can be added and removed as needed.

Function Documentation

◆ AddToStack()

int BlamRendering::RenderStack::AddToStack ( std::string  id,
StackObjectBase object 
)

Adds an item to the render stack.

Parameters
id- The ID of the stack item.
object- A pointer to the object to add to the stack.
Returns
The index of the newly added item.

◆ Cleanup()

void BlamRendering::RenderStack::Cleanup ( )

Cleans up any render stack data.

◆ ContainsImGUIObject()

bool BlamRendering::RenderStack::ContainsImGUIObject ( )

Determines whether or not an ImGUI stack object has been added.

Used to check if ImGUI is being added a second time.

Returns
Whether or not an ImGUI stack item exists in the render stack.

◆ GetDrawModeLabel()

std::string BlamRendering::RenderStack::GetDrawModeLabel ( StackItemDrawMode  type)

Retrieves a string representation of the specified drawing mode.

Useful for displaying object information onscreen as text.

Parameters
type- The drawing mode to get the name of.
Returns
The label for the specified drawing mode.

◆ GetDrawModesList()

std::vector< StackItemDrawMode > BlamRendering::RenderStack::GetDrawModesList ( )

Retrieves a list of all available drawing modes.

Returns
A list of drawing modes.

◆ GetStack()

std::vector< BlamRendering::RenderStack::StackObjectBase * > * BlamRendering::RenderStack::GetStack ( )

Retrieves the render stack contents.

Returns
A pointer to the render stack list.

◆ GetStackItem()

BlamRendering::RenderStack::StackObjectBase * BlamRendering::RenderStack::GetStackItem ( std::string  id)

Retrieves an item from the render stack.

Parameters
id- The ID of the stack item.
Returns
A pointer to the object, or nullptr if no matching object could be found.

◆ GetStackTypeLabel()

std::string BlamRendering::RenderStack::GetStackTypeLabel ( StackType  type)

Retrieves a string representation of the specified stack type.

Useful for displaying object information onscreen as text.

Parameters
type- The stack type to get the name of.
Returns
The label for the specified stack type.

◆ GetStackTypesList()

std::vector< StackType > BlamRendering::RenderStack::GetStackTypesList ( )

Retrieves a list of all available stack types.

Returns
A list of stack types.

◆ RemoveFromStack() [1/2]

void BlamRendering::RenderStack::RemoveFromStack ( int  index)

Removes an item from the render stack.

Parameters
index- The index of the stack item to remove.

◆ RemoveFromStack() [2/2]

void BlamRendering::RenderStack::RemoveFromStack ( std::string  id)

Removes an item from the render stack.

Parameters
id- The ID of the stack item to remove.