Blender  V3.3
Public Member Functions | Public Attributes | Protected Attributes | List of all members
blender::gpu::FrameBuffer Class Referenceabstract

#include <gpu_framebuffer_private.hh>

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

Public Member Functions

virtual void bind (bool enabled_srgb)=0
 
virtual bool check (char err_out[256])=0
 
virtual void clear (eGPUFrameBufferBits buffers, const float clear_col[4], float clear_depth, uint clear_stencil)=0
 
virtual void clear_multi (const float(*clear_col)[4])=0
 
virtual void clear_attachment (GPUAttachmentType type, eGPUDataFormat data_format, const void *clear_value)=0
 
virtual void attachment_set_loadstore_op (GPUAttachmentType type, eGPULoadOp load_action, eGPUStoreOp store_action)=0
 
virtual void read (eGPUFrameBufferBits planes, eGPUDataFormat format, const int area[4], int channel_len, int slot, void *r_data)=0
 
virtual void blit_to (eGPUFrameBufferBits planes, int src_slot, FrameBuffer *dst, int dst_slot, int dst_offset_x, int dst_offset_y)=0
 
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
 
Constructor / Destructor
 FrameBuffer (const char *name)
 
virtual ~FrameBuffer ()
 
Attachments Management
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 ()
 

Public Attributes

void ** py_ref = nullptr
 
void ** ref = nullptr
 

Protected Attributes

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

Definition at line 72 of file gpu_framebuffer_private.hh.

Constructor & Destructor Documentation

◆ FrameBuffer()

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

Definition at line 30 of file gpu_framebuffer.cc.

References attachments_, BLI_strncpy(), dirty_attachments_, dirty_state_, and name_.

◆ ~FrameBuffer()

blender::gpu::FrameBuffer::~FrameBuffer ( )
virtual

Definition at line 49 of file gpu_framebuffer.cc.

References attachments_, and py_ref.

Member Function Documentation

◆ attachment_remove()

void blender::gpu::FrameBuffer::attachment_remove ( GPUAttachmentType  type)

◆ attachment_set()

void blender::gpu::FrameBuffer::attachment_set ( GPUAttachmentType  type,
const GPUAttachment new_attachment 
)

◆ attachment_set_loadstore_op()

virtual void blender::gpu::FrameBuffer::attachment_set_loadstore_op ( GPUAttachmentType  type,
eGPULoadOp  load_action,
eGPUStoreOp  store_action 
)
pure virtual

◆ bind()

virtual void blender::gpu::FrameBuffer::bind ( bool  enabled_srgb)
pure virtual

◆ blit_to()

virtual void blender::gpu::FrameBuffer::blit_to ( eGPUFrameBufferBits  planes,
int  src_slot,
FrameBuffer dst,
int  dst_slot,
int  dst_offset_x,
int  dst_offset_y 
)
pure virtual

◆ check()

virtual bool blender::gpu::FrameBuffer::check ( char  err_out[256])
pure virtual

◆ clear()

virtual void blender::gpu::FrameBuffer::clear ( eGPUFrameBufferBits  buffers,
const float  clear_col[4],
float  clear_depth,
uint  clear_stencil 
)
pure virtual

◆ clear_attachment()

virtual void blender::gpu::FrameBuffer::clear_attachment ( GPUAttachmentType  type,
eGPUDataFormat  data_format,
const void clear_value 
)
pure virtual

◆ clear_multi()

virtual void blender::gpu::FrameBuffer::clear_multi ( const float(*)  clear_col[4])
pure virtual

◆ color_tex()

GPUTexture* blender::gpu::FrameBuffer::color_tex ( int  slot) const
inline

◆ depth_tex()

GPUTexture* blender::gpu::FrameBuffer::depth_tex ( ) const
inline

◆ get_bits_per_pixel()

unsigned int blender::gpu::FrameBuffer::get_bits_per_pixel ( )

◆ load_store_config_array()

void blender::gpu::FrameBuffer::load_store_config_array ( const GPULoadStore load_store_actions,
uint  actions_len 
)

◆ read()

virtual void blender::gpu::FrameBuffer::read ( eGPUFrameBufferBits  planes,
eGPUDataFormat  format,
const int  area[4],
int  channel_len,
int  slot,
void r_data 
)
pure virtual

◆ recursive_downsample()

void blender::gpu::FrameBuffer::recursive_downsample ( int  max_lvl,
void(*)(void *userData, int level)  callback,
void userData 
)

◆ scissor_get()

void blender::gpu::FrameBuffer::scissor_get ( int  r_scissor[4]) const
inline

◆ scissor_reset()

void blender::gpu::FrameBuffer::scissor_reset ( )
inline

◆ scissor_set()

void blender::gpu::FrameBuffer::scissor_set ( const int  scissor[4])
inline

◆ scissor_test_get()

bool blender::gpu::FrameBuffer::scissor_test_get ( ) const
inline

Definition at line 184 of file gpu_framebuffer_private.hh.

References scissor_test_.

◆ scissor_test_set()

void blender::gpu::FrameBuffer::scissor_test_set ( bool  test)
inline

Definition at line 168 of file gpu_framebuffer_private.hh.

References dirty_state_, and scissor_test_.

Referenced by GPU_scissor_test().

◆ size_set()

void blender::gpu::FrameBuffer::size_set ( int  width,
int  height 
)
inline

◆ viewport_get()

void blender::gpu::FrameBuffer::viewport_get ( int  r_viewport[4]) const
inline

◆ viewport_reset()

void blender::gpu::FrameBuffer::viewport_reset ( )
inline

◆ viewport_set()

void blender::gpu::FrameBuffer::viewport_set ( const int  viewport[4])
inline

Member Data Documentation

◆ attachments_

GPUAttachment blender::gpu::FrameBuffer::attachments_[GPU_FB_MAX_ATTACHMENT]
protected

◆ dirty_attachments_

bool blender::gpu::FrameBuffer::dirty_attachments_
protected

◆ dirty_state_

bool blender::gpu::FrameBuffer::dirty_state_ = true
protected

◆ height_

int blender::gpu::FrameBuffer::height_
protected

◆ name_

char blender::gpu::FrameBuffer::name_[DEBUG_NAME_LEN]
protected

◆ py_ref

void** blender::gpu::FrameBuffer::py_ref = nullptr

Reference of a pointer that needs to be cleaned when deallocating the frame-buffer. Points to BPyGPUFrameBuffer.fb

Definition at line 94 of file gpu_framebuffer_private.hh.

Referenced by ~FrameBuffer().

◆ ref

void** blender::gpu::FrameBuffer::ref = nullptr

Definition at line 100 of file gpu_framebuffer_private.hh.

◆ scissor_

int blender::gpu::FrameBuffer::scissor_[4] = {0}
protected

◆ scissor_test_

bool blender::gpu::FrameBuffer::scissor_test_ = false
protected

◆ viewport_

int blender::gpu::FrameBuffer::viewport_[4] = {0}
protected

◆ width_

int blender::gpu::FrameBuffer::width_
protected

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