Brenta Engine 1.2
Loading...
Searching...
No Matches
brenta::FrameBuffer Class Reference
Inheritance diagram for brenta::FrameBuffer:
brenta::Buffer

Public Member Functions

 FrameBuffer (int width, int height, GLenum format=GL_RGBA)
 
 FrameBuffer (FrameBuffer &&other)
 
FrameBufferoperator= (FrameBuffer &&other)
 
void bind () const override
 
void unbind () const override
 
void destroy ()
 
void rescale (int width, int height)
 
void set_color_format (GLenum color_format)
 
- Public Member Functions inherited from brenta::Buffer
 Buffer (Target target)
 
constexpr Buffer (const Buffer &)=delete
 
constexpr Bufferoperator= (const Buffer &)=delete
 
constexpr Buffer (Buffer &&other) noexcept
 
constexpr Bufferoperator= (Buffer &&other) noexcept
 
void init (Target target)
 
void destroy ()
 
Buffer::Id get_id () const
 
Target & get_target ()
 
void set_id (Buffer::Id id)
 
void set_target (Target target)
 
void copy_data (const void *data, GLsizeiptr size, DataUsage usage)
 

Data Fields

GLuint texture_id
 
GLuint render_buffer_id
 
GLenum color_format
 
GLenum channel_type = GL_UNSIGNED_BYTE
 
int width
 
int height
 
int memory = 0
 
- Data Fields inherited from brenta::Buffer
int memory = 0
 

Static Public Attributes

static int tot_memory = 0
 
- Static Public Attributes inherited from brenta::Buffer
static int tot_memory = 0
 

Additional Inherited Members

- Public Types inherited from brenta::Buffer
enum  Target {
  Array = GL_ARRAY_BUFFER , ElementArray = GL_ELEMENT_ARRAY_BUFFER , Uniform = GL_UNIFORM_BUFFER , Texture = GL_TEXTURE_BUFFER ,
  TransformFeedback = GL_TRANSFORM_FEEDBACK_BUFFER , CopyRead = GL_COPY_READ_BUFFER , PixelUnpack = GL_PIXEL_UNPACK_BUFFER , ShaderStorage = GL_SHADER_STORAGE_BUFFER
}
 
enum  DataUsage {
  StreamDraw = GL_STREAM_DRAW , StreamRead = GL_STREAM_READ , StreamCopy = GL_STREAM_COPY , StaticDraw = GL_STATIC_DRAW ,
  StaticRead = GL_STATIC_READ , StaticCopy = GL_STATIC_COPY , DynamicDraw = GL_DYNAMIC_DRAW , DynamicRead = GL_DYNAMIC_READ ,
  DynamicCopy = GL_DYNAMIC_COPY
}
 
using Id = unsigned int
 
- Protected Attributes inherited from brenta::Buffer
Buffer::Id id = 0
 
Target target
 

Detailed Description

Definition at line 29 of file framebuffer.hpp.

Constructor & Destructor Documentation

◆ FrameBuffer() [1/2]

FrameBuffer::FrameBuffer ( int  width,
int  height,
GLenum  format = GL_RGBA 
)

Definition at line 17 of file framebuffer.cpp.

◆ FrameBuffer() [2/2]

brenta::FrameBuffer::FrameBuffer ( FrameBuffer &&  other)
inline

Definition at line 47 of file framebuffer.hpp.

◆ ~FrameBuffer()

FrameBuffer::~FrameBuffer ( )

Definition at line 82 of file framebuffer.cpp.

Member Function Documentation

◆ bind()

void FrameBuffer::bind ( ) const
overridevirtual

Reimplemented from brenta::Buffer.

Definition at line 88 of file framebuffer.cpp.

◆ destroy()

void FrameBuffer::destroy ( )

Definition at line 102 of file framebuffer.cpp.

◆ operator=()

FrameBuffer & brenta::FrameBuffer::operator= ( FrameBuffer &&  other)
inline

Definition at line 61 of file framebuffer.hpp.

◆ rescale()

void FrameBuffer::rescale ( int  width,
int  height 
)

Definition at line 118 of file framebuffer.cpp.

◆ set_color_format()

void FrameBuffer::set_color_format ( GLenum  color_format)

Definition at line 159 of file framebuffer.cpp.

◆ unbind()

void FrameBuffer::unbind ( ) const
overridevirtual

Reimplemented from brenta::Buffer.

Definition at line 95 of file framebuffer.cpp.

Field Documentation

◆ channel_type

GLenum brenta::FrameBuffer::channel_type = GL_UNSIGNED_BYTE

Definition at line 36 of file framebuffer.hpp.

◆ color_format

GLenum brenta::FrameBuffer::color_format

Definition at line 35 of file framebuffer.hpp.

◆ height

int brenta::FrameBuffer::height

Definition at line 38 of file framebuffer.hpp.

◆ memory

int brenta::FrameBuffer::memory = 0

Definition at line 41 of file framebuffer.hpp.

◆ render_buffer_id

GLuint brenta::FrameBuffer::render_buffer_id

Definition at line 34 of file framebuffer.hpp.

◆ texture_id

GLuint brenta::FrameBuffer::texture_id

Definition at line 33 of file framebuffer.hpp.

◆ tot_memory

int FrameBuffer::tot_memory = 0
static

Definition at line 42 of file framebuffer.hpp.

◆ width

int brenta::FrameBuffer::width

Definition at line 37 of file framebuffer.hpp.


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