Antkeeper  0.0.1
Public Member Functions | Friends | List of all members
gl::framebuffer Class Reference

#include <framebuffer.hpp>

Public Member Functions

 framebuffer (std::span< const framebuffer_attachment > attachments, std::uint32_t width, std::uint32_t height)
 Constructs a framebuffer. More...
 
 ~framebuffer ()
 Destroys a framebuffer. More...
 
void resize (std::uint32_t width, std::uint32_t height)
 Resizes the framebuffer. More...
 
constexpr const std::vector< framebuffer_attachment > & attachments () const noexcept
 Returns the framebuffer attachments. More...
 
constexpr const std::array< std::uint32_t, 2 > & dimensions () const noexcept
 Returns the dimensions of the framebuffer. More...
 
constexpr std::uint32_t width () const noexcept
 Returns the width of the framebuffer. More...
 
constexpr std::uint32_t height () const noexcept
 Returns the height of the framebuffer. More...
 

Friends

class pipeline
 

Detailed Description

Definition at line 35 of file framebuffer.hpp.

Constructor & Destructor Documentation

◆ framebuffer()

gl::framebuffer::framebuffer ( std::span< const framebuffer_attachment attachments,
std::uint32_t  width,
std::uint32_t  height 
)

Constructs a framebuffer.

Parameters
attachmentsFramebuffer attachments.
widthWidth of the framebuffer.
heightHeight of the framebuffer.

Definition at line 26 of file framebuffer.cpp.

◆ ~framebuffer()

gl::framebuffer::~framebuffer ( )

Destroys a framebuffer.

Definition at line 112 of file framebuffer.cpp.

Member Function Documentation

◆ attachments()

constexpr const std::vector<framebuffer_attachment>& gl::framebuffer::attachments ( ) const
inlineconstexprnoexcept

Returns the framebuffer attachments.

Definition at line 61 of file framebuffer.hpp.

◆ dimensions()

constexpr const std::array<std::uint32_t, 2>& gl::framebuffer::dimensions ( ) const
inlineconstexprnoexcept

Returns the dimensions of the framebuffer.

Definition at line 67 of file framebuffer.hpp.

◆ height()

constexpr std::uint32_t gl::framebuffer::height ( ) const
inlineconstexprnoexcept

Returns the height of the framebuffer.

Definition at line 79 of file framebuffer.hpp.

◆ resize()

void gl::framebuffer::resize ( std::uint32_t  width,
std::uint32_t  height 
)

Resizes the framebuffer.

Parameters
widthNew width of the framebuffer.
heightNew height of the framebuffer.
Warning
Does not resize framebuffer attachments.

Definition at line 120 of file framebuffer.cpp.

◆ width()

constexpr std::uint32_t gl::framebuffer::width ( ) const
inlineconstexprnoexcept

Returns the width of the framebuffer.

Definition at line 73 of file framebuffer.hpp.

Friends And Related Function Documentation

◆ pipeline

friend class pipeline
friend

Definition at line 85 of file framebuffer.hpp.


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