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

#include <OpenGLFramebuffer.h>

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

Public Member Functions

virtual void Bind () override
 
virtual uint32_t GetColorAttachmentRendererID () const override
 Returns the renderer ID of the color attachment texture.
 
virtual const FramebufferSpecification & GetSpecification () const
 Returns the specification used to create the framebuffer.
 
void Invalidate ()
 
 OpenGLFramebuffer (const FramebufferSpecification &spec)
 
virtual void Resize (uint32_t width, uint32_t height) override
 Resizes the framebuffer to the given width and height.
 
virtual void Unbind () override
 
virtual ~OpenGLFramebuffer ()
 
- Public Member Functions inherited from Muto::Framebuffer
 ~Framebuffer ()=default
 

Private Attributes

uint32_t m_ColorAttachment
 
uint32_t m_DepthAttachment
 
uint32_t m_RendererID
 
FramebufferSpecification m_Specification
 

Additional Inherited Members

- Static Public Member Functions inherited from Muto::Framebuffer
static Ref< Framebuffer > Create (const FramebufferSpecification &spec)
 Creates a framebuffer with the given specification.
 

Constructor & Destructor Documentation

◆ OpenGLFramebuffer()

Muto::OpenGLFramebuffer::OpenGLFramebuffer ( const FramebufferSpecification &  spec)
13 {
14 Invalidate();
15 }
void Invalidate()
Definition OpenGLFramebuffer.cpp:24
FramebufferSpecification m_Specification
Definition OpenGLFramebuffer.h:26
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51

References Invalidate(), and m_Specification.

◆ ~OpenGLFramebuffer()

Muto::OpenGLFramebuffer::~OpenGLFramebuffer ( )
virtual
18 {
22 }
uint32_t m_ColorAttachment
Definition OpenGLFramebuffer.h:25
uint32_t m_DepthAttachment
Definition OpenGLFramebuffer.h:25
uint32_t m_RendererID
Definition OpenGLFramebuffer.h:24

References m_ColorAttachment, m_DepthAttachment, and m_RendererID.

Member Function Documentation

◆ Bind()

void Muto::OpenGLFramebuffer::Bind ( )
overridevirtual

◆ GetColorAttachmentRendererID()

virtual uint32_t Muto::OpenGLFramebuffer::GetColorAttachmentRendererID ( ) const
inlineoverridevirtual

Returns the renderer ID of the color attachment texture.

Implements Muto::Framebuffer.

19{ return m_ColorAttachment; }

References m_ColorAttachment.

◆ GetSpecification()

virtual const FramebufferSpecification & Muto::OpenGLFramebuffer::GetSpecification ( ) const
inlinevirtual

Returns the specification used to create the framebuffer.

Implements Muto::Framebuffer.

20{ return m_Specification; }

References m_Specification.

◆ Invalidate()

void Muto::OpenGLFramebuffer::Invalidate ( )

◆ Resize()

void Muto::OpenGLFramebuffer::Resize ( uint32_t  width,
uint32_t  height 
)
overridevirtual

Resizes the framebuffer to the given width and height.

Implements Muto::Framebuffer.

68 {
69 if (width == 0 || height == 0 || width > 8192 || height > 8192)
70 {
71 MU_CORE_WARN("Attempted to resize framebuffer to {0}, {1}", width, height);
72 return;
73 }
76 Invalidate();
77 }
#define MU_CORE_WARN(...)
warn: indicates a potential issue or important event
Definition Log.h:40

References Muto::FramebufferSpecification::Height, Invalidate(), m_Specification, and Muto::FramebufferSpecification::Width.

◆ Unbind()

void Muto::OpenGLFramebuffer::Unbind ( )
overridevirtual

Implements Muto::Framebuffer.

63 {
65 }

Member Data Documentation

◆ m_ColorAttachment

uint32_t Muto::OpenGLFramebuffer::m_ColorAttachment
private

◆ m_DepthAttachment

uint32_t Muto::OpenGLFramebuffer::m_DepthAttachment
private

Referenced by Invalidate(), and ~OpenGLFramebuffer().

◆ m_RendererID

uint32_t Muto::OpenGLFramebuffer::m_RendererID
private

Referenced by Invalidate(), and ~OpenGLFramebuffer().

◆ m_Specification

FramebufferSpecification Muto::OpenGLFramebuffer::m_Specification
private

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