GPU_select: utility function to finalize selection
[blender-staging.git] / source / blender / gpu / GPU_select.h
index d3cb914976ed069ad935a45ae29a6b9c0649fccf..53f480bccd79f0957888f1c95bfc8fe4f0376103 100644 (file)
 
 #include "BLI_sys_types.h"
 
-struct rctf;
+struct rcti;
 
 /* flags for mode of operation */
 enum {
        GPU_SELECT_ALL                      = 1,
+       /* gpu_select_query */
        GPU_SELECT_NEAREST_FIRST_PASS       = 2,
        GPU_SELECT_NEAREST_SECOND_PASS      = 3,
+       /* gpu_select_pick */
+       GPU_SELECT_PICK_ALL           = 4,
+       GPU_SELECT_PICK_NEAREST       = 5,
 };
 
-void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, const struct rctf *input, char mode, int oldhits);
+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_query_check_active(void);
 
+/* cache selection region */
+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);
+
 #endif