SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::RenderEngine::CustomCommand Class Reference

Wraps an arbitrary callback as a queueable render command. More...

#include <RenderCommands.hpp>

Inheritance diagram for Sleak::RenderEngine::CustomCommand:

Public Types

using ExecuteFunction = std::function<void(RenderContext*)>

Public Member Functions

 CustomCommand (ExecuteFunction executeFunction)
void Execute (RenderContext *context) override
 Replays this command into the main forward/deferred pass.
CommandType GetType () const override
Public Member Functions inherited from Sleak::RenderEngine::RenderCommandBase
virtual ~RenderCommandBase ()=default
bool CastsShadow () const
virtual void ExecuteShadow (RenderContext *context)
uint32_t GetOwnerObjectID () const
virtual bool IsSkinned () const
void SetCastsShadow (bool v)
void SetOwnerObjectID (uint32_t id)

Detailed Description

Wraps an arbitrary callback as a queueable render command.

Definition at line 218 of file RenderCommands.hpp.

Member Typedef Documentation

◆ ExecuteFunction

Definition at line 220 of file RenderCommands.hpp.

Constructor & Destructor Documentation

◆ CustomCommand()

Sleak::RenderEngine::CustomCommand::CustomCommand ( ExecuteFunction executeFunction)

Definition at line 174 of file RenderCommands.cpp.

Member Function Documentation

◆ Execute()

void Sleak::RenderEngine::CustomCommand::Execute ( RenderContext * context)
overridevirtual

Replays this command into the main forward/deferred pass.

Implements Sleak::RenderEngine::RenderCommandBase.

Definition at line 177 of file RenderCommands.cpp.

◆ GetType()

CommandType Sleak::RenderEngine::CustomCommand::GetType ( ) const
inlineoverridevirtual

Implements Sleak::RenderEngine::RenderCommandBase.

Definition at line 226 of file RenderCommands.hpp.