2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2014 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2017-03-09 05:17:55 +11:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup gpu
|
2017-03-09 05:17:55 +11:00
|
|
|
*
|
|
|
|
|
* Selection implementations.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-03-12 02:40:04 +11:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-09-07 23:52:55 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2017-03-09 05:17:55 +11:00
|
|
|
/* gpu_select_pick */
|
2021-12-09 20:01:47 +11:00
|
|
|
|
2023-11-30 21:27:15 +01:00
|
|
|
void gpu_select_pick_begin(GPUSelectBuffer *buffer, const rcti *input, eGPUSelectMode mode);
|
2019-04-27 20:37:11 +02:00
|
|
|
bool gpu_select_pick_load_id(uint id, bool end);
|
2018-09-12 12:18:35 +10:00
|
|
|
uint gpu_select_pick_end(void);
|
2017-03-09 05:17:55 +11:00
|
|
|
|
|
|
|
|
void gpu_select_pick_cache_begin(void);
|
|
|
|
|
void gpu_select_pick_cache_end(void);
|
2021-12-09 20:01:47 +11:00
|
|
|
/**
|
|
|
|
|
* \return true if drawing is not needed.
|
|
|
|
|
*/
|
2017-03-09 05:17:55 +11:00
|
|
|
bool gpu_select_pick_is_cached(void);
|
|
|
|
|
void gpu_select_pick_cache_load_id(void);
|
|
|
|
|
|
|
|
|
|
/* gpu_select_sample_query */
|
2021-12-09 20:01:47 +11:00
|
|
|
|
2023-11-30 21:27:15 +01:00
|
|
|
void gpu_select_query_begin(GPUSelectBuffer *buffer,
|
|
|
|
|
const rcti *input,
|
|
|
|
|
eGPUSelectMode mode,
|
|
|
|
|
int oldhits);
|
2018-09-12 12:18:35 +10:00
|
|
|
bool gpu_select_query_load_id(uint id);
|
|
|
|
|
uint gpu_select_query_end(void);
|
2017-03-09 05:17:55 +11:00
|
|
|
|
2023-05-23 15:00:38 +02:00
|
|
|
/* gpu_select_next */
|
|
|
|
|
|
2023-11-30 21:27:15 +01:00
|
|
|
void gpu_select_next_begin(GPUSelectBuffer *buffer, const rcti *input, eGPUSelectMode mode);
|
2023-05-23 15:00:38 +02:00
|
|
|
uint gpu_select_next_end(void);
|
|
|
|
|
|
|
|
|
|
/* Return a single offset since picking uses squared viewport. */
|
|
|
|
|
int gpu_select_next_get_pick_area_center(void);
|
|
|
|
|
eGPUSelectMode gpu_select_next_get_mode(void);
|
|
|
|
|
void gpu_select_next_set_result(GPUSelectResult *buffer, uint buffer_len);
|
|
|
|
|
|
2018-09-12 12:18:35 +10:00
|
|
|
#define SELECT_ID_NONE ((uint)0xffffffff)
|
2020-09-07 23:52:55 +02:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
2020-10-02 09:48:41 +10:00
|
|
|
#endif
|