Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
Vesper::RenderCommand Class Reference

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

#include <RenderCommand.h>

Static Public Member Functions

static void Init ()
 Initializes the rendering API.
static void SetViewport (uint32_t x, uint32_t y, uint32_t width, uint32_t height)
 Sets the viewport dimensions for the renderer.
static void SetClearColor (const glm::vec4 &color)
 Sets the clear color for the renderer.
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 Private Attributes

static RendererAPIs_RendererAPI = new OpenGLRendererAPI()

Detailed Description

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

Member Function Documentation

◆ Clear()

void Vesper::RenderCommand::Clear ( )
inlinestatic

Clears the rendering buffers.

33 {
34 s_RendererAPI->Clear();
35 }
static RendererAPI * s_RendererAPI
Definition RenderCommand.h:44

References Vesper::RendererAPI::Clear(), and s_RendererAPI.

Referenced by Vesper::EditorLayer::OnUpdate().

◆ DrawIndexed()

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

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

39 {
40 s_RendererAPI->DrawIndexed(vertexArray, indexCount);
41 }

References s_RendererAPI.

◆ Init()

void Vesper::RenderCommand::Init ( )
inlinestatic

Initializes the rendering API.

15 {
16 s_RendererAPI->Init();
17 }

References Vesper::RendererAPI::Init(), and s_RendererAPI.

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

◆ SetClearColor()

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

Sets the clear color for the renderer.

27 {
28 s_RendererAPI->SetClearColor(color);
29 }

References s_RendererAPI.

◆ SetViewport()

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

Sets the viewport dimensions for the renderer.

21 {
22 s_RendererAPI->SetViewport(x, y, width, height);
23 }

References s_RendererAPI, and Vesper::RendererAPI::SetViewport().

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

Member Data Documentation

◆ s_RendererAPI

RendererAPI * Vesper::RenderCommand::s_RendererAPI = new OpenGLRendererAPI()
staticprivate

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