Blender
V3.3
|
#include <gl_framebuffer.hh>
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 | |
![]() | |
void ** | py_ref = nullptr |
void ** | ref = nullptr |
![]() | |
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 |
Implementation of FrameBuffer object using OpenGL.
Definition at line 25 of file gl_framebuffer.hh.
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.
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, ...)
ctx | Context the handle is from. |
target | The internal GL name (i.e: #GL_BACK_LEFT). |
fbo | The (optional) already created object for some implementation. Default is 0. |
w | Buffer width. |
h | Buffer 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_.
blender::gpu::GLFrameBuffer::~GLFrameBuffer | ( | ) |
Definition at line 55 of file gl_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::Context::back_left, BLI_assert, blender::gpu::GLContext::fbo_free(), blender::gpu::Context::get(), and GPU_framebuffer_restore().
void blender::gpu::GLFrameBuffer::apply_state | ( | ) |
Definition at line 220 of file gl_framebuffer.cc.
References blender::gpu::FrameBuffer::dirty_state_, glDisable, glEnable, blender::gpu::FrameBuffer::scissor_, blender::gpu::FrameBuffer::scissor_test_, UNPACK4, and blender::gpu::FrameBuffer::viewport_.
Referenced by blender::gpu::GLStateManager::apply_state().
|
inlineoverridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 81 of file gl_framebuffer.hh.
Implements blender::gpu::FrameBuffer.
Definition at line 245 of file gl_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::GLStateManager::active_fb, BLI_assert_msg, blender::gpu::FrameBuffer::dirty_attachments_, blender::gpu::FrameBuffer::dirty_state_, blender::gpu::GLContext::get(), glDisable, glEnable, GPU_shader_set_framebuffer_srgb_target(), blender::gpu::FrameBuffer::scissor_reset(), and blender::gpu::FrameBuffer::viewport_reset().
|
overridevirtual |
Copy src at the give offset inside dst.
Implements blender::gpu::FrameBuffer.
Definition at line 442 of file gl_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::StateManager::apply_state(), ARRAY_SIZE, bind(), BLI_assert, blender::gpu::FrameBuffer::dirty_attachments_, GPU_COLOR_BIT, mask(), src, blender::gpu::Context::state_manager, blender::gpu::to_gl(), w(), x, and y.
|
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_.
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 294 of file gl_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::StateManager::apply_state(), BLI_assert, blender::gpu::GLContext::get(), GPU_COLOR_BIT, GPU_color_mask(), GPU_DEPTH_BIT, GPU_depth_mask(), GPU_STENCIL_ALWAYS, GPU_STENCIL_BIT, GPU_stencil_mask_get(), GPU_stencil_test(), GPU_stencil_test_get(), GPU_stencil_write_mask_set(), GPU_write_mask(), GPU_write_mask_get(), mask(), blender::gpu::Context::state_manager, and blender::gpu::to_gl().
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 335 of file gl_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::StateManager::apply_state(), BLI_assert, BLI_assert_msg, blender::gpu::GLContext::get(), GPU_color_mask(), GPU_DATA_FLOAT, GPU_DATA_INT, GPU_DATA_UINT, GPU_DATA_UINT_24_8, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_write_mask(), GPU_write_mask_get(), blender::gpu::Context::state_manager, and type.
Referenced by clear_multi().
Implements blender::gpu::FrameBuffer.
Definition at line 387 of file gl_framebuffer.cc.
References blender::gpu::FrameBuffer::attachments_, clear_attachment(), GPU_DATA_FLOAT, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_MAX_ATTACHMENT, tex, and type.
|
overridevirtual |
Implements blender::gpu::FrameBuffer.
Definition at line 400 of file gl_framebuffer.cc.
References blender::compositor::area(), blender::gpu::FrameBuffer::attachments_, BLI_assert_msg, blender::gpu::channel_len_to_gl(), GPU_COLOR_BIT, GPU_DEPTH_BIT, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_STENCIL_BIT, tex, blender::gpu::to_gl(), type, and UNPACK4.
|
friend |
Definition at line 27 of file gl_framebuffer.hh.