| 
									
										
										
										
											2018-07-17 14:46:44 +02:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * ***** BEGIN GPL LICENSE BLOCK ***** | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  |  * modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  |  * as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  |  * of the License, or (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  |  * along with this program; if not, write to the Free Software Foundation, | 
					
						
							|  |  |  |  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * The Original Code is Copyright (C) 2016 by Mike Erwin. | 
					
						
							|  |  |  |  * All rights reserved. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Contributor(s): Blender Foundation | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * ***** END GPL LICENSE BLOCK ***** | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2017-03-02 15:07:14 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | /** \file blender/gpu/GPU_primitive.h
 | 
					
						
							| 
									
										
										
										
											2018-07-17 14:46:44 +02:00
										 |  |  |  *  \ingroup gpu | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  |  * GPU geometric primitives | 
					
						
							| 
									
										
										
										
											2018-07-17 14:46:44 +02:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2017-03-02 15:07:14 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | #ifndef __GPU_PRIMITIVE_H__
 | 
					
						
							|  |  |  | #define __GPU_PRIMITIVE_H__
 | 
					
						
							| 
									
										
										
										
											2017-03-02 15:07:14 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-17 21:11:23 +02:00
										 |  |  | #include "GPU_common.h"
 | 
					
						
							| 
									
										
										
										
											2017-03-02 15:07:14 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | typedef enum { | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | 	GPU_PRIM_POINTS, | 
					
						
							|  |  |  | 	GPU_PRIM_LINES, | 
					
						
							|  |  |  | 	GPU_PRIM_TRIS, | 
					
						
							|  |  |  | 	GPU_PRIM_LINE_STRIP, | 
					
						
							|  |  |  | 	GPU_PRIM_LINE_LOOP, /* GL has this, Vulkan does not */ | 
					
						
							|  |  |  | 	GPU_PRIM_TRI_STRIP, | 
					
						
							|  |  |  | 	GPU_PRIM_TRI_FAN, | 
					
						
							| 
									
										
										
										
											2017-04-08 01:19:25 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | 	GPU_PRIM_LINES_ADJ, | 
					
						
							|  |  |  | 	GPU_PRIM_TRIS_ADJ, | 
					
						
							|  |  |  | 	GPU_PRIM_LINE_STRIP_ADJ, | 
					
						
							| 
									
										
										
										
											2017-03-02 15:07:14 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | 	GPU_PRIM_NONE | 
					
						
							|  |  |  | } GPUPrimType; | 
					
						
							| 
									
										
										
										
											2017-03-02 15:07:14 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-17 14:46:44 +02:00
										 |  |  | /* what types of primitives does each shader expect? */ | 
					
						
							| 
									
										
										
										
											2017-03-02 15:07:14 -05:00
										 |  |  | typedef enum { | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | 	GPU_PRIM_CLASS_NONE    = 0, | 
					
						
							|  |  |  | 	GPU_PRIM_CLASS_POINT   = (1 << 0), | 
					
						
							|  |  |  | 	GPU_PRIM_CLASS_LINE    = (1 << 1), | 
					
						
							|  |  |  | 	GPU_PRIM_CLASS_SURFACE = (1 << 2), | 
					
						
							|  |  |  | 	GPU_PRIM_CLASS_ANY     = GPU_PRIM_CLASS_POINT | GPU_PRIM_CLASS_LINE | GPU_PRIM_CLASS_SURFACE | 
					
						
							|  |  |  | } GPUPrimClass; | 
					
						
							| 
									
										
										
										
											2017-06-19 20:18:04 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | GPUPrimClass GPU_primtype_class(GPUPrimType); | 
					
						
							|  |  |  | bool GPU_primtype_belongs_to_class(GPUPrimType, GPUPrimClass); | 
					
						
							| 
									
										
										
										
											2018-07-17 14:46:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-18 00:12:21 +02:00
										 |  |  | #endif /* __GPU_PRIMITIVE_H__ */
 |