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::Framebuffer Class Referenceabstract

Abstract class representing a framebuffer. More...

#include <Framebuffer.h>

Inheritance diagram for Vesper::Framebuffer:
Vesper::OpenGLFramebuffer

Public Member Functions

 ~Framebuffer ()=default
virtual void Bind ()=0
virtual void Unbind ()=0
virtual void Resize (uint32_t width, uint32_t height)=0
 Resizes the framebuffer to the given width and height.
virtual uint32_t GetColorAttachmentRendererID () const =0
 Returns the renderer ID of the color attachment texture.
virtual const FramebufferSpecificationGetSpecification () const =0
 Returns the specification used to create the framebuffer.

Static Public Member Functions

static Ref< FramebufferCreate (const FramebufferSpecification &spec)
 Creates a framebuffer with the given specification.

Detailed Description

Abstract class representing a framebuffer.

Constructor & Destructor Documentation

◆ ~Framebuffer()

Vesper::Framebuffer::~Framebuffer ( )
default

Member Function Documentation

◆ Bind()

virtual void Vesper::Framebuffer::Bind ( )
pure virtual

Implemented in Vesper::OpenGLFramebuffer.

◆ Create()

Ref< Framebuffer > Vesper::Framebuffer::Create ( const FramebufferSpecification & spec)
static

Creates a framebuffer with the given specification.

Parameters
specThe specification for the framebuffer.
Returns
A reference-counted pointer to the created framebuffer.
10 {
11 switch (Renderer::GetAPI())
12 {
13 case RendererAPI::API::None: VZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
15 }
16
17 VZ_CORE_ASSERT(false, "Unknown RendererAPI!");
18 return nullptr;
19 }
#define VZ_CORE_ASSERT(x,...)
Definition Asserts.h:20
@ None
Definition RendererAPI.h:15
@ OpenGL
Definition RendererAPI.h:16
static RendererAPI::API GetAPI()
Retrieves the current rendering API.
Definition Renderer.h:40
constexpr Ref< T > CreateRef(Args &&... args)
Creates a Ref (shared_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:72

References Vesper::Renderer::GetAPI(), Vesper::RendererAPI::None, and Vesper::RendererAPI::OpenGL.

◆ GetColorAttachmentRendererID()

virtual uint32_t Vesper::Framebuffer::GetColorAttachmentRendererID ( ) const
pure virtual

Returns the renderer ID of the color attachment texture.

Implemented in Vesper::OpenGLFramebuffer.

◆ GetSpecification()

virtual const FramebufferSpecification & Vesper::Framebuffer::GetSpecification ( ) const
pure virtual

Returns the specification used to create the framebuffer.

Implemented in Vesper::OpenGLFramebuffer.

◆ Resize()

virtual void Vesper::Framebuffer::Resize ( uint32_t width,
uint32_t height )
pure virtual

Resizes the framebuffer to the given width and height.

Implemented in Vesper::OpenGLFramebuffer.

◆ Unbind()

virtual void Vesper::Framebuffer::Unbind ( )
pure virtual

Implemented in Vesper::OpenGLFramebuffer.


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