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

Abstract class representing a framebuffer. More...

#include <Framebuffer.h>

Inheritance diagram for Muto::Framebuffer:
Muto::OpenGLFramebuffer

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Abstract class representing a framebuffer.

Constructor & Destructor Documentation

◆ ~Framebuffer()

Muto::Framebuffer::~Framebuffer ( )
default

Member Function Documentation

◆ Bind()

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

Implemented in Muto::OpenGLFramebuffer.

◆ Create()

Ref< Framebuffer > Muto::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 RenderAPI::API::RAPI_None: MU_CORE_ASSERT(false, "RenderAPI::None is currently not supported!"); return nullptr;
15 }
16
17 MU_CORE_ASSERT(false, "Unknown RenderAPI!");
18 return nullptr;
19 }
#define MU_CORE_ASSERT(x,...)
Definition Asserts.h:32
static RenderAPI::API GetAPI()
Retrieves the current rendering API.
Definition Renderer.h:44
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51

References Muto::Renderer::GetAPI(), Muto::RenderAPI::RAPI_None, and Muto::RenderAPI::RAPI_OpenGL.

◆ GetColorAttachmentRendererID()

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

Returns the renderer ID of the color attachment texture.

Implemented in Muto::OpenGLFramebuffer.

◆ GetSpecification()

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

Returns the specification used to create the framebuffer.

Implemented in Muto::OpenGLFramebuffer.

◆ Resize()

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

Resizes the framebuffer to the given width and height.

Implemented in Muto::OpenGLFramebuffer.

◆ Unbind()

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

Implemented in Muto::OpenGLFramebuffer.


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