|
Blender
V2.93
|
#include "BLI_sys_types.h"Go to the source code of this file.
Enumerations | |
| enum | { GPU_SELECT_ALL = 1 , GPU_SELECT_NEAREST_FIRST_PASS = 2 , GPU_SELECT_NEAREST_SECOND_PASS = 3 , GPU_SELECT_PICK_ALL = 4 , GPU_SELECT_PICK_NEAREST = 5 } |
Functions | |
| void | GPU_select_begin (unsigned int *buffer, unsigned int bufsize, const struct rcti *input, char mode, int oldhits) |
| bool | GPU_select_load_id (unsigned int id) |
| void | GPU_select_finalize (void) |
| unsigned int | GPU_select_end (void) |
| bool | GPU_select_is_cached (void) |
| void | GPU_select_cache_begin (void) |
| void | GPU_select_cache_load_id (void) |
| void | GPU_select_cache_end (void) |
| const uint * | GPU_select_buffer_near (const uint *buffer, int hits) |
| uint | GPU_select_buffer_remove_by_id (uint *buffer, int hits, uint select_id) |
| void | GPU_select_buffer_stride_realign (const struct rcti *src, const struct rcti *dst, uint *r_buf) |
| anonymous enum |
| Enumerator | |
|---|---|
| GPU_SELECT_ALL | |
| GPU_SELECT_NEAREST_FIRST_PASS | |
| GPU_SELECT_NEAREST_SECOND_PASS | |
| GPU_SELECT_PICK_ALL | |
| GPU_SELECT_PICK_NEAREST | |
Definition at line 35 of file GPU_select.h.
| void GPU_select_begin | ( | unsigned int * | buffer, |
| unsigned int | bufsize, | ||
| const struct rcti * | input, | ||
| char | mode, | ||
| int | oldhits | ||
| ) |
Referenced by drw_select_loop_pass(), gizmo_find_intersected_3d_intern(), and view3d_opengl_select().
Helper function, nothing special but avoids doing inline since hits aren't sorted by depth and purpose of 4x buffer indices isn't so clear.
Note that comparing depth as uint is fine.
Definition at line 200 of file gpu_select.c.
References BLI_assert, buffer, and NULL.
Referenced by gizmo_find_intersected_3d_intern().
Definition at line 215 of file gpu_select.c.
References buffer.
Referenced by view3d_opengl_select_with_id_filter().
| void GPU_select_buffer_stride_realign | ( | const struct rcti * | src, |
| const struct rcti * | dst, | ||
| uint * | r_buf | ||
| ) |
Referenced by DRW_select_buffer_read().
| void GPU_select_cache_begin | ( | void | ) |
Definition at line 159 of file gpu_select.c.
References ALGO_GL_PICK, GPUSelectState::algorithm, BLI_assert, g_select_state, gpu_select_pick_cache_begin(), and GPUSelectState::use_cache.
Referenced by view3d_opengl_select_cache_begin().
| void GPU_select_cache_end | ( | void | ) |
Definition at line 177 of file gpu_select.c.
References ALGO_GL_PICK, GPUSelectState::algorithm, g_select_state, gpu_select_pick_cache_end(), and GPUSelectState::use_cache.
Referenced by view3d_opengl_select(), and view3d_opengl_select_cache_end().
| void GPU_select_cache_load_id | ( | void | ) |
Definition at line 169 of file gpu_select.c.
References ALGO_GL_PICK, GPUSelectState::algorithm, BLI_assert, g_select_state, gpu_select_pick_cache_load_id(), and GPUSelectState::use_cache.
Referenced by view3d_opengl_select().
| unsigned int GPU_select_end | ( | void | ) |
Cleanup and flush selection results to buffer. Return number of hits and hits in buffer. if dopass is true, we will do a second pass with occlusion queries to get the closest hit.
Definition at line 131 of file gpu_select.c.
References ALGO_GL_QUERY, GPUSelectState::algorithm, g_select_state, gpu_select_pick_end(), gpu_select_query_end(), and GPUSelectState::select_is_active.
Referenced by drw_select_loop_pass(), gizmo_find_intersected_3d_intern(), and view3d_opengl_select().
| void GPU_select_finalize | ( | void | ) |
| bool GPU_select_is_cached | ( | void | ) |
Definition at line 185 of file gpu_select.c.
References g_select_state, gpu_select_pick_is_cached(), and GPUSelectState::use_cache.
Referenced by view3d_opengl_select().
| bool GPU_select_load_id | ( | uint | id | ) |
loads a new selection id and ends previous query, if any. In second pass of selection it also returns if id has been hit on the first pass already. Thus we can skip drawing un-hit objects.
Definition at line 108 of file gpu_select.c.
References ALGO_GL_QUERY, GPUSelectState::algorithm, g_select_state, gpu_select_pick_load_id(), gpu_select_query_load_id(), and GPUSelectState::select_is_active.
Referenced by draw_call_single_do(), draw_select_buffer(), ED_gizmo_draw_preset_facemap(), ed_gizmo_draw_preset_geometry(), gizmo_arrow_draw_select(), gizmo_button2d_draw_select(), gizmo_cage2d_draw_intern(), gizmo_cage3d_draw_intern(), gizmo_dial_draw_select(), gizmo_move_draw_select(), and gizmo_primitive_draw_select().