2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2014 Blender Foundation. All rights reserved. */
|
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
|
|
|
|
2022-01-31 13:01:29 +11:00
|
|
|
void gpu_select_pick_begin(GPUSelectResult *buffer,
|
|
|
|
|
uint buffer_len,
|
2022-01-31 13:01:27 +11:00
|
|
|
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
|
|
|
|
2018-09-12 12:18:35 +10:00
|
|
|
void gpu_select_query_begin(
|
2022-01-31 13:01:29 +11:00
|
|
|
GPUSelectResult *buffer, uint buffer_len, 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
|
|
|
|
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
|