Blender  V3.3
Classes | Macros
draw_manager_data.c File Reference
#include "draw_manager.h"
#include "BKE_curve.h"
#include "BKE_duplilist.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_volume.h"
#include "DNA_curve_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "BLI_alloca.h"
#include "BLI_hash.h"
#include "BLI_link_utils.h"
#include "BLI_listbase.h"
#include "BLI_memblock.h"
#include "BLI_mempool.h"
#include "GPU_buffers.h"
#include "GPU_capabilities.h"
#include "GPU_material.h"
#include "GPU_uniform_buffer.h"
#include "intern/gpu_codegen.h"
#include "../../blenlib/intern/list_sort_impl.h"

Go to the source code of this file.

Classes

struct  DRWSculptCallbackData
 

Macros

#define KEY(a)   ((((size_t)((a).draw.batch)) >> 6) % ARRAY_SIZE(idx))
 

Functions

Uniform Buffer Object (DRW_uniformbuffer)
static void draw_call_sort (DRWCommand *array, DRWCommand *array_tmp, int array_len)
 
void drw_resource_buffer_finish (DRWData *vmempool)
 
Uniforms (DRW_shgroup_uniform)
static void drw_shgroup_uniform_create_ex (DRWShadingGroup *shgroup, int loc, DRWUniformType type, const void *value, eGPUSamplerState sampler_state, int length, int arraysize)
 
static void drw_shgroup_uniform (DRWShadingGroup *shgroup, const char *name, DRWUniformType type, const void *value, int length, int arraysize)
 
void DRW_shgroup_uniform_texture_ex (DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex, eGPUSamplerState sampler_state)
 
void DRW_shgroup_uniform_texture (DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex)
 
void DRW_shgroup_uniform_texture_ref_ex (DRWShadingGroup *shgroup, const char *name, GPUTexture **tex, eGPUSamplerState sampler_state)
 
void DRW_shgroup_uniform_texture_ref (DRWShadingGroup *shgroup, const char *name, GPUTexture **tex)
 
void DRW_shgroup_uniform_image (DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex)
 
void DRW_shgroup_uniform_image_ref (DRWShadingGroup *shgroup, const char *name, GPUTexture **tex)
 
void DRW_shgroup_uniform_block_ex (DRWShadingGroup *shgroup, const char *name, const GPUUniformBuf *ubo DRW_DEBUG_FILE_LINE_ARGS)
 
void DRW_shgroup_uniform_block_ref_ex (DRWShadingGroup *shgroup, const char *name, GPUUniformBuf **ubo DRW_DEBUG_FILE_LINE_ARGS)
 
void DRW_shgroup_storage_block_ex (DRWShadingGroup *shgroup, const char *name, const GPUStorageBuf *ssbo DRW_DEBUG_FILE_LINE_ARGS)
 
void DRW_shgroup_storage_block_ref_ex (DRWShadingGroup *shgroup, const char *name, GPUStorageBuf **ssbo DRW_DEBUG_FILE_LINE_ARGS)
 
void DRW_shgroup_uniform_bool (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize)
 
