Blender V5.0
draw_shader_shared.hh File Reference
#include "BLI_math_vector.hh"
#include "GPU_shader.hh"
#include "GPU_shader_shared_utils.hh"
#include "draw_defines.hh"

Go to the source code of this file.

Classes

struct  FrustumCorners
struct  FrustumPlanes
struct  ViewCullingData
struct  ViewMatrices
struct  ObjectMatrices
struct  ObjectInfos
struct  ObjectBounds
struct  VolumeInfos
struct  CurvesInfos
struct  ObjectAttribute
struct  LayerAttribute
struct  DrawCommand
struct  DispatchCommand
struct  DRWDebugVertPair
struct  DRWDebugDrawBuffer

Macros

#define DRW_SHADER_SHARED_H
#define DRW_RESOURCE_CHUNK_LEN   512
#define DRW_GRID_PER_VOLUME_MAX   16
#define DRW_ATTRIBUTE_PER_CURVES_MAX   15
#define _inner_sphere_radius   bounding_corners[3].w
Views
#define drw_view_id   0
#define DRW_VIEW_LEN   1
#define DRW_VIEW_SHIFT   0
#define DRW_VIEW_FROM_RESOURCE_ID

Debug draw shapes

#define DRW_DEBUG_DRAW_VERT_MAX   (2 * 1024) - 1
#define drw_debug_draw_v_count(buf)
#define drw_debug_draw_offset   1
enum  eObjectInfoFlag : uint32_t {
  OBJECT_SELECTED = (1u << 0u) , OBJECT_FROM_DUPLI = (1u << 1u) , OBJECT_FROM_SET = (1u << 2u) , OBJECT_ACTIVE = (1u << 3u) ,
  OBJECT_NEGATIVE_SCALE = (1u << 4u) , OBJECT_HOLDOUT = (1u << 5u) , OBJECT_ACTIVE_EDIT_MODE = (1u << 6u) , OBJECT_NO_INFO = ~OBJECT_HOLDOUT
}
 ENUM_OPERATORS (eObjectInfoFlag, OBJECT_ACTIVE_EDIT_MODE)
uint receiver_light_set_get (ObjectInfos object_infos)
uint blocker_shadow_set_get (ObjectInfos object_infos)
bool drw_bounds_corners_are_valid (ObjectBounds bounds)
bool drw_bounds_are_valid (ObjectBounds bounds)
DRWDebugVertPair debug_line_make (uint in_pos1_x, uint in_pos1_y, uint in_pos1_z, uint in_pos2_x, uint in_pos2_y, uint in_pos2_z, uint in_vert_color, uint in_lifetime)
uint debug_color_pack (float4 v_color)

Macro Definition Documentation

◆ _inner_sphere_radius

#define _inner_sphere_radius   bounding_corners[3].w

Radius of the inscribed sphere derived from the bounding corner. Computed on GPU.

Definition at line 206 of file draw_shader_shared.hh.

◆ DRW_ATTRIBUTE_PER_CURVES_MAX

#define DRW_ATTRIBUTE_PER_CURVES_MAX   15

Definition at line 59 of file draw_shader_shared.hh.

◆ drw_debug_draw_offset

#define drw_debug_draw_offset   1

Offset to the first data. Equal to: sizeof(DrawCommand) / sizeof(DRWDebugVertPair). This is needed because we bind the whole buffer as a DRWDebugVertPair array.

Definition at line 410 of file draw_shader_shared.hh.

◆ drw_debug_draw_v_count

#define drw_debug_draw_v_count ( buf)
Value:
buf[0].pos1_x

Definition at line 405 of file draw_shader_shared.hh.

◆ DRW_DEBUG_DRAW_VERT_MAX

#define DRW_DEBUG_DRAW_VERT_MAX   (2 * 1024) - 1

Definition at line 394 of file draw_shader_shared.hh.

Referenced by blender::draw::DebugDraw::draw_line().

◆ DRW_GRID_PER_VOLUME_MAX

#define DRW_GRID_PER_VOLUME_MAX   16

Definition at line 55 of file draw_shader_shared.hh.

◆ DRW_RESOURCE_CHUNK_LEN

#define DRW_RESOURCE_CHUNK_LEN   512

Definition at line 52 of file draw_shader_shared.hh.

◆ DRW_SHADER_SHARED_H

#define DRW_SHADER_SHARED_H

Definition at line 50 of file draw_shader_shared.hh.

◆ DRW_VIEW_FROM_RESOURCE_ID

#define DRW_VIEW_FROM_RESOURCE_ID

Definition at line 70 of file draw_shader_shared.hh.

◆ drw_view_id

#define drw_view_id   0

Definition at line 67 of file draw_shader_shared.hh.

◆ DRW_VIEW_LEN

#define DRW_VIEW_LEN   1

Definition at line 68 of file draw_shader_shared.hh.

◆ DRW_VIEW_SHIFT

#define DRW_VIEW_SHIFT   0

Definition at line 69 of file draw_shader_shared.hh.

Enumeration Type Documentation

◆ eObjectInfoFlag

enum eObjectInfoFlag : uint32_t
Enumerator
OBJECT_SELECTED 
OBJECT_FROM_DUPLI 
OBJECT_FROM_SET 
OBJECT_ACTIVE 
OBJECT_NEGATIVE_SCALE 
OBJECT_HOLDOUT 
OBJECT_ACTIVE_EDIT_MODE 
OBJECT_NO_INFO 

Definition at line 144 of file draw_shader_shared.hh.

Function Documentation

◆ blocker_shadow_set_get()

uint blocker_shadow_set_get ( ObjectInfos object_infos)
inline

◆ debug_color_pack()

◆ debug_line_make()

◆ drw_bounds_are_valid()

bool drw_bounds_are_valid ( ObjectBounds bounds)
inline

Definition at line 228 of file draw_shader_shared.hh.

References bounds().

◆ drw_bounds_corners_are_valid()

bool drw_bounds_corners_are_valid ( ObjectBounds bounds)
inline

Definition at line 220 of file draw_shader_shared.hh.

References bounds(), and drw_bounds_corners_are_valid().

Referenced by drw_bounds_corners_are_valid().

◆ ENUM_OPERATORS()

◆ receiver_light_set_get()

uint receiver_light_set_get ( ObjectInfos object_infos)
inline

Definition at line 187 of file draw_shader_shared.hh.

References receiver_light_set_get().

Referenced by receiver_light_set_get().