|
Blender V4.3
|
#include "DRW_engine.hh"#include "DRW_render.hh"#include "DNA_modifier_types.h"#include "DNA_screen_types.h"#include "DNA_view3d_types.h"#include "BKE_object.hh"#include "BKE_particle.h"#include "ED_image.hh"#include "ED_screen.hh"#include "GPU_batch.hh"#include "GPU_debug.hh"#include "GPU_matrix.hh"#include "GPU_shader.hh"#include "GPU_state.hh"#include "GPU_viewport.hh"#include "RE_engine.h"#include "RE_pipeline.h"#include "external_engine.h"Go to the source code of this file.
Classes | |
| struct | EXTERNAL_Storage |
| struct | EXTERNAL_StorageList |
| struct | EXTERNAL_FramebufferList |
| struct | EXTERNAL_TextureList |
| struct | EXTERNAL_PassList |
| struct | EXTERNAL_Data |
| struct | EXTERNAL_PrivateData |
Macros | |
| #define | EXTERNAL_ENGINE "BLENDER_EXTERNAL" |
Functions | |
| static void | external_engine_init (void *vedata) |
| static void | external_cache_image_add (DRWShadingGroup *grp) |
| static void | external_cache_init (void *vedata) |
| static void | external_cache_populate (void *vedata, Object *ob) |
| static void | external_cache_finish (void *) |
| static void | external_draw_scene_do_v3d (void *vedata) |
| static void | external_image_space_matrix_set (const RenderEngine *engine) |
| static void | external_draw_scene_do_image (void *) |
| static void | external_draw_scene_do (void *vedata) |
| static void | external_draw_scene (void *vedata) |
| static void | external_engine_free () |
| bool | DRW_engine_external_acquire_for_image_editor () |
| void | DRW_engine_external_free (RegionView3D *rv3d) |
Variables | ||
| char | datatoc_basic_depth_frag_glsl [] | |
| char | datatoc_basic_depth_vert_glsl [] | |
| char | datatoc_common_view_lib_glsl [] | |
| struct { | ||
| GPUShader * depth_sh | ||
| } | e_data = {nullptr} | |
| static const DrawEngineDataSize | external_data_size = DRW_VIEWPORT_DATA_SIZE(EXTERNAL_Data) | |
| DrawEngineType | draw_engine_external_type | |
| RenderEngineType | DRW_engine_viewport_external_type | |
Base engine for external render engines. We use it for depth and non-mesh objects.
Definition in file external_engine.cc.
| #define EXTERNAL_ENGINE "BLENDER_EXTERNAL" |
Definition at line 39 of file external_engine.cc.
| bool DRW_engine_external_acquire_for_image_editor | ( | void | ) |
Definition at line 487 of file external_engine.cc.
References DRW_context_state_get(), ED_space_image(), IMA_TYPE_R_RESULT, RE_engine_draw_acquire(), RE_GetSceneRender(), DRWContextState::scene, DRWContextState::space_data, SPACE_IMAGE, and SpaceLink::spacetype.
Referenced by drw_engine_enable_image_editor().
| void DRW_engine_external_free | ( | RegionView3D * | rv3d | ) |
Definition at line 522 of file external_engine.cc.
References DRW_gpu_context_disable_ex(), DRW_gpu_context_enable_ex(), RE_FreeViewRender(), and RegionView3D::view_render.
Referenced by ED_view3d_stop_render_preview(), and view3d_main_region_free().
|
static |
Definition at line 233 of file external_engine.cc.
|
static |
Definition at line 129 of file external_engine.cc.
References DRW_cache_quad_get(), DRW_shgroup_call_obmat, scale_m4_fl(), translate_m4(), and unit_m4().
Referenced by external_cache_init().
|
static |
Definition at line 143 of file external_engine.cc.
References EXTERNAL_FramebufferList::depth_buffer_fb, EXTERNAL_TextureList::depth_buffer_tx, EXTERNAL_PassList::depth_pass, EXTERNAL_PrivateData::depth_shgrp, DRW_context_state_get(), DRW_pass_create(), DRW_shgroup_create(), DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_DEPTH, DRW_texture_ensure_fullscreen_2d(), e_data, external_cache_image_add(), View3D::flag2, EXTERNAL_StorageList::g_data, GPU_DEPTH24_STENCIL8, GPU_framebuffer_ensure_config, EXTERNAL_PrivateData::need_depth, DRWContextState::space_data, SPACE_IMAGE, SpaceLink::spacetype, EXTERNAL_PrivateData::update_depth, DRWContextState::v3d, and V3D_HIDE_OVERLAYS.
|
static |
Definition at line 184 of file external_engine.cc.
References EXTERNAL_PrivateData::depth_shgrp, DRW_cache_object_surface_get(), DRW_cache_particles_get_hair(), DRW_context_state_get(), DRW_object_is_renderable(), DRW_object_is_visible_psys_in_active_context(), DRW_object_visibility_in_active_context(), DRW_shgroup_call, eModifierType_ParticleSystem, ListBase::first, EXTERNAL_StorageList::g_data, LISTBASE_FOREACH, Object::modifiers, EXTERNAL_PrivateData::need_depth, OB_GPENCIL_LEGACY, OB_MESH, OB_VISIBLE_SELF, ParticleSystem::part, PART_DRAW_PATH, PART_DRAW_REND, ParticleSettings::ren_as, DRWContextState::space_data, SPACE_IMAGE, SpaceLink::spacetype, and Object::type.
|
static |
Definition at line 404 of file external_engine.cc.
References DefaultFramebufferList::default_fb, EXTERNAL_FramebufferList::depth_buffer_fb, DefaultFramebufferList::depth_only_fb, EXTERNAL_PassList::depth_pass, DRW_context_state_get(), DRW_draw_pass(), DRW_viewport_framebuffer_list_get(), DRWContextState::evil_C, external_draw_scene_do(), EXTERNAL_StorageList::g_data, GPU_DEPTH_BIT, GPU_framebuffer_bind(), GPU_framebuffer_blit(), GPU_framebuffer_clear_color(), EXTERNAL_PrivateData::need_depth, and EXTERNAL_PrivateData::update_depth.
|
static |
Definition at line 384 of file external_engine.cc.
References DRW_context_state_get(), external_draw_scene_do_image(), external_draw_scene_do_v3d(), DRWContextState::space_data, SPACE_IMAGE, SpaceLink::spacetype, and DRWContextState::v3d.
Referenced by external_draw_scene().
|
static |
Definition at line 334 of file external_engine.cc.
References BLI_assert, DefaultFramebufferList::default_fb, DRWContextState::depsgraph, RenderEngineType::draw, DRW_context_state_get(), DRW_state_reset(), DRW_state_reset_ex(), DRW_STATE_WRITE_COLOR, DRW_viewport_framebuffer_list_get(), DRWContextState::evil_C, external_image_space_matrix_set(), GPU_apply_state(), GPU_bgl_end(), GPU_debug_group_begin(), GPU_debug_group_end(), GPU_framebuffer_clear_depth(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), RE_engine_draw_release(), RE_engine_get(), RE_GetSceneRender(), DRWContextState::scene, and RenderEngine::type.
Referenced by external_draw_scene_do().
|
static |
Definition at line 235 of file external_engine.cc.
References DRWContextState::depsgraph, DRW_context_state_get(), DRW_state_reset_ex(), DRW_STATE_WRITE_COLOR, ED_region_pixelspace(), DRWContextState::engine_type, DRWContextState::evil_C, GPU_apply_state(), GPU_bgl_end(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), RE_NewViewRender(), RE_view_engine_get(), DRWContextState::region, DRWContextState::rv3d, STRNCPY, RenderEngine::text, RenderEngine::type, RenderEngineType::view_draw, RegionView3D::view_render, and RenderEngineType::view_update.
Referenced by external_draw_scene_do().
|
static |
Definition at line 435 of file external_engine.cc.
References DRW_SHADER_FREE_SAFE, and e_data.
|
static |
Definition at line 100 of file external_engine.cc.
References DRW_context_state_get(), e_data, EXTERNAL_StorageList::g_data, GPU_shader_create_from_info_name(), EXTERNAL_PrivateData::need_depth, DRWContextState::region, RGN_DRAW_NO_REBUILD, and EXTERNAL_PrivateData::update_depth.
|
static |
Definition at line 293 of file external_engine.cc.
References BLI_assert, DRW_context_state_get(), DRW_view_get_active(), DRW_view_viewmat_get(), DRW_view_winmat_get(), ED_space_image_get_size(), GPU_matrix_projection_set, GPU_matrix_scale_2f(), GPU_matrix_set, GPU_matrix_translate_2f(), RenderEngine::re, RE_GetViewPlane(), DRWContextState::space_data, rcti::xmin, and rcti::ymin.
Referenced by external_draw_scene_do_image().
| char datatoc_basic_depth_frag_glsl[] |
Definition at line 41 of file external_engine.cc.
| char datatoc_basic_depth_vert_glsl[] |
Definition at line 42 of file external_engine.cc.
| char datatoc_common_view_lib_glsl[] |
Definition at line 44 of file external_engine.cc.
| GPUShader* depth_sh |
Definition at line 87 of file external_engine.cc.
| DrawEngineType draw_engine_external_type |
Definition at line 442 of file external_engine.cc.
Referenced by drw_engine_enable_image_editor().
| RenderEngineType DRW_engine_viewport_external_type |
Definition at line 463 of file external_engine.cc.
Referenced by drw_engines_enable_from_engine(), and DRW_engines_register().
| struct { ... } e_data |
Referenced by external_cache_init(), external_engine_free(), and external_engine_init().
|
static |
Definition at line 440 of file external_engine.cc.