Blender  V3.3
Public Member Functions | Friends | List of all members
blender::gpu::GLFrameBuffer Class Reference

#include <gl_framebuffer.hh>

Inheritance diagram for blender::gpu::GLFrameBuffer:
blender::gpu::FrameBuffer

Public Member Functions

void attachment_set_loadstore_op (GPUAttachmentType, eGPULoadOp, eGPUStoreOp) override
 
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 () const
 
void viewport_reset ()
 
void scissor_reset ()
 
GPUTexturedepth_tex () const
 
GPUTexturecolor_tex (int slot) const
 
 FrameBuffer (const char *name)
 
virtual ~FrameBuffer ()
 
void load_store_config_array (const GPULoadStore *load_store_actions, uint actions_len)
 
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)
 
uint get_bits_per_pixel ()
 

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 ()
 

Additional Inherited Members

- Public Attributes inherited from blender::gpu::FrameBuffer
void ** py_ref = nullptr
 
void ** ref = nullptr
 
- 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 25 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 23 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 30 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 ( )

◆ attachment_set_loadstore_op()

void blender::gpu::GLFrameBuffer::attachment_set_loadstore_op ( GPUAttachmentType  ,
eGPULoadOp  ,
eGPUStoreOp   
)
inlineoverridevirtual

Implements blender::gpu::FrameBuffer.

Definition at line 81 of file gl_framebuffer.hh.

◆ 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  dst_offset_x,
int  dst_offset_y 
)
overridevirtual

◆ check()

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

This is a rather slow operation. Don't check in normal cases.

Implements blender::gpu::FrameBuffer.

Definition at line 95 of file gl_framebuffer.cc.

References bind(), BLI_snprintf(), err, FORMAT_STATUS, and blender::gpu::FrameBuffer::name_.

◆ 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 27 of file gl_framebuffer.hh.


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