Muto 0.0.1
Cross-Platform Application Template
GitHub Repo | Muto Updates | Muto's Author
Loading...
Searching...
No Matches
Muto::RenderCommand Class Reference

A static class that provides an interface for issuing rendering commands. More...

#include <RenderCommand.h>

Static Public Member Functions

static void Clear ()
 Clears the rendering buffers.
 
static void DrawIndexed (const Ref< VertexArray > &vertexArray, uint32_t indexCount=0)
 Draws indexed geometry using the specified vertex array and index count.
 
static void Init ()
 Initializes the rendering API.
 
static void SetClearColor (const glm::vec4 &color)
 Sets the clear color for the renderer.
 
static void SetViewport (uint32_t x, uint32_t y, uint32_t width, uint32_t height)
 Sets the viewport dimensions for the renderer.
 

Static Private Attributes

static RenderAPI * s_RendererAPI = new OpenGLRendererAPI()
 

Detailed Description

A static class that provides an interface for issuing rendering commands.

Member Function Documentation

◆ Clear()

static void Muto::RenderCommand::Clear ( )
inlinestatic

Clears the rendering buffers.

36 {
38 }
virtual void Clear()=0
Clears the rendering buffers.
static RenderAPI * s_RendererAPI
Definition RenderCommand.h:47

References Muto::RenderAPI::Clear(), and s_RendererAPI.

Referenced by Sandbox2D::OnAttach(), Sandbox2D::OnImGuiRender(), Sandbox2D::OnUpdate(), and Muto::EditorLayer::OnUpdate().

◆ DrawIndexed()

static void Muto::RenderCommand::DrawIndexed ( const Ref< VertexArray > &  vertexArray,
uint32_t  indexCount = 0 
)
inlinestatic

Draws indexed geometry using the specified vertex array and index count.

42 {
44 }
virtual void DrawIndexed(const Ref< VertexArray > &vertexArray, uint32_t indexCount=0)=0
Draws indexed geometry using the provided vertex array.
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51

References s_RendererAPI.

◆ Init()

static void Muto::RenderCommand::Init ( )
inlinestatic

Initializes the rendering API.

18 {
20 }
virtual void Init()=0
Initializes the rendering API.

References Muto::RenderAPI::Init(), and s_RendererAPI.

Referenced by Muto::Renderer::Init().

◆ SetClearColor()

static void Muto::RenderCommand::SetClearColor ( const glm::vec4 &  color)
inlinestatic

Sets the clear color for the renderer.

30 {
32 }
virtual void SetClearColor(const glm::vec4 &color)=0
Sets the clear color for the rendering API.

References s_RendererAPI.

◆ SetViewport()

static void Muto::RenderCommand::SetViewport ( uint32_t  x,
uint32_t  y,
uint32_t  width,
uint32_t  height 
)
inlinestatic

Sets the viewport dimensions for the renderer.

24 {
26 }
virtual void SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height)=0
Sets the viewport dimensions.

References s_RendererAPI, and Muto::RenderAPI::SetViewport().

Referenced by Muto::Renderer::OnWindowResize().

Member Data Documentation

◆ s_RendererAPI

RenderAPI * Muto::RenderCommand::s_RendererAPI = new OpenGLRendererAPI()
staticprivate

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