2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2014 Blender Foundation.
19 * All rights reserved.
21 * Contributor(s): Antony Riakiotakis.
23 * ***** END GPL LICENSE BLOCK *****
26 /** \file GPU_select.h
30 #ifndef __GPU_SELECT_H__
31 #define __GPU_SELECT_H__
33 #include "BLI_sys_types.h"
37 /* flags for mode of operation */
40 /* gpu_select_query */
41 GPU_SELECT_NEAREST_FIRST_PASS = 2,
42 GPU_SELECT_NEAREST_SECOND_PASS = 3,
44 GPU_SELECT_PICK_ALL = 4,
45 GPU_SELECT_PICK_NEAREST = 5,
48 void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, const struct rcti *input, char mode, int oldhits);
49 bool GPU_select_load_id(unsigned int id);
50 unsigned int GPU_select_end(void);
51 bool GPU_select_query_check_active(void);
53 /* cache selection region */
54 bool GPU_select_is_cached(void);
55 void GPU_select_cache_begin(void);
56 void GPU_select_cache_load_id(void);
57 void GPU_select_cache_end(void);