void DRW_shgroup_uniform_float (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
 
void DRW_shgroup_uniform_vec2 (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
 
void DRW_shgroup_uniform_vec3 (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
 
void DRW_shgroup_uniform_vec4 (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
 
void DRW_shgroup_uniform_int (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize)
 
void DRW_shgroup_uniform_ivec2 (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize)
 
void DRW_shgroup_uniform_ivec3 (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize)
 
void DRW_shgroup_uniform_ivec4 (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize)
 
void DRW_shgroup_uniform_mat3 (DRWShadingGroup *shgroup, const char *name, const float(*value)[3])
 
void DRW_shgroup_uniform_mat4 (DRWShadingGroup *shgroup, const char *name, const float(*value)[4])
 
void DRW_shgroup_uniform_int_copy (DRWShadingGroup *shgroup, const char *name, const int value)
 
void DRW_shgroup_uniform_ivec2_copy (DRWShadingGroup *shgroup, const char *name, const int *value)
 
void DRW_shgroup_uniform_ivec3_copy (DRWShadingGroup *shgroup, const char *name, const int *value)
 
void DRW_shgroup_uniform_ivec4_copy (DRWShadingGroup *shgroup, const char *name, const int *value)
 
void DRW_shgroup_uniform_bool_copy (DRWShadingGroup *shgroup, const char *name, const bool value)
 
void DRW_shgroup_uniform_float_copy (DRWShadingGroup *shgroup, const char *name, const float value)
 
void DRW_shgroup_uniform_vec2_copy (DRWShadingGroup *shgroup, const char *name, const float *value)
 
void DRW_shgroup_uniform_vec3_copy (DRWShadingGroup *shgroup, const char *name, const float *value)
 
void DRW_shgroup_uniform_vec4_copy (DRWShadingGroup *shgroup, const char *name, const float *value)
 
void DRW_shgroup_uniform_mat4_copy (DRWShadingGroup *shgroup, const char *name, const float(*value)[4])
 
void DRW_shgroup_vertex_buffer_ex (DRWShadingGroup *shgroup, const char *name, GPUVertBuf *vertex_buffer DRW_DEBUG_FILE_LINE_ARGS)
 
void DRW_shgroup_vertex_buffer_ref_ex (DRWShadingGroup *shgroup, const char *name, GPUVertBuf **vertex_buffer DRW_DEBUG_FILE_LINE_ARGS)
 
void DRW_shgroup_buffer_texture (DRWShadingGroup *shgroup, const char *name, GPUVertBuf *vertex_buffer)
 
void DRW_shgroup_buffer_texture_ref (DRWShadingGroup *shgroup, const char *name, GPUVertBuf **vertex_buffer)
 
Shading Groups (DRW_shgroup)
static void drw_shgroup_init (DRWShadingGroup *shgroup, GPUShader *shader)
 
static DRWShadingGroupdrw_shgroup_create_ex (struct GPUShader *shader, DRWPass *pass)
 
static DRWShadingGroupdrw_shgroup_material_create_ex (GPUPass *gpupass, DRWPass *pass)
 
static void drw_shgroup_material_texture (DRWShadingGroup *grp, GPUTexture *gputex, const char *name, eGPUSamplerState state)
 
void DRW_shgroup_add_material_resources (DRWShadingGroup *grp, struct GPUMaterial *material)
 
GPUVertFormatDRW_shgroup_instance_format_array (const DRWInstanceAttrFormat attrs[], int arraysize)
 
DRWShadingGroupDRW_shgroup_material_create (struct GPUMaterial *material, DRWPass *pass)
 
DRWShadingGroupDRW_shgroup_create (struct GPUShader *shader, DRWPass *pass)
 
DRWShadingGroupDRW_shgroup_transform_feedback_create (struct GPUShader *shader, DRWPass *pass, GPUVertBuf *tf_target)
 
void DRW_shgroup_state_enable (DRWShadingGroup *shgroup, DRWState state)
 
void DRW_shgroup_state_disable (DRWShadingGroup *shgroup, DRWState state)
 
void DRW_shgroup_stencil_set (DRWShadingGroup *shgroup, uint write_mask, uint reference, uint compare_mask)
 
void DRW_shgroup_stencil_mask (DRWShadingGroup *shgroup, uint mask)
 
void DRW_shgroup_clear_framebuffer (DRWShadingGroup *shgroup, eGPUFrameBufferBits channels, uchar r, uchar g, uchar b, uchar a, float depth, uchar stencil)
 
bool DRW_shgroup_is_empty (DRWShadingGroup *shgroup)
 
DRWShadingGroupDRW_shgroup_create_sub (DRWShadingGroup *shgroup)
 
View (DRW_view)
static void draw_frustum_boundbox_calc (const float(*viewinv)[4], const float(*projmat)[4], BoundBox *r_bbox)
 
static void draw_frustum_culling_planes_calc (const float(*persmat)[4], float(*frustum_planes)[4])
 
static void draw_frustum_bound_sphere_calc (const BoundBox *bbox, const float(*viewinv)[4], const float(*projmat)[4], const float(*projinv)[4], BoundSphere *bsphere)
 
static void draw_view_matrix_state_update (ViewInfos *storage, const float viewmat[4][4], const float winmat[4][4])
 
DRWViewDRW_view_create (const float viewmat[4][4], const float winmat[4][4], const float(*culling_viewmat)[4], const float(*culling_winmat)[4], DRWCallVisibilityFn *visibility_fn)
 
DRWViewDRW_view_create_sub (const DRWView *parent_view, const float viewmat[4][4], const float winmat[4][4])
 
void DRW_view_update_sub (DRWView *view, const float viewmat[4][4], const float winmat[4][4])
 
void DRW_view_update (DRWView *view, const float viewmat[4][4], const float winmat[4][4], const float(*culling_viewmat)[4], const float(*culling_winmat)[4])
 
const DRWViewDRW_view_default_get (void)
 
void DRW_view_reset (void)
 
void DRW_view_default_set (const DRWView *view)
 
void DRW_view_clip_planes_set (DRWView *view, float(*planes)[4], int plane_len)
 
void DRW_view_camtexco_set (DRWView *view, float texco[4])
 
void DRW_view_camtexco_get (const DRWView *view, float r_texco[4])
 
void DRW_view_frustum_corners_get (const DRWView *view, BoundBox *corners)
 
void DRW_view_frustum_planes_get (const DRWView *view, float planes[6][4])
 
bool DRW_view_is_persp_get (const DRWView *view)
 
float DRW_view_near_distance_get (const DRWView *view)
 
float DRW_view_far_distance_get (const DRWView *view)
 
void DRW_view_viewmat_get (const DRWView *view, float mat[4][4], bool inverse)
 
void DRW_view_winmat_get (const DRWView *view, float mat[4][4], bool inverse)
 
void DRW_view_persmat_get (const DRWView *view, float mat[4][4], bool inverse)
 

Draw Call (DRW_calls)

#define SCULPT_DEBUG_BUFFERS   (G.debug_value == 889)
 
#define SCULPT_DEBUG_COLOR(id)   (sculpt_debug_colors[id % 9])
 
typedef struct DRWSculptCallbackData DRWSculptCallbackData
 
static float sculpt_debug_colors [9][4]
 
static GPUVertFormat inst_select_format = {0}
 
static void drw_call_calc_orco (Object *ob, float(*r_orcofacs)[4])
 
BLI_INLINE void drw_call_matrix_init (DRWObjectMatrix *ob_mats, Object *ob, float(*obmat)[4])
 
static void drw_call_obinfos_init (DRWObjectInfos *ob_infos, Object *ob)
 
static void drw_call_culling_init (DRWCullingState *cull, Object *ob)
 
static DRWResourceHandle drw_resource_handle_new (float(*obmat)[4], Object *ob)
 
uint32_t DRW_object_resource_id_get (Object *UNUSED(ob))
 
static DRWResourceHandle drw_resource_handle (DRWShadingGroup *shgroup, float(*obmat)[4], Object *ob)
 
static void command_type_set (uint64_t *command_type_bits, int index, eDRWCommandType type)
 
eDRWCommandType command_type_get (const uint64_t *command_type_bits, int index)
 
static voiddrw_command_create (DRWShadingGroup *shgroup, eDRWCommandType type)
 
static void drw_command_draw (DRWShadingGroup *shgroup, GPUBatch *batch, DRWResourceHandle handle)
 
static void drw_command_draw_range (DRWShadingGroup *shgroup, GPUBatch *batch, DRWResourceHandle handle, uint start, uint count)
 
static void drw_command_draw_instance (DRWShadingGroup *shgroup, GPUBatch *batch, DRWResourceHandle handle, uint count, bool use_attr)
 
static void drw_command_draw_intance_range (DRWShadingGroup *shgroup, GPUBatch *batch, DRWResourceHandle handle, uint start, uint count)
 
static void drw_command_compute (DRWShadingGroup *shgroup, int groups_x_len, int groups_y_len, int groups_z_len)
 
static void drw_command_compute_ref (DRWShadingGroup *shgroup, int groups_ref[3])
 
static void drw_command_compute_indirect (DRWShadingGroup *shgroup, GPUStorageBuf *indirect_buf)
 
static void drw_command_barrier (DRWShadingGroup *shgroup, eGPUBarrier type)
 
static void drw_command_draw_procedural (DRWShadingGroup *shgroup, GPUBatch *batch, DRWResourceHandle handle, uint vert_count)
 
static void drw_command_set_select_id (DRWShadingGroup *shgroup, GPUVertBuf *buf, uint select_id)
 
static void drw_command_set_stencil_mask (DRWShadingGroup *shgroup, uint write_mask, uint reference, uint compare_mask)
 
static void drw_command_clear (DRWShadingGroup *shgroup, eGPUFrameBufferBits channels, uchar r, uchar g, uchar b, uchar a, float depth, uchar stencil)
 
static void drw_command_set_mutable_state (DRWShadingGroup *shgroup, DRWState enable, DRWState disable)
 
void DRW_shgroup_call_ex (DRWShadingGroup *shgroup, Object *ob, float(*obmat)[4], struct GPUBatch *geom, bool bypass_culling, void *user_data)
 
void DRW_shgroup_call_range (DRWShadingGroup *shgroup, struct Object *ob, GPUBatch *geom, uint v_sta, uint v_num)
 
void DRW_shgroup_call_instance_range (DRWShadingGroup *shgroup, Object *ob, struct GPUBatch *geom, uint i_sta, uint i_num)
 
void DRW_shgroup_call_compute (DRWShadingGroup *shgroup, int groups_x_len, int groups_y_len, int groups_z_len)
 
void DRW_shgroup_call_compute_ref (DRWShadingGroup *shgroup, int groups_ref[3])
 
void DRW_shgroup_call_compute_indirect (DRWShadingGroup *shgroup, GPUStorageBuf *indirect_buf)
 
void DRW_shgroup_barrier (DRWShadingGroup *shgroup, eGPUBarrier type)
 
static void drw_shgroup_call_procedural_add_ex (DRWShadingGroup *shgroup, GPUBatch *geom, Object *ob, uint vert_count)
 
void DRW_shgroup_call_procedural_points (DRWShadingGroup *shgroup, Object *ob, uint point_count)
 
void DRW_shgroup_call_procedural_lines (DRWShadingGroup *shgroup, Object *ob, uint line_count)
 
void DRW_shgroup_call_procedural_triangles (DRWShadingGroup *shgroup, Object *ob, uint tri_count)
 
void DRW_shgroup_call_instances (DRWShadingGroup *shgroup, Object *ob, struct GPUBatch *geom, uint count)
 
void DRW_shgroup_call_instances_with_attrs (DRWShadingGroup *shgroup, Object *ob, struct GPUBatch *geom, struct GPUBatch *inst_attributes)
 
static void sculpt_draw_cb (DRWSculptCallbackData *scd, GPU_PBVH_Buffers *buffers)
 
static void sculpt_debug_cb (void *user_data, const float bmin[3], const float bmax[3], PBVHNodeFlags flag)
 
static void drw_sculpt_get_frustum_planes (Object *ob, float planes[6][4])
 
static void drw_sculpt_generate_calls (DRWSculptCallbackData *scd)
 
void DRW_shgroup_call_sculpt (DRWShadingGroup *shgroup, Object *ob, bool use_wire, bool use_mask)
 
void DRW_shgroup_call_sculpt_with_materials (DRWShadingGroup **shgroups, int num_shgroups, Object *ob)
 
DRWCallBufferDRW_shgroup_call_buffer (DRWShadingGroup *shgroup, struct GPUVertFormat *format, GPUPrimType prim_type)
 
DRWCallBufferDRW_shgroup_call_buffer_instance (DRWShadingGroup *shgroup, struct GPUVertFormat *format, GPUBatch *geom)
 
void DRW_buffer_add_entry_struct (DRWCallBuffer *callbuf, const void *data)
 
void DRW_buffer_add_entry_array (DRWCallBuffer *callbuf, const void *attr[], uint attr_len)
 

Passes (DRW_pass)

#define SORT_IMPL_LINKTYPE   DRWShadingGroup
 
#define SORT_IMPL_FUNC   shgroup_sort_fn_r
 
DRWPassDRW_pass_create (const char *name, DRWState state)
 
DRWPassDRW_pass_create_instance (const char *name, DRWPass *original, DRWState state)
 
void DRW_pass_link (DRWPass *first, DRWPass *second)
 
bool DRW_pass_is_empty (DRWPass *pass)
 
void DRW_pass_foreach_shgroup (DRWPass *pass, void(*callback)(void *userData, DRWShadingGroup *shgrp), void *userData)
 
static int pass_shgroup_dist_sort (const void *a, const void *b)
 
void DRW_pass_sort_shgroup_z (DRWPass *pass)
 
void DRW_pass_sort_shgroup_reverse (DRWPass *pass)
 

Macro Definition Documentation

◆ KEY

#define KEY (   a)    ((((size_t)((a).draw.batch)) >> 6) % ARRAY_SIZE(idx))

◆ SCULPT_DEBUG_BUFFERS

#define SCULPT_DEBUG_BUFFERS   (G.debug_value == 889)

Definition at line 1076 of file draw_manager_data.c.

◆ SCULPT_DEBUG_COLOR

#define SCULPT_DEBUG_COLOR (   id)    (sculpt_debug_colors[id % 9])

Definition at line 1090 of file draw_manager_data.c.

◆ SORT_IMPL_FUNC

#define SORT_IMPL_FUNC   shgroup_sort_fn_r

Definition at line 2238 of file draw_manager_data.c.

◆ SORT_IMPL_LINKTYPE

#define SORT_IMPL_LINKTYPE   DRWShadingGroup

Definition at line 2236 of file draw_manager_data.c.

Typedef Documentation

◆ DRWSculptCallbackData

Function Documentation

◆ command_type_get()

eDRWCommandType command_type_get ( const uint64_t command_type_bits,
int  index 
)

◆ command_type_set()

static void command_type_set ( uint64_t command_type_bits,
int  index,
eDRWCommandType  type 
)
static

Definition at line 769 of file draw_manager_data.c.

References type.

Referenced by drw_command_create().

◆ draw_call_sort()

static void draw_call_sort ( DRWCommand array,
DRWCommand array_tmp,
int  array_len 
)
static

Definition at line 46 of file draw_manager_data.c.

References ARRAY_SIZE, BLI_assert, KEY, and src.

Referenced by drw_resource_buffer_finish().

◆ draw_frustum_bound_sphere_calc()

static void draw_frustum_bound_sphere_calc ( const BoundBox bbox,
const float(*)  viewinv[4],
const float(*)  projmat[4],
const float(*)  projinv[4],
BoundSphere bsphere 
)
static

◆ draw_frustum_boundbox_calc()

static void draw_frustum_boundbox_calc ( const float(*)  viewinv[4],
const float(*)  projmat[4],
BoundBox r_bbox 
)
static

◆ draw_frustum_culling_planes_calc()

static void draw_frustum_culling_planes_calc ( const float(*)  persmat[4],
float(*)  frustum_planes[4] 
)
static

Definition at line 1733 of file draw_manager_data.c.

References normalize_v3(), and planes_from_projmat().

Referenced by DRW_view_update().

◆ draw_view_matrix_state_update()

static void draw_view_matrix_state_update ( ViewInfos storage,
const float  viewmat[4][4],
const float  winmat[4][4] 
)
static

If ortho : view_vecs[0] is the near-bottom-left corner of the frustum and view_vecs[1] is the vector going from the near-bottom-left corner to the far-top-right corner. If Persp : view_vecs[0].xy and view_vecs[1].xy are respectively the bottom-left corner when Z = 1, and top-left corner if Z = 1. view_vecs[0].z the near clip distance and view_vecs[1].z is the (signed) distance from the near plane to the far clip plane.

Definition at line 1864 of file draw_manager_data.c.

References copy_m4_m4(), copy_v3_v3(), invert_m4_m4(), mul_m4_m4m4(), mul_project_m4_v3(), mul_v2_fl(), ViewInfos::persinv, ViewInfos::persmat, ViewInfos::viewinv, ViewInfos::viewmat, ViewInfos::viewvecs, ViewInfos::wininv, and ViewInfos::winmat.

Referenced by DRW_view_update(), and DRW_view_update_sub().

◆ DRW_buffer_add_entry_array()

void DRW_buffer_add_entry_array ( DRWCallBuffer callbuf,
const void attr[],
uint  attr_len 
)

◆ DRW_buffer_add_entry_struct()

void DRW_buffer_add_entry_struct ( DRWCallBuffer callbuf,
const void data 
)

◆ drw_call_calc_orco()

static void drw_call_calc_orco ( Object ob,
float(*)  r_orcofacs[4] 
)
static

◆ drw_call_culling_init()

static void drw_call_culling_init ( DRWCullingState cull,
Object ob 
)
static

◆ drw_call_matrix_init()

BLI_INLINE void drw_call_matrix_init ( DRWObjectMatrix ob_mats,
Object ob,
float(*)  obmat[4] 
)

◆ drw_call_obinfos_init()

static void drw_call_obinfos_init ( DRWObjectInfos ob_infos,
Object ob 
)
static

◆ drw_command_barrier()

static void drw_command_barrier ( DRWShadingGroup shgroup,
eGPUBarrier  type 
)
static

Definition at line 864 of file draw_manager_data.c.

References DRW_CMD_BARRIER, drw_command_create(), DRWCommandBarrier::type, and type.

Referenced by DRW_shgroup_barrier().

◆ drw_command_clear()

static void drw_command_clear ( DRWShadingGroup shgroup,
eGPUFrameBufferBits  channels,
uchar  r,
uchar  g,
uchar  b,
uchar  a,
float  depth,
uchar  stencil 
)
static

◆ drw_command_compute()

static void drw_command_compute ( DRWShadingGroup shgroup,
int  groups_x_len,
int  groups_y_len,
int  groups_z_len 
)
static

◆ drw_command_compute_indirect()

static void drw_command_compute_indirect ( DRWShadingGroup shgroup,
GPUStorageBuf indirect_buf 
)
static

◆ drw_command_compute_ref()

static void drw_command_compute_ref ( DRWShadingGroup shgroup,
int  groups_ref[3] 
)
static

◆ drw_command_create()

static void* drw_command_create ( DRWShadingGroup shgroup,
eDRWCommandType  type 
)
static

◆ drw_command_draw()

static void drw_command_draw ( DRWShadingGroup shgroup,
GPUBatch batch,
DRWResourceHandle  handle 
)
static

◆ drw_command_draw_instance()

static void drw_command_draw_instance ( DRWShadingGroup shgroup,
GPUBatch batch,
DRWResourceHandle  handle,
uint  count,
bool  use_attr 
)
static

◆ drw_command_draw_intance_range()

static void drw_command_draw_intance_range ( DRWShadingGroup shgroup,
GPUBatch batch,
DRWResourceHandle  handle,
uint  start,
uint  count 
)
static

◆ drw_command_draw_procedural()

static void drw_command_draw_procedural ( DRWShadingGroup shgroup,
GPUBatch batch,
DRWResourceHandle  handle,
uint  vert_count 
)
static

◆ drw_command_draw_range()

static void drw_command_draw_range ( DRWShadingGroup shgroup,
GPUBatch batch,
DRWResourceHandle  handle,
uint  start,
uint  count 
)
static

◆ drw_command_set_mutable_state()

static void drw_command_set_mutable_state ( DRWShadingGroup shgroup,
DRWState  enable,
DRWState  disable 
)
static

◆ drw_command_set_select_id()

static void drw_command_set_select_id ( DRWShadingGroup shgroup,
GPUVertBuf buf,
uint  select_id 
)
static

◆ drw_command_set_stencil_mask()

static void drw_command_set_stencil_mask ( DRWShadingGroup shgroup,
uint  write_mask,
uint  reference,
uint  compare_mask 
)
static

◆ DRW_object_resource_id_get()

uint32_t DRW_object_resource_id_get ( Object UNUSEDob)

◆ DRW_pass_create()

DRWPass* DRW_pass_create ( const char *  name,
DRWState  state 
)

◆ DRW_pass_create_instance()

DRWPass* DRW_pass_create_instance ( const char *  name,
DRWPass original,
DRWState  state 
)

Create an instance of the original pass that will execute the same drawcalls but with its own DRWState.

Definition at line 2176 of file draw_manager_data.c.

References DRW_pass_create(), DRWPass::original, and state.

Referenced by EEVEE_materials_cache_init().

◆ DRW_pass_foreach_shgroup()

void DRW_pass_foreach_shgroup ( DRWPass pass,
void(*)(void *userData, DRWShadingGroup *shgrp)  callback,
void userData 
)

Definition at line 2205 of file draw_manager_data.c.

References callback, LISTBASE_FOREACH, and DRWPass::shgroups.

◆ DRW_pass_is_empty()

bool DRW_pass_is_empty ( DRWPass pass)

◆ DRW_pass_link()

void DRW_pass_link ( DRWPass first,
DRWPass second 
)

Link two passes so that they are both rendered if the first one is being drawn.

Definition at line 2184 of file draw_manager_data.c.

References BLI_assert, DRWPass::next, and NULL.

Referenced by EEVEE_materials_cache_init(), EEVEE_motion_blur_cache_init(), and blender::eevee::ForwardPipeline::sync().

◆ DRW_pass_sort_shgroup_reverse()

void DRW_pass_sort_shgroup_reverse ( DRWPass pass)

Reverse Shading group submission order.

Definition at line 2294 of file draw_manager_data.c.

References BLI_linklist_reverse(), DRWPass::first, DRWPass::last, and DRWPass::shgroups.

◆ DRW_pass_sort_shgroup_z()

void DRW_pass_sort_shgroup_z ( DRWPass pass)

◆ drw_resource_buffer_finish()

void drw_resource_buffer_finish ( DRWData vmempool)

◆ drw_resource_handle()

static DRWResourceHandle drw_resource_handle ( DRWShadingGroup shgroup,
float(*)  obmat[4],
Object ob 
)
static

◆ drw_resource_handle_new()

static DRWResourceHandle drw_resource_handle_new ( float(*)  obmat[4],
Object ob 
)
static

◆ drw_sculpt_generate_calls()

static void drw_sculpt_generate_calls ( DRWSculptCallbackData scd)
static

◆ drw_sculpt_get_frustum_planes()

static void drw_sculpt_get_frustum_planes ( Object ob,
float  planes[6][4] 
)
static

◆ DRW_shgroup_add_material_resources()

void DRW_shgroup_add_material_resources ( DRWShadingGroup grp,
struct GPUMaterial material 
)

◆ DRW_shgroup_barrier()

void DRW_shgroup_barrier ( DRWShadingGroup shgroup,
eGPUBarrier  type 
)

Issue a barrier command.

Definition at line 1008 of file draw_manager_data.c.

References BLI_assert, drw_command_barrier(), GPU_compute_shader_support(), and type.

Referenced by blender::eevee::Film::sync(), and blender::eevee::WorldPipeline::sync().

◆ DRW_shgroup_buffer_texture()

void DRW_shgroup_buffer_texture ( DRWShadingGroup shgroup,
const char *  name,
GPUVertBuf vertex_buffer 
)

◆ DRW_shgroup_buffer_texture_ref()

void DRW_shgroup_buffer_texture_ref ( DRWShadingGroup shgroup,
const char *  name,
GPUVertBuf **  vertex_buffer 
)

◆ DRW_shgroup_call_buffer()

DRWCallBuffer* DRW_shgroup_call_buffer ( DRWShadingGroup shgroup,
struct GPUVertFormat format,
GPUPrimType  prim_type 
)

◆ DRW_shgroup_call_buffer_instance()

DRWCallBuffer* DRW_shgroup_call_buffer_instance ( DRWShadingGroup shgroup,
struct GPUVertFormat format,
GPUBatch geom 
)

◆ DRW_shgroup_call_compute()

void DRW_shgroup_call_compute ( DRWShadingGroup shgroup,
int  groups_x_len,
int  groups_y_len,
int  groups_z_len 
)

◆ DRW_shgroup_call_compute_indirect()

void DRW_shgroup_call_compute_indirect ( DRWShadingGroup shgroup,
GPUStorageBuf indirect_buf 
)
Note
No need for a barrier. indirect_buf is internally synchronized.

Definition at line 1002 of file draw_manager_data.c.

References BLI_assert, drw_command_compute_indirect(), and GPU_compute_shader_support().

◆ DRW_shgroup_call_compute_ref()

void DRW_shgroup_call_compute_ref ( DRWShadingGroup shgroup,
int  groups_ref[3] 
)
Warning
this keeps the ref to groups_ref until it actually dispatch.

Definition at line 995 of file draw_manager_data.c.

References BLI_assert, drw_command_compute_ref(), and GPU_compute_shader_support().

◆ DRW_shgroup_call_ex()

void DRW_shgroup_call_ex ( DRWShadingGroup shgroup,
Object ob,
float(*)  obmat[4],
struct GPUBatch geom,
bool  bypass_culling,
void user_data 
)

◆ DRW_shgroup_call_instance_range()

void DRW_shgroup_call_instance_range ( DRWShadingGroup shgroup,
Object ob,
struct GPUBatch geom,
uint  i_sta,
uint  i_num 
)

◆ DRW_shgroup_call_instances()

void DRW_shgroup_call_instances ( DRWShadingGroup shgroup,
Object ob,
struct GPUBatch geom,
uint  count 
)
Warning
Only use with Shaders that have IN_PLACE_INSTANCES defined. TODO: Should be removed.

Definition at line 1047 of file draw_manager_data.c.

References BLI_assert, count, drw_command_draw_instance(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, NULL, Object::obmat, and DRWManager::select_id.

Referenced by EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), and OVERLAY_edit_curve_cache_populate().

◆ DRW_shgroup_call_instances_with_attrs()

void DRW_shgroup_call_instances_with_attrs ( DRWShadingGroup shgroup,
Object ob,
struct GPUBatch geom,
struct GPUBatch inst_attributes 
)

◆ drw_shgroup_call_procedural_add_ex()

static void drw_shgroup_call_procedural_add_ex ( DRWShadingGroup shgroup,
GPUBatch geom,
Object ob,
uint  vert_count 
)
static

◆ DRW_shgroup_call_procedural_lines()

void DRW_shgroup_call_procedural_lines ( DRWShadingGroup shgroup,
Object ob,
uint  line_count 
)

◆ DRW_shgroup_call_procedural_points()

void DRW_shgroup_call_procedural_points ( DRWShadingGroup shgroup,
Object ob,
uint  point_count 
)

◆ DRW_shgroup_call_procedural_triangles()

void DRW_shgroup_call_procedural_triangles ( DRWShadingGroup shgroup,
Object ob,
uint  tri_count 
)

◆ DRW_shgroup_call_range()

void DRW_shgroup_call_range ( DRWShadingGroup shgroup,
struct Object ob,
GPUBatch geom,
uint  v_sta,
uint  v_num 
)

◆ DRW_shgroup_call_sculpt()

void DRW_shgroup_call_sculpt ( DRWShadingGroup shgroup,
Object ob,
bool  use_wire,
bool  use_mask 
)

◆ DRW_shgroup_call_sculpt_with_materials()

void DRW_shgroup_call_sculpt_with_materials ( DRWShadingGroup **  shgroups,
int  num_shgroups,
Object ob 
)

◆ DRW_shgroup_clear_framebuffer()

void DRW_shgroup_clear_framebuffer ( DRWShadingGroup shgroup,
eGPUFrameBufferBits  channels,
uchar  r,
uchar  g,
uchar  b,
uchar  a,
float  depth,
uchar  stencil 
)

◆ DRW_shgroup_create()

DRWShadingGroup* DRW_shgroup_create ( struct GPUShader shader,
DRWPass pass 
)

Definition at line 1594 of file draw_manager_data.c.

References drw_shgroup_create_ex(), and drw_shgroup_init().

Referenced by basic_cache_init(), dof_bokeh_pass_init(), dof_dilate_tiles_pass_init(), dof_filter_pass_init(), dof_flatten_tiles_pass_init(), dof_gather_pass_init(), dof_recombine_pass_init(), dof_reduce_pass_init(), dof_scatter_pass_init(), dof_setup_pass_init(), drw_curves_cache_update_compute(), drw_curves_cache_update_transform_feedback(), drw_hair_particle_cache_update_compute(), drw_hair_particle_cache_update_transform_feedback(), eevee_create_bloom_pass(), eevee_cryptomatte_shading_group_create(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_finish(), EEVEE_lightprobes_cache_init(), EEVEE_lookdev_cache_init(), eevee_lookdev_hdri_preview_init(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), EEVEE_materials_cache_init(), EEVEE_mist_output_init(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_cache_populate(), EEVEE_occlusion_cache_init(), EEVEE_occlusion_output_init(), EEVEE_renderpasses_cache_finish(), EEVEE_screen_raytrace_cache_init(), EEVEE_shadow_output_init(), EEVEE_shadows_cache_init(), EEVEE_subsurface_add_pass(), EEVEE_temporal_sampling_cache_init(), EEVEE_volumes_cache_finish(), EEVEE_volumes_cache_init(), EEVEE_volumes_cache_object_add(), EEVEE_volumes_output_init(), external_cache_init(), GPENCIL_antialiasing_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_pass_create(), material_opaque(), material_shadow(), material_transparent(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_curves_cache_init(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_lattice_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_particle_cache_init(), OVERLAY_edit_text_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_facing_cache_init(), OVERLAY_fade_cache_init(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_metaball_cache_init(), OVERLAY_mode_transfer_cache_populate(), OVERLAY_motion_path_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_init(), OVERLAY_sculpt_cache_init(), OVERLAY_sculpt_curves_cache_init(), OVERLAY_volume_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), select_cache_init(), select_debug_engine_init(), blender::eevee::Film::sync(), workbench_antialiasing_cache_init(), workbench_cavity_cache_init(), workbench_dof_cache_init(), workbench_opaque_cache_init(), workbench_outline_cache_init(), workbench_shadow_cache_init(), workbench_transparent_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().

◆ drw_shgroup_create_ex()

static DRWShadingGroup* drw_shgroup_create_ex ( struct GPUShader shader,
DRWPass pass 
)
static

◆ DRW_shgroup_create_sub()

DRWShadingGroup* DRW_shgroup_create_sub ( DRWShadingGroup shgroup)

◆ drw_shgroup_init()

static void drw_shgroup_init ( DRWShadingGroup shgroup,
GPUShader shader 
)
static

◆ DRW_shgroup_instance_format_array()

GPUVertFormat* DRW_shgroup_instance_format_array ( const DRWInstanceAttrFormat  attrs[],
int  arraysize 
)

◆ DRW_shgroup_is_empty()

bool DRW_shgroup_is_empty ( DRWShadingGroup shgroup)

◆ DRW_shgroup_material_create()

DRWShadingGroup* DRW_shgroup_material_create ( struct GPUMaterial material,
DRWPass pass 
)

◆ drw_shgroup_material_create_ex()

static DRWShadingGroup* drw_shgroup_material_create_ex ( GPUPass gpupass,
DRWPass pass 
)
static

Definition at line 1497 of file draw_manager_data.c.

References drw_shgroup_create_ex(), GPU_pass_shader_get(), NULL, and sh.

Referenced by DRW_shgroup_material_create().

◆ drw_shgroup_material_texture()

static void drw_shgroup_material_texture ( DRWShadingGroup grp,
GPUTexture gputex,
const char *  name,
eGPUSamplerState  state 
)
static

◆ DRW_shgroup_state_disable()

void DRW_shgroup_state_disable ( DRWShadingGroup shgroup,
DRWState  state 
)

◆ DRW_shgroup_state_enable()

void DRW_shgroup_state_enable ( DRWShadingGroup shgroup,
DRWState  state 
)

◆ DRW_shgroup_stencil_mask()

void DRW_shgroup_stencil_mask ( DRWShadingGroup shgroup,
uint  mask 
)

TODO: remove this function. Obsolete version. mask is actually reference value.

Definition at line 1630 of file draw_manager_data.c.

References drw_command_set_stencil_mask(), and mask().

Referenced by EEVEE_subsurface_add_pass(), gpencil_layer_cache_add(), workbench_opaque_cache_init(), and workbench_shadow_cache_init().

◆ DRW_shgroup_stencil_set()

void DRW_shgroup_stencil_set ( DRWShadingGroup shgroup,
uint  write_mask,
uint  reference,
uint  compare_mask 
)

Reminders:

  • (compare_mask & reference) is what is tested against (compare_mask & stencil_value) stencil_value being the value stored in the stencil buffer.
  • (write-mask & reference) is what gets written if the test condition is fulfilled.

Definition at line 1622 of file draw_manager_data.c.

References drw_command_set_stencil_mask().

◆ DRW_shgroup_storage_block_ex()

void DRW_shgroup_storage_block_ex ( DRWShadingGroup shgroup,
const char *  name,
const GPUStorageBuf *ssbo  DRW_DEBUG_FILE_LINE_ARGS 
)

◆ DRW_shgroup_storage_block_ref_ex()

void DRW_shgroup_storage_block_ref_ex ( DRWShadingGroup shgroup,
const char *  name,
GPUStorageBuf **ssbo  DRW_DEBUG_FILE_LINE_ARGS 
)

◆ DRW_shgroup_transform_feedback_create()

DRWShadingGroup* DRW_shgroup_transform_feedback_create ( struct GPUShader shader,
DRWPass pass,
GPUVertBuf tf_target 
)

◆ drw_shgroup_uniform()

static void drw_shgroup_uniform ( DRWShadingGroup shgroup,
const char *  name,
DRWUniformType  type,
const void value,
int  length,
int  arraysize 
)
static

◆ DRW_shgroup_uniform_block_ex()

void DRW_shgroup_uniform_block_ex ( DRWShadingGroup shgroup,
const char *  name,
const GPUUniformBuf *ubo  DRW_DEBUG_FILE_LINE_ARGS 
)

◆ DRW_shgroup_uniform_block_ref_ex()

void DRW_shgroup_uniform_block_ref_ex ( DRWShadingGroup shgroup,
const char *  name,
GPUUniformBuf **ubo  DRW_DEBUG_FILE_LINE_ARGS 
)

◆ DRW_shgroup_uniform_bool()

void DRW_shgroup_uniform_bool ( DRWShadingGroup shgroup,
const char *  name,
const int *  value,
int  arraysize 
)

◆ DRW_shgroup_uniform_bool_copy()

void DRW_shgroup_uniform_bool_copy ( DRWShadingGroup shgroup,
const char *  name,
const bool  value 
)

◆ drw_shgroup_uniform_create_ex()

static void drw_shgroup_uniform_create_ex ( DRWShadingGroup shgroup,
int  loc,
DRWUniformType  type,
const void value,
eGPUSamplerState  sampler_state,
int  length,
int  arraysize 
)
static

◆ DRW_shgroup_uniform_float()

void DRW_shgroup_uniform_float ( DRWShadingGroup shgroup,
const char *  name,
const float value,
int  arraysize 
)

◆ DRW_shgroup_uniform_float_copy()

void DRW_shgroup_uniform_float_copy ( DRWShadingGroup shgroup,
const char *  name,
const float  value 
)

◆ DRW_shgroup_uniform_image()

void DRW_shgroup_uniform_image ( DRWShadingGroup shgroup,
const char *  name,
const GPUTexture tex 
)

◆ DRW_shgroup_uniform_image_ref()

void DRW_shgroup_uniform_image_ref ( DRWShadingGroup shgroup,
const char *  name,
GPUTexture **  tex 
)

◆ DRW_shgroup_uniform_int()

void DRW_shgroup_uniform_int ( DRWShadingGroup shgroup,
const char *  name,
const int *  value,
int  arraysize 
)

◆ DRW_shgroup_uniform_int_copy()

void DRW_shgroup_uniform_int_copy ( DRWShadingGroup shgroup,
const char *  name,
const int  value 
)

◆ DRW_shgroup_uniform_ivec2()

void DRW_shgroup_uniform_ivec2 ( DRWShadingGroup shgroup,
const char *  name,
const int *  value,
int  arraysize 
)

Definition at line 409 of file draw_manager_data.c.

References drw_shgroup_uniform(), and DRW_UNIFORM_INT.

◆ DRW_shgroup_uniform_ivec2_copy()

void DRW_shgroup_uniform_ivec2_copy ( DRWShadingGroup shgroup,
const char *  name,
const int *  value 
)

Definition at line 448 of file draw_manager_data.c.

References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.

Referenced by EEVEE_motion_blur_cache_init().

◆ DRW_shgroup_uniform_ivec3()

void DRW_shgroup_uniform_ivec3 ( DRWShadingGroup shgroup,
const char *  name,
const int *  value,
int  arraysize 
)

Definition at line 417 of file draw_manager_data.c.

References drw_shgroup_uniform(), and DRW_UNIFORM_INT.

Referenced by EEVEE_lightprobes_cache_init().

◆ DRW_shgroup_uniform_ivec3_copy()

void DRW_shgroup_uniform_ivec3_copy ( DRWShadingGroup shgroup,
const char *  name,
const int *  value 
)

Definition at line 453 of file draw_manager_data.c.

References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.

Referenced by OVERLAY_volume_extra().

◆ DRW_shgroup_uniform_ivec4()

void DRW_shgroup_uniform_ivec4 ( DRWShadingGroup shgroup,
const char *  name,
const int *  value,
int  arraysize 
)

Definition at line 425 of file draw_manager_data.c.

References drw_shgroup_uniform(), and DRW_UNIFORM_INT.

Referenced by OVERLAY_edit_mesh_cache_init().

◆ DRW_shgroup_uniform_ivec4_copy()

void DRW_shgroup_uniform_ivec4_copy ( DRWShadingGroup shgroup,
const char *  name,
const int *  value 
)

◆ DRW_shgroup_uniform_mat3()

void DRW_shgroup_uniform_mat3 ( DRWShadingGroup shgroup,
const char *  name,
const float(*)  value[3] 
)

Definition at line 433 of file draw_manager_data.c.

References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.

Referenced by EEVEE_lookdev_cache_init().

◆ DRW_shgroup_uniform_mat4()

void DRW_shgroup_uniform_mat4 ( DRWShadingGroup shgroup,
const char *  name,
const float(*)  value[4] 
)

◆ DRW_shgroup_uniform_mat4_copy()

void DRW_shgroup_uniform_mat4_copy ( DRWShadingGroup shgroup,
const char *  name,
const float(*)  value[4] 
)

◆ DRW_shgroup_uniform_texture()

void DRW_shgroup_uniform_texture ( DRWShadingGroup shgroup,
const char *  name,
const GPUTexture tex 
)

Definition at line 240 of file draw_manager_data.c.

References DRW_shgroup_uniform_texture_ex(), GPU_SAMPLER_MAX, and tex.

Referenced by dof_gather_pass_init(), dof_recombine_pass_init(), drw_curves_cache_shgrp_attach_resources(), drw_hair_particle_cache_shgrp_attach_resources(), DRW_shgroup_add_material_resources(), DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), drw_volume_object_grids_init(), drw_volume_object_mesh_init(), drw_volume_world_grids_init(), EEVEE_lightbake_cache_init(), EEVEE_lookdev_cache_init(), EEVEE_material_bind_resources(), EEVEE_materials_cache_init(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_curves_cache_populate(), EEVEE_motion_blur_hair_cache_populate(), EEVEE_occlusion_cache_init(), EEVEE_occlusion_output_init(), EEVEE_screen_raytrace_cache_init(), EEVEE_shadow_output_init(), EEVEE_subsurface_add_pass(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_sbuffer_cache_populate(), gpencil_sbuffer_cache_populate_fast(), gpencil_stroke_cache_populate(), blender::eevee::ForwardPipeline::material_opaque_add(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_lattice_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_particle_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_init(), OVERLAY_sculpt_curves_cache_populate(), OVERLAY_volume_extra(), select_debug_engine_init(), blender::eevee::WorldPipeline::sync(), workbench_antialiasing_cache_init(), workbench_cavity_cache_init(), workbench_dof_cache_init(), workbench_image_setup_ex(), workbench_opaque_cache_init(), workbench_outline_cache_init(), workbench_transparent_cache_init(), workbench_transparent_lighting_uniforms(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().

◆ DRW_shgroup_uniform_texture_ex()

void DRW_shgroup_uniform_texture_ex ( DRWShadingGroup shgroup,
const char *  name,
const GPUTexture tex,
eGPUSamplerState  sampler_state 
)

◆ DRW_shgroup_uniform_texture_ref()

void DRW_shgroup_uniform_texture_ref ( DRWShadingGroup shgroup,
const char *  name,
GPUTexture **  tex 
)

◆ DRW_shgroup_uniform_texture_ref_ex()

void DRW_shgroup_uniform_texture_ref_ex ( DRWShadingGroup shgroup,
const char *  name,
GPUTexture **  tex,
eGPUSamplerState  sampler_state 
)

◆ DRW_shgroup_uniform_vec2()

void DRW_shgroup_uniform_vec2 ( DRWShadingGroup shgroup,
const char *  name,
const float value,
int  arraysize 
)

◆ DRW_shgroup_uniform_vec2_copy()

void DRW_shgroup_uniform_vec2_copy ( DRWShadingGroup shgroup,
const char *  name,
const float value 
)

◆ DRW_shgroup_uniform_vec3()

void DRW_shgroup_uniform_vec3 ( DRWShadingGroup shgroup,
const char *  name,
const float value,
int  arraysize 
)

◆ DRW_shgroup_uniform_vec3_copy()

void DRW_shgroup_uniform_vec3_copy ( DRWShadingGroup shgroup,
const char *  name,
const float value 
)

◆ DRW_shgroup_uniform_vec4()

void DRW_shgroup_uniform_vec4 ( DRWShadingGroup shgroup,
const char *  name,
const float value,
int  arraysize 
)

◆ DRW_shgroup_uniform_vec4_copy()

void DRW_shgroup_uniform_vec4_copy ( DRWShadingGroup shgroup,
const char *  name,
const float value 
)

◆ DRW_shgroup_vertex_buffer_ex()

void DRW_shgroup_vertex_buffer_ex ( DRWShadingGroup shgroup,
const char *  name,
GPUVertBuf *vertex_buffer  DRW_DEBUG_FILE_LINE_ARGS 
)

◆ DRW_shgroup_vertex_buffer_ref_ex()

void DRW_shgroup_vertex_buffer_ref_ex ( DRWShadingGroup shgroup,
const char *  name,
GPUVertBuf **vertex_buffer  DRW_DEBUG_FILE_LINE_ARGS 
)

◆ DRW_view_camtexco_get()

void DRW_view_camtexco_get ( const DRWView view,
float  r_texco[4] 
)

Definition at line 2085 of file draw_manager_data.c.

References copy_v4_v4(), and view.

Referenced by blender::eevee::Camera::sync().

◆ DRW_view_camtexco_set()

void DRW_view_camtexco_set ( DRWView view,
float  texco[4] 
)

Definition at line 2080 of file draw_manager_data.c.

References copy_v4_v4(), and view.

Referenced by drw_manager_init(), and EEVEE_render_view_sync().

◆ DRW_view_clip_planes_set()

void DRW_view_clip_planes_set ( DRWView view,
float(*)  planes[4],
int  plane_len 
)

This only works if DRWPasses have been tagged with DRW_STATE_CLIP_PLANES, and if the shaders have support for it (see usage of gl_ClipDistance).

Note
planes must be in world space.

Definition at line 2071 of file draw_manager_data.c.

References BLI_assert, MAX_CLIP_PLANES, and view.

Referenced by drw_manager_init(), EEVEE_temporal_sampling_create_view(), and lightbake_planar_ensure_view().

◆ DRW_view_create()

DRWView* DRW_view_create ( const float  viewmat[4][4],
const float  winmat[4][4],
const float(*)  culling_viewmat[4],
const float(*)  culling_winmat[4],
DRWCallVisibilityFn visibility_fn 
)

◆ DRW_view_create_sub()

DRWView* DRW_view_create_sub ( const DRWView parent_view,
const float  viewmat[4][4],
const float  winmat[4][4] 
)

◆ DRW_view_default_get()

const DRWView* DRW_view_default_get ( void  )

◆ DRW_view_default_set()

void DRW_view_default_set ( const DRWView view)

MUST only be called once per render and only in render mode. Sets default view.

Definition at line 2065 of file draw_manager_data.c.

References BLI_assert, DST, NULL, view, and DRWManager::view_default.

Referenced by eevee_lightbake_cache_create(), EEVEE_render_view_sync(), GPENCIL_render_init(), and workbench_render_matrices_init().

◆ DRW_view_far_distance_get()

float DRW_view_far_distance_get ( const DRWView view)

◆ DRW_view_frustum_corners_get()

void DRW_view_frustum_corners_get ( const DRWView view,
BoundBox corners 
)
Returns
world space frustum corners.

Definition at line 2090 of file draw_manager_data.c.

References view.

◆ DRW_view_frustum_planes_get()

void DRW_view_frustum_planes_get ( const DRWView view,
float  planes[6][4] 
)
Returns
world space frustum sides as planes. See draw_frustum_culling_planes_calc() for the plane order.

Definition at line 2095 of file draw_manager_data.c.

References view.

Referenced by drw_sculpt_get_frustum_planes().

◆ DRW_view_is_persp_get()

bool DRW_view_is_persp_get ( const DRWView view)

◆ DRW_view_near_distance_get()

float DRW_view_near_distance_get ( const DRWView view)

These are in view-space, so negative if in perspective. Extract near and far clip distance from the projection matrix.

Definition at line 2106 of file draw_manager_data.c.

References DRW_view_is_persp_get(), DST, view, and DRWManager::view_default.

Referenced by EEVEE_mist_output_init(), eevee_motion_blur_sync_camera(), EEVEE_shadows_draw_cascades(), EEVEE_volumes_init(), GPENCIL_render_init(), GPENCIL_render_result_z(), blender::eevee::Camera::sync(), and workbench_render_result_z().

◆ DRW_view_persmat_get()

void DRW_view_persmat_get ( const DRWView view,
float  mat[4][4],
bool  inverse 
)

◆ DRW_view_reset()

void DRW_view_reset ( void  )
Warning
Only use in render AND only if you are going to set view_default again.

Definition at line 2058 of file draw_manager_data.c.

References DST, NULL, DRWManager::view_active, DRWManager::view_default, and DRWManager::view_previous.

Referenced by DRW_render_gpencil(), DRW_render_to_image(), and EEVEE_render_view_sync().

◆ DRW_view_update()

void DRW_view_update ( DRWView view,
const float  viewmat[4][4],
const float  winmat[4][4],
const float(*)  culling_viewmat[4],
const float(*)  culling_winmat[4] 
)

◆ DRW_view_update_sub()

void DRW_view_update_sub ( DRWView view,
const float  viewmat[4][4],
const float  winmat[4][4] 
)

◆ DRW_view_viewmat_get()

void DRW_view_viewmat_get ( const DRWView view,
float  mat[4][4],
bool  inverse 
)

◆ DRW_view_winmat_get()

void DRW_view_winmat_get ( const DRWView view,
float  mat[4][4],
bool  inverse 
)

◆ pass_shgroup_dist_sort()

static int pass_shgroup_dist_sort ( const void a,
const void b 
)
static

Definition at line 2214 of file draw_manager_data.c.

References Freestyle::a, usdtokens::b(), and DRWShadingGroup::z_sorting.

Referenced by DRW_pass_sort_shgroup_z().

◆ sculpt_debug_cb()

static void sculpt_debug_cb ( void user_data,
const float  bmin[3],
const float  bmax[3],
PBVHNodeFlags  flag 
)
static

◆ sculpt_draw_cb()

static void sculpt_draw_cb ( DRWSculptCallbackData scd,
GPU_PBVH_Buffers buffers 
)
static

Variable Documentation

◆ inst_select_format

GPUVertFormat inst_select_format = {0}
static

◆ sculpt_debug_colors

float sculpt_debug_colors[9][4]
static
Initial value:
= {
{1.0f, 0.2f, 0.2f, 1.0f},
{0.2f, 1.0f, 0.2f, 1.0f},
{0.2f, 0.2f, 1.0f, 1.0f},
{1.0f, 1.0f, 0.2f, 1.0f},
{0.2f, 1.0f, 1.0f, 1.0f},
{1.0f, 0.2f, 1.0f, 1.0f},
{1.0f, 0.7f, 0.2f, 1.0f},
{0.2f, 1.0f, 0.7f, 1.0f},
{0.7f, 0.2f, 1.0f, 1.0f},
}

Definition at line 1091 of file draw_manager_data.c.