Blender  V3.3
Public Attributes | List of all members
GPUPickState Struct Reference

Public Attributes

GPUSelectResultbuffer
 
uint buffer_len
 
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 226 of file gpu_select_pick.c.

Member Data Documentation

◆ 

union { ... }

Picking methods.

◆ 

struct { ... } GPUPickState::all

◆ buffer

GPUSelectResult* GPUPickState::buffer

Cache on initialization.

Definition at line 228 of file gpu_select_pick.c.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_end().

◆ buffer_len

uint GPUPickState::buffer_len

Definition at line 229 of file gpu_select_pick.c.

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 268 of file gpu_select_pick.c.

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

◆ 

struct { ... } GPUPickState::cache

◆ clip_readpixels

int GPUPickState::clip_readpixels[4]

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

Definition at line 241 of file gpu_select_pick.c.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_load_id().

◆ clip_rect

rcti GPUPickState::clip_rect

Definition at line 253 of file gpu_select_pick.c.

Referenced by gpu_select_pick_begin().

◆ depth_test

eGPUDepthTest GPUPickState::depth_test

Definition at line 290 of file gpu_select_pick.c.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_end().

◆ 

struct { ... } GPUPickState::dst

◆ 

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

Definition at line 275 of file gpu_select_pick.c.

◆ hits_len

uint GPUPickState::hits_len

Definition at line 276 of file gpu_select_pick.c.

◆ hits_len_alloc

uint GPUPickState::hits_len_alloc

Definition at line 277 of file gpu_select_pick.c.

◆ is_cached

bool GPUPickState::is_cached

◆ is_init

bool GPUPickState::is_init

Set after first draw.

Definition at line 244 of file gpu_select_pick.c.

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 231 of file gpu_select_pick.c.

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

◆ 

struct { ... } GPUPickState::nearest

◆ prev_id

uint GPUPickState::prev_id

◆ rect_depth

DepthBufCache* GPUPickState::rect_depth

The current depth, accumulated while drawing.

Definition at line 236 of file gpu_select_pick.c.

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 238 of file gpu_select_pick.c.

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

◆ rect_id

uint* GPUPickState::rect_id

Definition at line 282 of file gpu_select_pick.c.

◆ rect_len

uint GPUPickState::rect_len

◆ scissor

int GPUPickState::scissor[4]

Definition at line 288 of file gpu_select_pick.c.

Referenced by gpu_select_pick_begin().

◆ 

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 265 of file gpu_select_pick.c.

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 258 of file gpu_select_pick.c.

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 287 of file gpu_select_pick.c.

Referenced by gpu_select_pick_end().

◆ write_mask

eGPUWriteMask GPUPickState::write_mask

Definition at line 289 of file gpu_select_pick.c.

Referenced by gpu_select_pick_begin(), and gpu_select_pick_end().


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