37 #define EXTERNAL_ENGINE "BLENDER_EXTERNAL"
155 GPU_ATTACHMENT_TEXTURE(txl->depth_buffer_tx),
274 data->info[0] =
'\0';
294 float view_matrix[4][4];
297 float projection_matrix[4][4];
308 const float width_inv =
width ? 1.0f /
width : 0.0f;
342 GPU_framebuffer_clear_depth(dfbl->
default_fb, 1.0f);
400 const float clear_col[4] = {0, 0, 0, 0};
404 GPU_framebuffer_clear_color(dfbl->
default_fb, clear_col);
472 if (space_data ==
NULL) {
487 if (
image->render_slot !=
image->last_render_slot) {
501 #undef EXTERNAL_ENGINE
General operations, lookup, etc. for blender objects.
#define LISTBASE_FOREACH(type, var, list)
void unit_m4(float m[4][4])
void translate_m4(float mat[4][4], float tx, float ty, float tz)
void scale_m4_fl(float R[4][4], float scale)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
@ eModifierType_ParticleSystem
#define V3D_HIDE_OVERLAYS
@ DRW_STATE_DEPTH_LESS_EQUAL
#define DRW_SHADER_FREE_SAFE(shader)
#define DRW_shgroup_call_obmat(shgroup, geom, obmat)
#define DRW_STATE_DEFAULT
#define DRW_VIEWPORT_DATA_SIZE(ty)
#define DRW_shgroup_call(shgroup, geom, ob)
struct Image * ED_space_image(const struct SpaceImage *sima)
void ED_space_image_get_size(struct SpaceImage *sima, int *r_width, int *r_height)
void ED_region_pixelspace(const struct ARegion *region)
void GPU_debug_group_end(void)
void GPU_debug_group_begin(const char *name)
struct GPUFrameBuffer GPUFrameBuffer
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
void GPU_matrix_pop(void)
void GPU_matrix_scale_2f(float x, float y)
void GPU_matrix_pop_projection(void)
#define GPU_matrix_set(x)
void GPU_matrix_push(void)
#define GPU_matrix_projection_set(x)
void GPU_matrix_translate_2f(float x, float y)
void GPU_matrix_push_projection(void)
struct GPUShader GPUShader
GPUShader * GPU_shader_create_from_info_name(const char *info_name)
struct GPUTexture GPUTexture
#define RE_USE_STEREO_VIEWPORT
GPUBatch * DRW_cache_quad_get(void)
GPUBatch * DRW_cache_particles_get_hair(Object *object, ParticleSystem *psys, ModifierData *md)
GPUBatch * DRW_cache_object_surface_get(Object *ob)
DefaultFramebufferList * DRW_viewport_framebuffer_list_get(void)
bool DRW_object_is_renderable(const Object *ob)
int DRW_object_visibility_in_active_context(const Object *ob)
bool DRW_object_is_visible_psys_in_active_context(const Object *object, const ParticleSystem *psys)
const DRWContextState * DRW_context_state_get(void)
void DRW_view_winmat_get(const DRWView *view, float mat[4][4], bool inverse)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
DRWPass * DRW_pass_create(const char *name, DRWState state)
void DRW_view_viewmat_get(const DRWView *view, float mat[4][4], bool inverse)
void DRW_draw_pass(DRWPass *pass)
const DRWView * DRW_view_get_active(void)
void DRW_state_reset(void)
void DRW_state_reset_ex(DRWState state)
void DRW_texture_ensure_fullscreen_2d(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
RenderEngine * RE_engine_create(RenderEngineType *type)
void RE_engine_draw_release(Render *re)
bool RE_engine_draw_acquire(Render *re)
struct RenderEngine * RE_engine_get(const Render *re)
static void external_cache_populate(void *vedata, Object *ob)
RenderEngineType DRW_engine_viewport_external_type
struct EXTERNAL_FramebufferList EXTERNAL_FramebufferList
struct EXTERNAL_StorageList EXTERNAL_StorageList
struct EXTERNAL_PassList EXTERNAL_PassList
struct EXTERNAL_Storage EXTERNAL_Storage
static struct @216 e_data
static void external_draw_scene(void *vedata)
bool DRW_engine_external_acquire_for_image_editor(void)
static void external_draw_scene_do_v3d(void *vedata)
char datatoc_common_view_lib_glsl[]
static void external_cache_image_add(DRWShadingGroup *grp)
char datatoc_basic_depth_vert_glsl[]
DrawEngineType draw_engine_external_type
static void external_engine_init(void *vedata)
static void external_cache_finish(void *UNUSED(vedata))
struct EXTERNAL_TextureList EXTERNAL_TextureList
struct GPUShader * depth_sh
char datatoc_basic_depth_frag_glsl[]
static void external_image_space_matrix_set(const RenderEngine *engine)
static void external_engine_free(void)
struct EXTERNAL_Data EXTERNAL_Data
struct EXTERNAL_PrivateData EXTERNAL_PrivateData
static const DrawEngineDataSize external_data_size
static void external_draw_scene_do_image(void *UNUSED(vedata))
static void external_draw_scene_do(void *vedata)
static void external_cache_init(void *vedata)
void GPU_framebuffer_blit(GPUFrameBuffer *gpufb_read, int read_slot, GPUFrameBuffer *gpufb_write, int write_slot, eGPUFrameBufferBits blit_buffers)
void RE_GetViewPlane(Render *re, rctf *r_viewplane, rcti *r_disprect)
void *(* MEM_mallocN)(size_t len, const char *str)
Render * RE_GetSceneRender(const Scene *scene)
struct SpaceLink * space_data
const struct bContext * evil_C
struct Depsgraph * depsgraph
struct RenderEngineType * engine_type
struct RegionView3D * rv3d
struct GPUFrameBuffer * depth_only_fb
struct GPUFrameBuffer * default_fb
EXTERNAL_FramebufferList * fbl
EXTERNAL_StorageList * stl
EXTERNAL_TextureList * txl
struct GPUFrameBuffer * depth_buffer_fb
struct DRWPass * depth_pass
DRWShadingGroup * depth_shgrp
struct EXTERNAL_PrivateData * g_data
struct EXTERNAL_Storage * storage
struct GPUTexture * depth_buffer_tx
struct RenderEngine * render_engine
void(* view_draw)(struct RenderEngine *engine, const struct bContext *context, struct Depsgraph *depsgraph)
void(* view_update)(struct RenderEngine *engine, const struct bContext *context, struct Depsgraph *depsgraph)
void(* draw)(struct RenderEngine *engine, const struct bContext *context, struct Depsgraph *depsgraph)