Blender V4.3
GPUPickState Struct Reference

Public Attributes

GPUSelectBufferbuffer
 
eGPUSelectMode mode
 
struct { 
 
   DepthBufCache *   rect_depth 
 
   DepthBufCache *   rect_depth_test 
 
   int   clip_readpixels [4] 
 
   bool   is_init 
 
   uint   prev_id 
 
gpu 
 
struct { 
 
   rcti   clip_rect 
 
   uint   rect_len 
 
src 
 
struct { 
 
   rcti   clip_rect 
 
   uint   rect_len 
 
dst 
 
bool use_cache
 
bool is_cached
 
struct { 
 
   SubRectStride   sub_rect 
 
   ListBase   bufs 
 
cache 
 
union { 
 
   struct { 
 
      DepthID *   hits 
 
      uint   hits_len 
 
      uint   hits_len_alloc 
 
   }   all 
 
   struct { 
 
      uint *   rect_id 
 
   }   nearest 
 
};  
 
int viewport [4]
 
int scissor [4]
 
eGPUWriteMask write_mask
 
eGPUDepthTest depth_test
 

Detailed Description

Depth sorting.

Definition at line 228 of file gpu_select_pick.cc.

Member Data Documentation

◆ [union]

union { ... } GPUPickState

Picking methods.

◆ [struct]

◆ buffer

GPUSelectBuffer* GPUPickState::buffer

Cache on initialization.

Definition at line 230 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_end().

◆ bufs

ListBase GPUPickState::bufs

List of DepthBufCache, sized of 'src.clip_rect'.

Definition at line 269 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_cache_end(), gpu_select_pick_cache_load_id(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ [struct]

◆ clip_readpixels

int GPUPickState::clip_readpixels[4]

Pass to GPU_framebuffer_read_depth(x, y, w, h).

Definition at line 242 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_load_id().

◆ clip_rect

rcti GPUPickState::clip_rect

Definition at line 254 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin().

◆ depth_test

eGPUDepthTest GPUPickState::depth_test

Definition at line 291 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_end().

◆ [struct]

◆ [struct]

struct { ... } GPUPickState::gpu

GPU drawing, never use when is_cached == true.

Referenced by gpu_select_pick_begin(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ hits

DepthID* GPUPickState::hits

◆ hits_len

uint GPUPickState::hits_len

◆ hits_len_alloc

uint GPUPickState::hits_len_alloc

◆ is_cached

◆ is_init

bool GPUPickState::is_init

Set after first draw.

Definition at line 245 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ mode

eGPUSelectMode GPUPickState::mode

Mode of this operation.

Definition at line 232 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), gpu_select_pick_cache_load_id(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ [struct]

◆ prev_id

uint GPUPickState::prev_id

◆ rect_depth

DepthBufCache* GPUPickState::rect_depth

The current depth, accumulated while drawing.

Definition at line 237 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ rect_depth_test

DepthBufCache* GPUPickState::rect_depth_test

Scratch buffer, avoid allocations every time (when not caching).

Definition at line 239 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ rect_id

uint* GPUPickState::rect_id

◆ rect_len

◆ scissor

int GPUPickState::scissor[4]

Definition at line 289 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin().

◆ [struct]

struct { ... } GPUPickState::src

src: data stored in 'cache' and 'gpu', dst: use when cached region is smaller (where src -> dst isn't 1:1).

Referenced by gpu_select_load_id_pass_all(), gpu_select_load_id_pass_nearest(), gpu_select_pick_begin(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ sub_rect

SubRectStride GPUPickState::sub_rect

Cleanup used for iterating over both source and destination buffers: src.clip_rect -> dst.clip_rect.

Definition at line 266 of file gpu_select_pick.cc.

Referenced by gpu_select_load_id_pass_all(), gpu_select_load_id_pass_nearest(), gpu_select_pick_begin(), gpu_select_pick_cache_load_id(), and gpu_select_pick_end().

◆ use_cache

bool GPUPickState::use_cache

Store cache between GPU_select_cache_begin/end

Definition at line 259 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), gpu_select_pick_cache_begin(), gpu_select_pick_cache_end(), gpu_select_pick_end(), and gpu_select_pick_load_id().

◆ viewport

int GPUPickState::viewport[4]

Previous state to restore after drawing.

Definition at line 288 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_end().

◆ write_mask

eGPUWriteMask GPUPickState::write_mask

Definition at line 290 of file gpu_select_pick.cc.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_end().


The documentation for this struct was generated from the following file: