Blender  V2.93
Friends | List of all members
blender::gpu::GLFrameBuffer Class Reference

#include <gl_framebuffer.hh>

Inherits blender::gpu::FrameBuffer.

Public Member Functions

Binding
void bind (bool enabled_srgb) override
 
Operations.
void clear (eGPUFrameBufferBits buffers, const float clear_col[4], float clear_depth, uint clear_stencil) override
 
void clear_multi (const float(*clear_cols)[4]) override
 
void clear_attachment (GPUAttachmentType type, eGPUDataFormat data_format, const void *clear_value) override
 
void read (eGPUFrameBufferBits planes, eGPUDataFormat format, const int area[4], int channel_len, int slot, void *r_data) override
 
void blit_to (eGPUFrameBufferBits planes, int src_slot, FrameBuffer *dst, int dst_slot, int dst_offset_x, int dst_offset_y) override
 
- Public Member Functions inherited from blender::gpu::FrameBuffer
void size_set (int width, int height)
 
void viewport_set (const int viewport[4])
 
void scissor_set (const int scissor[4])
 
void scissor_test_set (bool test)
 
void viewport_get (int r_viewport[4]) const
 
void scissor_get (int r_scissor[4]) const
 
bool scissor_test_get (void) const
 
void viewport_reset (void)
 
void scissor_reset (void)
 
GPUTexturedepth_tex (void) const
 
GPUTexturecolor_tex (int slot) const
 
 FrameBuffer (const char *name)
 
virtual ~FrameBuffer ()
 
void attachment_set (GPUAttachmentType type, const GPUAttachment &new_attachment)
 
void attachment_remove (GPUAttachmentType type)
 
void recursive_downsample (int max_lvl, void(*callback)(void *userData, int level), void *userData)
 

Friends

class GLTexture
 

Creation & Deletion

 GLFrameBuffer (const char *name)
 
 GLFrameBuffer (const char *name, GLContext *ctx, GLenum target, GLuint fbo, int w, int h)
 
 ~GLFrameBuffer ()
 

Config

bool check (char err_out[256]) override
 
void apply_state (void)
 

Additional Inherited Members

- Protected Attributes inherited from blender::gpu::FrameBuffer
GPUAttachment attachments_ [GPU_FB_MAX_ATTACHMENT]
 
bool dirty_attachments_
 
int width_
 
int height_
 
char name_ [DEBUG_NAME_LEN]
 
int viewport_ [4] = {0}
 
int scissor_ [4] = {0}
 
bool scissor_test_ = false
 
bool dirty_state_ = true
 

Detailed Description

Implementation of FrameBuffer object using OpenGL.

Definition at line 41 of file gl_framebuffer.hh.

Constructor & Destructor Documentation

◆ GLFrameBuffer() [1/2]

blender::gpu::GLFrameBuffer::GLFrameBuffer ( const char *  name)

Create a conventional frame-buffer to attach texture to.

Definition at line 41 of file gl_framebuffer.cc.

◆ GLFrameBuffer() [2/2]

blender::gpu::GLFrameBuffer::GLFrameBuffer ( const char *  name,
GLContext ctx,
GLenum  target,
GLuint  fbo,
int  w,
int  h 
)

Special frame-buffer encapsulating internal window frame-buffer. (i.e.: #GL_FRONT_LEFT, #GL_BACK_RIGHT, ...)

Parameters
ctxContext the handle is from.
targetThe internal GL name (i.e: #GL_BACK_LEFT).
fboThe (optional) already created object for some implementation. Default is 0.
wBuffer width.
hBuffer height.

Definition at line 48 of file gl_framebuffer.cc.

References blender::gpu::FrameBuffer::dirty_attachments_, blender::gpu::FrameBuffer::height_, blender::gpu::FrameBuffer::name_, blender::gpu::debug::object_label(), blender::gpu::FrameBuffer::scissor_, blender::gpu::Context::state_manager, blender::gpu::FrameBuffer::viewport_, w(), and blender::gpu::FrameBuffer::width_.

◆ ~GLFrameBuffer()

blender::gpu::GLFrameBuffer::~GLFrameBuffer ( )

Member Function Documentation

◆ apply_state()

void blender::gpu::GLFrameBuffer::apply_state ( void  )

◆ bind()

void blender::gpu::GLFrameBuffer::bind ( bool  enabled_srgb)
overridevirtual

◆ blit_to()

void blender::gpu::GLFrameBuffer::blit_to ( eGPUFrameBufferBits  planes,
int  src_slot,
FrameBuffer dst_,
int  dst_slot,
int  x,
int  y 
)
overridevirtual

◆ check()

bool blender::gpu::GLFrameBuffer::check ( char  err_out[256])
overridevirtual

◆ clear()

void blender::gpu::GLFrameBuffer::clear ( eGPUFrameBufferBits  buffers,
const float  clear_col[4],
float  clear_depth,
uint  clear_stencil 
)
overridevirtual

◆ clear_attachment()

void blender::gpu::GLFrameBuffer::clear_attachment ( GPUAttachmentType  type,
eGPUDataFormat  data_format,
const void *  clear_value 
)
overridevirtual

◆ clear_multi()

void blender::gpu::GLFrameBuffer::clear_multi ( const float(*)  clear_cols[4])
overridevirtual

◆ read()

void blender::gpu::GLFrameBuffer::read ( eGPUFrameBufferBits  planes,
eGPUDataFormat  format,
const int  area[4],
int  channel_len,
int  slot,
void *  r_data 
)
overridevirtual

Friends And Related Function Documentation

◆ GLTexture

friend class GLTexture
friend

Definition at line 43 of file gl_framebuffer.hh.


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