Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "GPU_batch.h"
#include "GPU_capabilities.h"
#include "GPU_shader.h"
#include "GPU_texture.h"
#include "gpu_backend.hh"
#include "gpu_context_private.hh"
#include "gpu_texture_private.hh"
#include "gpu_framebuffer_private.hh"
Go to the source code of this file.
Classes | |
struct | GPUOffScreen |
Namespaces | |
blender | |
blender::gpu | |
Frame-Buffer Stack | |
Keeps track of frame-buffer binding operation to restore previously bound frame-buffers. | |
#define | FRAMEBUFFER_STACK_DEPTH 16 |
struct { | |
GPUFrameBuffer * framebuffers [FRAMEBUFFER_STACK_DEPTH] | |
uint top | |
} | FrameBufferStack = {{nullptr}} |
void | GPU_framebuffer_push (GPUFrameBuffer *fb) |
GPUFrameBuffer * | GPU_framebuffer_pop () |
uint | GPU_framebuffer_stack_level_get () |
GPUOffScreen | |
Container that holds a frame-buffer and its textures. Might be bound to multiple contexts. | |
#define | MAX_CTX_FB_LEN 3 |
static GPUFrameBuffer * | gpu_offscreen_fb_get (GPUOffScreen *ofs) |
GPUOffScreen * | GPU_offscreen_create (int width, int height, bool depth, eGPUTextureFormat format, char err_out[256]) |
void | GPU_offscreen_free (GPUOffScreen *ofs) |
void | GPU_offscreen_bind (GPUOffScreen *ofs, bool save) |
void | GPU_offscreen_unbind (GPUOffScreen *UNUSED(ofs), bool restore) |
void | GPU_offscreen_draw_to_screen (GPUOffScreen *ofs, int x, int y) |
void | GPU_offscreen_read_pixels (GPUOffScreen *ofs, eGPUDataFormat format, void *pixels) |
int | GPU_offscreen_width (const GPUOffScreen *ofs) |
int | GPU_offscreen_height (const GPUOffScreen *ofs) |
GPUTexture * | GPU_offscreen_color_texture (const GPUOffScreen *ofs) |
void | GPU_offscreen_viewport_data_get (GPUOffScreen *ofs, GPUFrameBuffer **r_fb, GPUTexture **r_color, GPUTexture **r_depth) |
#define FRAMEBUFFER_STACK_DEPTH 16 |
Definition at line 515 of file gpu_framebuffer.cc.
#define MAX_CTX_FB_LEN 3 |
Definition at line 552 of file gpu_framebuffer.cc.
void GPU_backbuffer_bind | ( | eGPUBackBuffer | buffer | ) |
Definition at line 267 of file gpu_framebuffer.cc.
References blender::gpu::Context::back_left, blender::gpu::Context::back_right, blender::gpu::FrameBuffer::bind(), buffer, blender::gpu::Context::get(), and GPU_BACKBUFFER_LEFT.
Referenced by wm_draw_window().
Definition at line 405 of file gpu_framebuffer.cc.
References blender::gpu::Context::active_fb, blue, blender::gpu::FrameBuffer::clear(), blender::gpu::Context::get(), GPU_COLOR_BIT, green, and red.
Referenced by blender::ed::space_node::draw_background_color(), draw_timeline_seq(), DRW_draw_render_loop_offscreen(), ED_screen_preview_render(), gpencil_render_offscreen(), hud_region_draw(), playanim_toscreen(), region_clear_color(), region_draw_status_text(), screen_opengl_render_doit(), UI_ThemeClearColor(), wm_draw_window_offscreen(), wm_draw_window_onscreen(), wm_main_playanim_intern(), and wm_window_ghostwindow_add().
Definition at line 411 of file gpu_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::FrameBuffer::clear(), blender::gpu::Context::get(), and GPU_DEPTH_BIT.
Referenced by ED_screen_preview_render(), gpencil_render_offscreen(), gpu_select_pick_begin(), gpu_select_pick_load_id(), gpu_select_query_begin(), screen_opengl_render_doit(), and wm_xr_draw_view().
GPUFrameBuffer* GPU_framebuffer_active_get | ( | void | ) |
Definition at line 284 of file gpu_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::Context::get(), and blender::gpu::wrap().
Referenced by blender::gpu::MTLTexture::clear(), blender::gpu::GLTexture::clear(), blender::ed::space_node::draw_nodespace_back_pix(), draw_shgroup(), DRW_draw_render_loop_2d_ex(), DRW_draw_render_loop_ex(), ED_region_do_draw(), ED_view3d_draw_offscreen_imbuf(), GPU_framebuffer_bound(), GPU_offscreen_bind(), gpu_select_pick_load_id(), OVERLAY_edit_uv_draw(), pygpu_framebuffer_stack_push_and_bind_or_error(), sequencer_ibuf_get(), WM_opengl_context_activate(), WM_opengl_context_create(), WM_opengl_context_dispose(), WM_opengl_context_release(), wm_surface_make_drawable(), wm_surface_reset_drawable(), wm_window_make_drawable(), wm_window_reset_drawable(), and wm_xr_session_surface_draw().
GPUFrameBuffer* GPU_framebuffer_back_get | ( | void | ) |
Returns the default frame-buffer. Will always exists even if it's just a dummy.
Definition at line 290 of file gpu_framebuffer.cc.
References blender::gpu::Context::back_left, blender::gpu::Context::get(), and blender::gpu::wrap().
Referenced by DRW_draw_render_loop_2d_ex(), DRW_draw_render_loop_ex(), WM_opengl_context_activate(), WM_opengl_context_create(), WM_opengl_context_dispose(), WM_opengl_context_release(), wm_surface_make_drawable(), wm_surface_reset_drawable(), wm_window_make_drawable(), and wm_window_reset_drawable().
void GPU_framebuffer_bind | ( | GPUFrameBuffer * | gpu_fb | ) |
Definition at line 243 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by blender::eevee::Film::accumulate(), blender::gpu::MTLTexture::clear(), blender::gpu::GLTexture::clear(), blender::eevee::Film::display(), dof_dilate_tiles_pass_draw(), blender::draw::image_engine::ScreenSpaceDrawingMode< TextureMethod >::draw_scene(), draw_timeline_seq(), DRW_curves_update(), DRW_draw_callbacks_post_scene(), DRW_draw_depth_loop(), DRW_draw_depth_object(), DRW_draw_render_loop_2d_ex(), DRW_draw_render_loop_ex(), DRW_draw_select_loop(), drw_engines_draw_scene(), DRW_hair_update(), DRW_select_buffer_read(), ED_region_do_draw(), ED_view3d_draw_offscreen_imbuf(), EEVEE_bloom_draw(), EEVEE_bloom_output_accumulate(), EEVEE_create_minmax_buffer(), EEVEE_cryptomatte_output_accumulate(), EEVEE_depth_of_field_draw(), eevee_draw_scene(), EEVEE_effects_downsample_radiance_buffer(), EEVEE_lightbake_filter_diffuse(), EEVEE_lightbake_filter_glossy(), EEVEE_lightbake_filter_visibility(), eevee_lightbake_render_world_sample(), EEVEE_lookdev_draw(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), EEVEE_material_output_accumulate(), EEVEE_mist_output_accumulate(), EEVEE_motion_blur_cache_finish(), EEVEE_motion_blur_draw(), EEVEE_occlusion_compute(), EEVEE_occlusion_draw_debug(), EEVEE_occlusion_output_accumulate(), EEVEE_reflection_compute(), EEVEE_reflection_output_accumulate(), EEVEE_refraction_compute(), eevee_render_color_result(), EEVEE_render_draw(), eevee_render_draw_background(), EEVEE_renderpasses_draw(), EEVEE_renderpasses_postprocess(), EEVEE_shadow_output_accumulate(), EEVEE_shadows_draw_cascades(), EEVEE_shadows_draw_cubemap(), EEVEE_subsurface_compute(), EEVEE_subsurface_data_render(), EEVEE_subsurface_output_accumulate(), EEVEE_subsurface_output_init(), EEVEE_temporal_sampling_draw(), EEVEE_update_noise(), EEVEE_velocity_resolve(), EEVEE_volumes_compute(), EEVEE_volumes_output_accumulate(), EEVEE_volumes_resolve(), external_draw_scene(), gizmo_find_intersected_3d(), GPENCIL_antialiasing_draw(), gpencil_draw_mask(), GPENCIL_draw_object(), GPENCIL_draw_scene(), GPENCIL_draw_scene_depth_only(), GPENCIL_render_init(), GPENCIL_render_result_combined(), GPU_framebuffer_bind_loadstore(), GPU_offscreen_unbind(), GPU_viewport_stereo_composite(), lightbake_render_scene_face(), lightbake_render_scene_reflected(), lightbake_render_world_face(), material_renderpass_accumulate(), OVERLAY_antialiasing_end(), OVERLAY_antialiasing_start(), OVERLAY_draw_scene(), OVERLAY_edit_curve_draw(), OVERLAY_edit_lattice_draw(), OVERLAY_edit_mesh_draw(), OVERLAY_edit_particle_draw(), OVERLAY_edit_text_draw(), OVERLAY_edit_uv_draw(), OVERLAY_image_scene_background_draw(), OVERLAY_outline_draw(), OVERLAY_paint_draw(), OVERLAY_pose_draw(), OVERLAY_sculpt_curves_draw(), OVERLAY_sculpt_draw(), OVERLAY_xray_depth_copy(), pygpu_framebuffer_stack_pop_and_restore_or_error(), pygpu_framebuffer_stack_push_and_bind_or_error(), blender::eevee::ShadingView::render(), blender::eevee::ForwardPipeline::render(), select_cache_init(), select_draw_scene(), sequencer_draw_preview(), sequencer_ibuf_get(), view3d_opengl_read_Z_pixels(), workbench_antialiasing_draw_pass(), workbench_dof_draw_pass(), workbench_draw_sample(), workbench_render(), workbench_render_result_z(), workbench_transparent_draw_depth_pass(), and workbench_volume_draw_pass().
void GPU_framebuffer_bind_loadstore | ( | GPUFrameBuffer * | gpu_fb, |
const GPULoadStore * | load_store_actions, | ||
uint | actions_len | ||
) |
Definition at line 249 of file gpu_framebuffer.cc.
References fb(), GPU_framebuffer_bind(), and blender::gpu::unwrap().
void GPU_framebuffer_bind_no_srgb | ( | GPUFrameBuffer * | fb | ) |
Workaround for binding a SRGB frame-buffer without doing the SRGB transform.
Definition at line 261 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by blender::ed::space_node::draw_nodespace_back_pix(), draw_timeline_seq(), blender::ed::space_node::node_draw_space(), and sequencer_draw_preview().
void GPU_framebuffer_blit | ( | GPUFrameBuffer * | gpufb_read, |
int | read_slot, | ||
GPUFrameBuffer * | gpufb_write, | ||
int | write_slot, | ||
eGPUFrameBufferBits | blit_buffers | ||
) |
Definition at line 447 of file gpu_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::FrameBuffer::bind(), BLI_assert, blender::gpu::FrameBuffer::blit_to(), blender::gpu::FrameBuffer::color_tex(), blender::gpu::FrameBuffer::depth_tex(), blender::gpu::Context::get(), GPU_DEPTH_BIT, GPU_STENCIL_BIT, GPU_texture_depth(), GPU_texture_format(), GPU_texture_stencil(), and blender::gpu::unwrap().
Referenced by blender::gpu::GLTexture::copy_to(), eevee_draw_scene(), EEVEE_subsurface_compute(), EEVEE_subsurface_output_accumulate(), EEVEE_temporal_sampling_draw(), external_draw_scene(), GPENCIL_fast_draw_end(), and GPENCIL_fast_draw_start().
bool GPU_framebuffer_bound | ( | GPUFrameBuffer * | gpu_fb | ) |
Definition at line 296 of file gpu_framebuffer.cc.
References GPU_framebuffer_active_get().
Referenced by pygpu_framebuffer_clear(), pygpu_framebuffer_is_bound(), and pygpu_framebuffer_stack_pop_and_restore_or_error().
bool GPU_framebuffer_check_valid | ( | GPUFrameBuffer * | gpu_fb, |
char | err_out[256] | ||
) |
Definition at line 303 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by draw_select_framebuffer_depth_only_setup(), GPU_offscreen_create(), select_engine_framebuffer_setup(), and workbench_render_framebuffers_init().
void GPU_framebuffer_clear | ( | GPUFrameBuffer * | gpu_fb, |
eGPUFrameBufferBits | buffers, | ||
const float | clear_col[4], | ||
float | clear_depth, | ||
uint | clear_stencil | ||
) |
Definition at line 391 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by draw_shgroup(), eevee_draw_scene(), and pygpu_framebuffer_clear().
void GPU_framebuffer_config_array | ( | GPUFrameBuffer * | gpu_fb, |
const GPUAttachment * | config, | ||
int | config_len | ||
) |
Definition at line 340 of file gpu_framebuffer.cc.
References fb(), GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, GPU_FB_DEPTH_STENCIL_ATTACHMENT, GPU_texture_stencil(), GPUAttachment::mip, GPUAttachment::tex, type, and blender::gpu::unwrap().
Referenced by pygpu_framebuffer__tp_new().
GPUFrameBuffer* GPU_framebuffer_create | ( | const char * | name | ) |
Definition at line 229 of file gpu_framebuffer.cc.
References blender::gpu::GPUBackend::get(), and blender::gpu::wrap().
Referenced by draw_select_framebuffer_depth_only_setup(), EEVEE_effects_init(), EEVEE_shadows_update(), pygpu_framebuffer__tp_new(), and select_engine_framebuffer_setup().
void GPU_framebuffer_free | ( | GPUFrameBuffer * | gpu_fb | ) |
Definition at line 236 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by DRW_curves_update(), DRW_draw_depth_loop(), DRW_draw_depth_object(), DRW_hair_update(), gizmo_find_intersected_3d(), gpu_offscreen_fb_get(), GPU_offscreen_free(), pygpu_framebuffer_free_if_possible(), view3d_opengl_read_Z_pixels(), and blender::gpu::GLTexture::~GLTexture().
void GPU_framebuffer_multi_clear | ( | GPUFrameBuffer * | gpu_fb, |
const float(*) | clear_cols[4] | ||
) |
Definition at line 400 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by GPENCIL_draw_object(), and GPENCIL_draw_scene().
GPUFrameBuffer* GPU_framebuffer_pop | ( | ) |
Definition at line 529 of file gpu_framebuffer.cc.
References BLI_assert, and FrameBufferStack.
Referenced by GPU_offscreen_unbind(), and pygpu_framebuffer_stack_pop_and_restore_or_error().
void GPU_framebuffer_push | ( | GPUFrameBuffer * | fb | ) |
Definition at line 522 of file gpu_framebuffer.cc.
References BLI_assert, fb(), FRAMEBUFFER_STACK_DEPTH, and FrameBufferStack.
Referenced by GPU_offscreen_bind(), and pygpu_framebuffer_stack_push_and_bind_or_error().
void** GPU_framebuffer_py_reference_get | ( | GPUFrameBuffer * | gpu_fb | ) |
Definition at line 495 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by BPyGPUFrameBuffer_CreatePyObject().
void GPU_framebuffer_py_reference_set | ( | GPUFrameBuffer * | gpu_fb, |
void ** | py_ref | ||
) |
Definition at line 500 of file gpu_framebuffer.cc.
References BLI_assert, and blender::gpu::unwrap().
Referenced by BPyGPUFrameBuffer_CreatePyObject(), and pygpu_framebuffer_free_safe().
void GPU_framebuffer_read_color | ( | GPUFrameBuffer * | gpu_fb, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
int | channels, | ||
int | slot, | ||
eGPUDataFormat | format, | ||
void * | data | ||
) |
Definition at line 424 of file gpu_framebuffer.cc.
References channels(), data, GPU_COLOR_BIT, blender::gpu::unwrap(), w(), x, and y.
Referenced by DRW_curves_update(), DRW_hair_update(), DRW_select_buffer_read(), eevee_cryptomatte_download_buffer(), eevee_render_color_result(), GPENCIL_render_result_combined(), GPU_offscreen_read_pixels(), pygpu_framebuffer_read_color(), and workbench_render().
void GPU_framebuffer_read_depth | ( | GPUFrameBuffer * | gpu_fb, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
eGPUDataFormat | format, | ||
void * | data | ||
) |
Definition at line 417 of file gpu_framebuffer.cc.
References data, GPU_DEPTH_BIT, blender::gpu::unwrap(), w(), x, and y.
Referenced by GPENCIL_render_result_z(), gpu_select_pick_load_id(), pygpu_framebuffer_read_depth(), view3d_opengl_read_Z_pixels(), and workbench_render_result_z().
void GPU_framebuffer_recursive_downsample | ( | GPUFrameBuffer * | gpu_fb, |
int | max_lvl, | ||
void(*)(void *userData, int level) | callback, | ||
void * | userData | ||
) |
Definition at line 486 of file gpu_framebuffer.cc.
References callback, and blender::gpu::unwrap().
Referenced by EEVEE_create_minmax_buffer(), EEVEE_depth_of_field_draw(), EEVEE_downsample_cube_buffer(), EEVEE_effects_downsample_radiance_buffer(), EEVEE_lightbake_filter_planar(), and workbench_dof_draw_pass().
Definition at line 279 of file gpu_framebuffer.cc.
References blender::gpu::Context::back_left, blender::gpu::FrameBuffer::bind(), and blender::gpu::Context::get().
Referenced by blender::ed::space_node::draw_nodespace_back_pix(), DRW_custom_pipeline(), DRW_draw_depth_loop(), DRW_draw_depth_object(), DRW_draw_render_loop_2d_ex(), DRW_draw_render_loop_ex(), DRW_draw_render_loop_offscreen(), DRW_draw_select_loop(), DRW_render_gpencil(), DRW_render_to_image(), DRW_select_buffer_read(), ED_view3d_draw_offscreen_imbuf(), gizmo_find_intersected_3d(), GPU_offscreen_create(), GPU_offscreen_unbind(), GPU_viewport_stereo_composite(), GPU_viewport_unbind(), sequencer_ibuf_get(), view3d_opengl_read_Z_pixels(), wm_xr_draw_view(), wm_xr_session_surface_draw(), blender::gpu::GLFrameBuffer::~GLFrameBuffer(), and blender::gpu::MTLFrameBuffer::~MTLFrameBuffer().
uint GPU_framebuffer_stack_level_get | ( | ) |
Definition at line 536 of file gpu_framebuffer.cc.
References FrameBufferStack.
Referenced by pygpu_framebuffer_stack_context_enter(), pygpu_framebuffer_stack_context_exit(), pygpu_framebuffer_stack_pop_and_restore_or_error(), pygpu_framebuffer_stack_push_and_bind_or_error(), pygpu_offscreen_stack_context_enter(), and pygpu_offscreen_stack_context_exit().
void GPU_framebuffer_texture_attach | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex, | ||
int | slot, | ||
int | mip | ||
) |
Definition at line 315 of file gpu_framebuffer.cc.
References fb(), GPU_framebuffer_texture_attach_ex(), and tex.
Referenced by draw_select_framebuffer_depth_only_setup(), EEVEE_downsample_cube_buffer(), eevee_draw_scene(), EEVEE_effects_init(), eevee_lightbake_render_world_sample(), EEVEE_render_draw(), EEVEE_screen_raytrace_init(), EEVEE_subsurface_compute(), material_renderpass_accumulate(), and select_engine_framebuffer_setup().
void GPU_framebuffer_texture_attach_ex | ( | GPUFrameBuffer * | gpu_fb, |
GPUAttachment | attachment, | ||
int | slot | ||
) |
Definition at line 308 of file gpu_framebuffer.cc.
References tex, GPUAttachment::tex, type, and blender::gpu::unwrap().
Referenced by GPU_framebuffer_texture_attach(), GPU_framebuffer_texture_cubeface_attach(), and GPU_framebuffer_texture_layer_attach().
void GPU_framebuffer_texture_cubeface_attach | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex, | ||
int | slot, | ||
int | face, | ||
int | mip | ||
) |
Definition at line 328 of file gpu_framebuffer.cc.
References fb(), GPU_framebuffer_texture_attach_ex(), and tex.
void GPU_framebuffer_texture_detach | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex | ||
) |
Definition at line 335 of file gpu_framebuffer.cc.
References fb(), tex, and blender::gpu::unwrap().
Referenced by EEVEE_downsample_cube_buffer(), eevee_draw_scene(), EEVEE_render_draw(), and material_renderpass_accumulate().
void GPU_framebuffer_texture_layer_attach | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex, | ||
int | slot, | ||
int | layer, | ||
int | mip | ||
) |
Definition at line 321 of file gpu_framebuffer.cc.
References fb(), GPU_framebuffer_texture_attach_ex(), and tex.
Referenced by EEVEE_shadows_draw_cascades(), and EEVEE_shadows_draw_cubemap().
void GPU_framebuffer_viewport_get | ( | GPUFrameBuffer * | gpu_fb, |
int | r_viewport[4] | ||
) |
Definition at line 379 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by pygpu_framebuffer_viewport_get().
void GPU_framebuffer_viewport_reset | ( | GPUFrameBuffer * | gpu_fb | ) |
Definition at line 384 of file gpu_framebuffer.cc.
References blender::gpu::unwrap().
Referenced by EEVEE_lightbake_filter_diffuse(), EEVEE_lightbake_filter_visibility(), EEVEE_lookdev_draw(), EEVEE_motion_blur_draw(), and EEVEE_occlusion_compute().
void GPU_framebuffer_viewport_set | ( | GPUFrameBuffer * | gpu_fb, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Definition at line 373 of file gpu_framebuffer.cc.
References height, blender::gpu::unwrap(), width, x, and y.
Referenced by blender::eevee::Film::accumulate(), blender::eevee::Film::display(), EEVEE_lightbake_filter_diffuse(), EEVEE_lightbake_filter_visibility(), EEVEE_lookdev_draw(), EEVEE_motion_blur_draw(), EEVEE_occlusion_compute(), and pygpu_framebuffer_viewport_set().
void GPU_frontbuffer_read_pixels | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
int | channels, | ||
eGPUDataFormat | format, | ||
void * | data | ||
) |
Definition at line 439 of file gpu_framebuffer.cc.
References channels(), data, blender::gpu::Context::front_left, blender::gpu::Context::get(), GPU_COLOR_BIT, blender::gpu::FrameBuffer::read(), w(), x, and y.
Referenced by paint_sample_color(), WM_window_pixel_sample_read(), and WM_window_pixels_read().
void GPU_offscreen_bind | ( | GPUOffScreen * | ofs, |
bool | save | ||
) |
Definition at line 662 of file gpu_framebuffer.cc.
References fb(), GPU_framebuffer_active_get(), GPU_framebuffer_push(), gpu_offscreen_fb_get(), and blender::gpu::unwrap().
Referenced by DRW_draw_render_loop_offscreen(), ED_screen_preview_render(), ED_view3d_draw_offscreen_imbuf(), gpencil_render_offscreen(), GPU_viewport_unbind_from_offscreen(), pygpu_offscreen_draw_view3d(), pygpu_offscreen_stack_context_enter(), screen_opengl_render_doit(), wm_draw_region_bind(), wm_draw_window(), and wm_xr_draw_view().
GPUTexture* GPU_offscreen_color_texture | ( | const GPUOffScreen * | ofs | ) |
Definition at line 714 of file gpu_framebuffer.cc.
References GPUOffScreen::color.
Referenced by pygpu_offscreen_color_texture_get(), pygpu_offscreen_texture_color_get(), wm_draw_offscreen_texture_parameters(), wm_draw_region_texture(), and wm_draw_window().
GPUOffScreen* GPU_offscreen_create | ( | int | width, |
int | height, | ||
bool | depth, | ||
eGPUTextureFormat | format, | ||
char | err_out[256] | ||
) |
Definition at line 605 of file gpu_framebuffer.cc.
References BLI_snprintf(), GPUOffScreen::color, GPUOffScreen::depth, error(), fb(), GPU_DEPTH24_STENCIL8, GPU_framebuffer_check_valid(), GPU_framebuffer_restore(), gpu_offscreen_fb_get(), GPU_offscreen_free(), GPU_texture_create_2d(), height, max_ii(), and width.
Referenced by ED_screen_preview_render(), ED_view3d_draw_offscreen_imbuf(), gpencil_render_offscreen(), pygpu_offscreen__tp_new(), screen_opengl_render_init(), wm_draw_region_buffer_create(), wm_draw_window(), and wm_xr_session_surface_offscreen_ensure().
void GPU_offscreen_draw_to_screen | ( | GPUOffScreen * | ofs, |
int | x, | ||
int | y | ||
) |
Definition at line 686 of file gpu_framebuffer.cc.
References blender::gpu::Context::active_fb, blender::gpu::FrameBuffer::blit_to(), blender::gpu::Context::get(), GPU_COLOR_BIT, gpu_offscreen_fb_get(), blender::gpu::unwrap(), x, and y.
Referenced by wm_draw_region_blit().
|
static |
Returns the correct frame-buffer for the current context.
Definition at line 567 of file gpu_framebuffer.cc.
References BLI_assert, GPUOffScreen::framebuffers, blender::gpu::Context::get(), and GPU_framebuffer_free().
Referenced by GPU_offscreen_bind(), GPU_offscreen_create(), GPU_offscreen_draw_to_screen(), GPU_offscreen_read_pixels(), and GPU_offscreen_viewport_data_get().
void GPU_offscreen_free | ( | GPUOffScreen * | ofs | ) |
Definition at line 645 of file gpu_framebuffer.cc.
References GPUOffScreen::color, GPUOffScreen::depth, GPUOffScreen::framebuffers, GPU_framebuffer_free(), GPU_texture_free(), and MEM_freeN.
Referenced by BPyGPUOffScreen__tp_dealloc(), ED_screen_preview_render(), ED_view3d_draw_offscreen_imbuf(), gpencil_render_offscreen(), GPU_offscreen_create(), pygpu_offscreen_free(), screen_opengl_render_end(), wm_draw_region_buffer_free(), wm_draw_window(), wm_xr_session_surface_free_data(), and wm_xr_session_surface_offscreen_ensure().
int GPU_offscreen_height | ( | const GPUOffScreen * | ofs | ) |
Definition at line 709 of file gpu_framebuffer.cc.
References GPUOffScreen::color, and GPU_texture_height().
Referenced by ED_view3d_draw_offscreen_imbuf(), GPU_viewport_bind_from_offscreen(), pygpu_offscreen_draw_view3d(), pygpu_offscreen_height_get(), wm_draw_region_buffer_create(), and wm_xr_session_surface_offscreen_ensure().
void GPU_offscreen_read_pixels | ( | GPUOffScreen * | ofs, |
eGPUDataFormat | format, | ||
void * | pixels | ||
) |
Definition at line 693 of file gpu_framebuffer.cc.
References BLI_assert, GPUOffScreen::color, ELEM, GPU_DATA_FLOAT, GPU_DATA_UBYTE, GPU_framebuffer_read_color(), gpu_offscreen_fb_get(), GPU_texture_height(), GPU_texture_width(), and w().
Referenced by ED_screen_preview_render(), ED_view3d_draw_offscreen_imbuf(), gpencil_render_offscreen(), and screen_opengl_render_doit().
void GPU_offscreen_unbind | ( | GPUOffScreen * | UNUSEDofs, |
bool | restore | ||
) |
Definition at line 671 of file gpu_framebuffer.cc.
References fb(), GPU_framebuffer_bind(), GPU_framebuffer_pop(), and GPU_framebuffer_restore().
Referenced by ED_screen_preview_render(), ED_view3d_draw_offscreen_imbuf(), gpencil_render_offscreen(), pygpu_offscreen_draw_view3d(), pygpu_offscreen_stack_context_exit(), pygpu_offscreen_unbind(), screen_opengl_render_doit(), wm_draw_region_unbind(), and wm_draw_window().
void GPU_offscreen_viewport_data_get | ( | GPUOffScreen * | ofs, |
GPUFrameBuffer ** | r_fb, | ||
GPUTexture ** | r_color, | ||
GPUTexture ** | r_depth | ||
) |
Definition at line 719 of file gpu_framebuffer.cc.
References GPUOffScreen::color, GPUOffScreen::depth, and gpu_offscreen_fb_get().
Referenced by GPU_viewport_bind_from_offscreen().
int GPU_offscreen_width | ( | const GPUOffScreen * | ofs | ) |
Definition at line 704 of file gpu_framebuffer.cc.
References GPUOffScreen::color, and GPU_texture_width().
Referenced by ED_view3d_draw_offscreen_imbuf(), GPU_viewport_bind_from_offscreen(), pygpu_offscreen_draw_view3d(), pygpu_offscreen_width_get(), wm_draw_region_buffer_create(), and wm_xr_session_surface_offscreen_ensure().
GPUFrameBuffer* framebuffers[FRAMEBUFFER_STACK_DEPTH] |
Definition at line 518 of file gpu_framebuffer.cc.
struct { ... } FrameBufferStack |
Referenced by GPU_framebuffer_pop(), GPU_framebuffer_push(), and GPU_framebuffer_stack_level_get().
uint top |
Definition at line 519 of file gpu_framebuffer.cc.