| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * 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. | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2019-01-23 11:29:18 +11:00
										 |  |  |  * Copyright 2016, Blender Foundation. | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-18 08:08:12 +11:00
										 |  |  | /** \file
 | 
					
						
							|  |  |  |  * \ingroup draw | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* This is the Render Functions used by Realtime engines to draw with OpenGL */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef __DRW_RENDER_H__
 | 
					
						
							|  |  |  | #define __DRW_RENDER_H__
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "BLI_listbase.h"
 | 
					
						
							|  |  |  | #include "BLI_math_matrix.h"
 | 
					
						
							|  |  |  | #include "BLI_math_vector.h"
 | 
					
						
							|  |  |  | #include "BLI_string.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-14 17:00:10 +11:00
										 |  |  | #include "BKE_context.h"
 | 
					
						
							|  |  |  | #include "BKE_layer.h"
 | 
					
						
							|  |  |  | #include "BKE_material.h"
 | 
					
						
							|  |  |  | #include "BKE_scene.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | #include "BLT_translation.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "DNA_object_types.h"
 | 
					
						
							| 
									
										
										
										
											2019-02-27 12:34:56 +11:00
										 |  |  | #include "DNA_light_types.h"
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | #include "DNA_material_types.h"
 | 
					
						
							|  |  |  | #include "DNA_scene_types.h"
 | 
					
						
							| 
									
										
										
										
											2018-07-10 14:14:55 +02:00
										 |  |  | #include "DNA_world_types.h"
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-25 17:46:48 +02:00
										 |  |  | #include "GPU_framebuffer.h"
 | 
					
						
							| 
									
										
										
										
											2019-05-13 17:56:20 +02:00
										 |  |  | #include "GPU_primitive.h"
 | 
					
						
							| 
									
										
										
										
											2018-04-30 16:02:24 +02:00
										 |  |  | #include "GPU_texture.h"
 | 
					
						
							| 
									
										
										
										
											2018-05-16 12:47:15 +02:00
										 |  |  | #include "GPU_shader.h"
 | 
					
						
							| 
									
										
										
										
											2018-03-25 17:46:48 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | #include "draw_common.h"
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | #include "draw_cache.h"
 | 
					
						
							| 
									
										
										
										
											2017-02-14 17:48:16 +01:00
										 |  |  | #include "draw_view.h"
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-26 19:57:46 +02:00
										 |  |  | #include "draw_manager_profiling.h"
 | 
					
						
							| 
									
										
										
										
											2018-07-16 20:07:13 +02:00
										 |  |  | #include "draw_debug.h"
 | 
					
						
							| 
									
										
										
										
											2017-07-26 19:57:46 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | #include "MEM_guardedalloc.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "RE_engine.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-29 12:18:07 +02:00
										 |  |  | #include "DEG_depsgraph.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-28 21:08:24 +11:00
										 |  |  | struct DRWTextStore; | 
					
						
							|  |  |  | struct DefaultFramebufferList; | 
					
						
							|  |  |  | struct DefaultTextureList; | 
					
						
							|  |  |  | struct GPUBatch; | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | struct GPUFrameBuffer; | 
					
						
							| 
									
										
										
										
											2017-04-27 22:27:09 +02:00
										 |  |  | struct GPUMaterial; | 
					
						
							| 
									
										
										
										
											2019-01-28 21:08:24 +11:00
										 |  |  | struct GPUShader; | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | struct GPUTexture; | 
					
						
							|  |  |  | struct GPUUniformBuffer; | 
					
						
							| 
									
										
										
										
											2019-02-27 12:02:02 +11:00
										 |  |  | struct LightEngineData; | 
					
						
							| 
									
										
										
										
											2019-01-28 21:08:24 +11:00
										 |  |  | struct Object; | 
					
						
							| 
									
										
										
										
											2018-05-09 16:55:09 +02:00
										 |  |  | struct ParticleSystem; | 
					
						
							| 
									
										
										
										
											2017-04-10 12:06:17 +02:00
										 |  |  | struct RenderEngineType; | 
					
						
							| 
									
										
										
										
											2017-04-12 19:49:19 +10:00
										 |  |  | struct ViewportEngineData; | 
					
						
							|  |  |  | struct ViewportEngineData_Info; | 
					
						
							| 
									
										
										
										
											2019-01-28 21:08:24 +11:00
										 |  |  | struct bContext; | 
					
						
							|  |  |  | struct rcti; | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | typedef struct DRWInterface DRWInterface; | 
					
						
							|  |  |  | typedef struct DRWPass DRWPass; | 
					
						
							|  |  |  | typedef struct DRWShadingGroup DRWShadingGroup; | 
					
						
							| 
									
										
										
										
											2019-01-28 21:08:24 +11:00
										 |  |  | typedef struct DRWUniform DRWUniform; | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-13 17:56:20 +02:00
										 |  |  | /* Opaque type to avoid usage as a DRWCall but it is exactly the same thing. */ | 
					
						
							|  |  |  | typedef struct DRWCallBuffer DRWCallBuffer; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-08 17:54:14 +01:00
										 |  |  | /* TODO Put it somewhere else? */ | 
					
						
							|  |  |  | typedef struct BoundSphere { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   float center[3], radius; | 
					
						
							| 
									
										
										
										
											2018-03-08 17:54:14 +01:00
										 |  |  | } BoundSphere; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-03 05:20:58 +10:00
										 |  |  | /* declare members as empty (unused) */ | 
					
						
							|  |  |  | typedef char DRWViewportEmptyList; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define DRW_VIEWPORT_LIST_SIZE(list) \
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   (sizeof(list) == sizeof(DRWViewportEmptyList) ? 0 : ((sizeof(list)) / sizeof(void *))) | 
					
						
							| 
									
										
										
										
											2017-04-12 19:49:19 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Unused members must be either pass list or 'char *' when not usd. */ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | #define DRW_VIEWPORT_DATA_SIZE(ty) \
 | 
					
						
							|  |  |  |   { \ | 
					
						
							|  |  |  |     DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->fbl)), DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->txl)), \ | 
					
						
							|  |  |  |         DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->psl)), \ | 
					
						
							|  |  |  |         DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->stl)), \ | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2017-04-12 19:49:19 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-23 20:47:42 +02:00
										 |  |  | /* Use of multisample framebuffers. */ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | #define MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) \
 | 
					
						
							|  |  |  |   { \ | 
					
						
							| 
									
										
										
										
											2019-05-11 00:21:27 +02:00
										 |  |  |     if (dfbl->multisample_fb != NULL && DRW_state_is_fbo()) { \ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |       DRW_stats_query_start("Multisample Blit"); \ | 
					
						
							|  |  |  |       GPU_framebuffer_bind(dfbl->multisample_fb); \ | 
					
						
							|  |  |  |       /* TODO clear only depth but need to do alpha to coverage for transparencies. */ \ | 
					
						
							|  |  |  |       GPU_framebuffer_clear_color_depth(dfbl->multisample_fb, (const float[4]){0.0f}, 1.0f); \ | 
					
						
							|  |  |  |       DRW_stats_query_end(); \ | 
					
						
							|  |  |  |     } \ | 
					
						
							|  |  |  |   } \ | 
					
						
							|  |  |  |   ((void)0) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl) \
 | 
					
						
							|  |  |  |   { \ | 
					
						
							| 
									
										
										
										
											2019-05-11 00:21:27 +02:00
										 |  |  |     if (dfbl->multisample_fb != NULL && DRW_state_is_fbo()) { \ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |       DRW_stats_query_start("Multisample Resolve"); \ | 
					
						
							|  |  |  |       GPU_framebuffer_bind(dfbl->default_fb); \ | 
					
						
							|  |  |  |       DRW_multisamples_resolve(dtxl->multisample_depth, dtxl->multisample_color, true); \ | 
					
						
							|  |  |  |       DRW_stats_query_end(); \ | 
					
						
							|  |  |  |     } \ | 
					
						
							|  |  |  |   } \ | 
					
						
							|  |  |  |   ((void)0) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl) \
 | 
					
						
							|  |  |  |   { \ | 
					
						
							| 
									
										
										
										
											2019-05-11 00:21:27 +02:00
										 |  |  |     if (dfbl->multisample_fb != NULL && DRW_state_is_fbo()) { \ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |       DRW_stats_query_start("Multisample Resolve"); \ | 
					
						
							|  |  |  |       GPU_framebuffer_bind(dfbl->default_fb); \ | 
					
						
							|  |  |  |       DRW_multisamples_resolve(dtxl->multisample_depth, dtxl->multisample_color, false); \ | 
					
						
							|  |  |  |       DRW_stats_query_end(); \ | 
					
						
							|  |  |  |     } \ | 
					
						
							|  |  |  |   } \ | 
					
						
							|  |  |  |   ((void)0) | 
					
						
							| 
									
										
										
										
											2018-07-31 10:22:19 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-12 19:49:19 +10:00
										 |  |  | typedef struct DrawEngineDataSize { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   int fbl_len; | 
					
						
							|  |  |  |   int txl_len; | 
					
						
							|  |  |  |   int psl_len; | 
					
						
							|  |  |  |   int stl_len; | 
					
						
							| 
									
										
										
										
											2017-04-12 19:49:19 +10:00
										 |  |  | } DrawEngineDataSize; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | typedef struct DrawEngineType { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   struct DrawEngineType *next, *prev; | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   char idname[32]; | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   const DrawEngineDataSize *vedata_size; | 
					
						
							| 
									
										
										
										
											2017-04-12 19:49:19 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   void (*engine_init)(void *vedata); | 
					
						
							|  |  |  |   void (*engine_free)(void); | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   void (*cache_init)(void *vedata); | 
					
						
							|  |  |  |   void (*cache_populate)(void *vedata, struct Object *ob); | 
					
						
							|  |  |  |   void (*cache_finish)(void *vedata); | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   void (*draw_background)(void *vedata); | 
					
						
							|  |  |  |   void (*draw_scene)(void *vedata); | 
					
						
							| 
									
										
										
										
											2017-09-25 20:07:02 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   void (*view_update)(void *vedata); | 
					
						
							|  |  |  |   void (*id_update)(void *vedata, struct ID *id); | 
					
						
							| 
									
										
										
										
											2018-01-29 14:56:16 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   void (*render_to_image)(void *vedata, | 
					
						
							|  |  |  |                           struct RenderEngine *engine, | 
					
						
							|  |  |  |                           struct RenderLayer *layer, | 
					
						
							|  |  |  |                           const struct rcti *rect); | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | } DrawEngineType; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef __DRW_ENGINE_H__
 | 
					
						
							|  |  |  | /* Buffer and textures used by the viewport by default */ | 
					
						
							|  |  |  | typedef struct DefaultFramebufferList { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   struct GPUFrameBuffer *default_fb; | 
					
						
							|  |  |  |   struct GPUFrameBuffer *color_only_fb; | 
					
						
							|  |  |  |   struct GPUFrameBuffer *depth_only_fb; | 
					
						
							|  |  |  |   struct GPUFrameBuffer *multisample_fb; | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | } DefaultFramebufferList; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | typedef struct DefaultTextureList { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   struct GPUTexture *color; | 
					
						
							|  |  |  |   struct GPUTexture *depth; | 
					
						
							|  |  |  |   struct GPUTexture *multisample_color; | 
					
						
							|  |  |  |   struct GPUTexture *multisample_depth; | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | } DefaultTextureList; | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | /* Textures */ | 
					
						
							|  |  |  | typedef enum { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   DRW_TEX_FILTER = (1 << 0), | 
					
						
							|  |  |  |   DRW_TEX_WRAP = (1 << 1), | 
					
						
							|  |  |  |   DRW_TEX_COMPARE = (1 << 2), | 
					
						
							|  |  |  |   DRW_TEX_MIPMAP = (1 << 3), | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | } DRWTextureFlag; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-25 17:46:48 +02:00
										 |  |  | /* Textures from DRW_texture_pool_query_* have the options
 | 
					
						
							|  |  |  |  * DRW_TEX_FILTER for color float textures, and no options | 
					
						
							|  |  |  |  * for depth textures and integer textures. */ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | struct GPUTexture *DRW_texture_pool_query_2d(int w, | 
					
						
							|  |  |  |                                              int h, | 
					
						
							|  |  |  |                                              eGPUTextureFormat format, | 
					
						
							|  |  |  |                                              DrawEngineType *engine_type); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | struct GPUTexture *DRW_texture_create_1d(int w, | 
					
						
							|  |  |  |                                          eGPUTextureFormat format, | 
					
						
							|  |  |  |                                          DRWTextureFlag flags, | 
					
						
							|  |  |  |                                          const float *fpixels); | 
					
						
							| 
									
										
										
										
											2019-03-20 18:17:16 +11:00
										 |  |  | struct GPUTexture *DRW_texture_create_2d( | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |     int w, int h, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels); | 
					
						
							| 
									
										
										
										
											2019-03-20 18:17:16 +11:00
										 |  |  | struct GPUTexture *DRW_texture_create_2d_array( | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |     int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels); | 
					
						
							| 
									
										
										
										
											2019-03-20 18:17:16 +11:00
										 |  |  | struct GPUTexture *DRW_texture_create_3d( | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |     int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels); | 
					
						
							|  |  |  | struct GPUTexture *DRW_texture_create_cube(int w, | 
					
						
							|  |  |  |                                            eGPUTextureFormat format, | 
					
						
							|  |  |  |                                            DRWTextureFlag flags, | 
					
						
							|  |  |  |                                            const float *fpixels); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void DRW_texture_ensure_fullscreen_2d(struct GPUTexture **tex, | 
					
						
							|  |  |  |                                       eGPUTextureFormat format, | 
					
						
							|  |  |  |                                       DRWTextureFlag flags); | 
					
						
							| 
									
										
										
										
											2019-03-20 18:17:16 +11:00
										 |  |  | void DRW_texture_ensure_2d( | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |     struct GPUTexture **tex, int w, int h, eGPUTextureFormat format, DRWTextureFlag flags); | 
					
						
							| 
									
										
										
										
											2018-03-25 17:46:48 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-18 12:50:09 +02:00
										 |  |  | void DRW_texture_generate_mipmaps(struct GPUTexture *tex); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | void DRW_texture_free(struct GPUTexture *tex); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | #define DRW_TEXTURE_FREE_SAFE(tex) \
 | 
					
						
							|  |  |  |   do { \ | 
					
						
							|  |  |  |     if (tex != NULL) { \ | 
					
						
							|  |  |  |       DRW_texture_free(tex); \ | 
					
						
							|  |  |  |       tex = NULL; \ | 
					
						
							|  |  |  |     } \ | 
					
						
							|  |  |  |   } while (0) | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* UBOs */ | 
					
						
							|  |  |  | struct GPUUniformBuffer *DRW_uniformbuffer_create(int size, const void *data); | 
					
						
							|  |  |  | void DRW_uniformbuffer_update(struct GPUUniformBuffer *ubo, const void *data); | 
					
						
							|  |  |  | void DRW_uniformbuffer_free(struct GPUUniformBuffer *ubo); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | #define DRW_UBO_FREE_SAFE(ubo) \
 | 
					
						
							|  |  |  |   do { \ | 
					
						
							|  |  |  |     if (ubo != NULL) { \ | 
					
						
							|  |  |  |       DRW_uniformbuffer_free(ubo); \ | 
					
						
							|  |  |  |       ubo = NULL; \ | 
					
						
							|  |  |  |     } \ | 
					
						
							|  |  |  |   } while (0) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void DRW_transform_to_display(struct GPUTexture *tex, | 
					
						
							|  |  |  |                               bool use_view_transform, | 
					
						
							|  |  |  |                               bool use_render_settings); | 
					
						
							| 
									
										
										
										
											2018-07-11 11:43:56 +02:00
										 |  |  | void DRW_transform_none(struct GPUTexture *tex); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | void DRW_multisamples_resolve(struct GPUTexture *src_depth, | 
					
						
							|  |  |  |                               struct GPUTexture *src_color, | 
					
						
							|  |  |  |                               bool use_depth); | 
					
						
							| 
									
										
										
										
											2017-05-11 16:20:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | /* Shaders */ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | struct GPUShader *DRW_shader_create(const char *vert, | 
					
						
							|  |  |  |                                     const char *geom, | 
					
						
							|  |  |  |                                     const char *frag, | 
					
						
							|  |  |  |                                     const char *defines); | 
					
						
							| 
									
										
										
										
											2017-04-22 16:11:12 +10:00
										 |  |  | struct GPUShader *DRW_shader_create_with_lib( | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |     const char *vert, const char *geom, const char *frag, const char *lib, const char *defines); | 
					
						
							|  |  |  | struct GPUShader *DRW_shader_create_with_transform_feedback(const char *vert, | 
					
						
							|  |  |  |                                                             const char *geom, | 
					
						
							|  |  |  |                                                             const char *defines, | 
					
						
							|  |  |  |                                                             const eGPUShaderTFBType prim_type, | 
					
						
							|  |  |  |                                                             const char **varying_names, | 
					
						
							|  |  |  |                                                             const int varying_count); | 
					
						
							| 
									
										
										
										
											2019-03-20 18:17:16 +11:00
										 |  |  | struct GPUShader *DRW_shader_create_2d(const char *frag, const char *defines); | 
					
						
							|  |  |  | struct GPUShader *DRW_shader_create_3d(const char *frag, const char *defines); | 
					
						
							| 
									
										
										
										
											2017-03-16 23:58:30 +01:00
										 |  |  | struct GPUShader *DRW_shader_create_fullscreen(const char *frag, const char *defines); | 
					
						
							| 
									
										
										
										
											2019-03-20 18:17:16 +11:00
										 |  |  | struct GPUShader *DRW_shader_create_3d_depth_only(eGPUShaderConfig slot); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | struct GPUMaterial *DRW_shader_find_from_world(struct World *wo, | 
					
						
							|  |  |  |                                                const void *engine_type, | 
					
						
							|  |  |  |                                                int options, | 
					
						
							|  |  |  |                                                bool deferred); | 
					
						
							|  |  |  | struct GPUMaterial *DRW_shader_find_from_material(struct Material *ma, | 
					
						
							|  |  |  |                                                   const void *engine_type, | 
					
						
							|  |  |  |                                                   int options, | 
					
						
							|  |  |  |                                                   bool deferred); | 
					
						
							|  |  |  | struct GPUMaterial *DRW_shader_create_from_world(struct Scene *scene, | 
					
						
							|  |  |  |                                                  struct World *wo, | 
					
						
							|  |  |  |                                                  const void *engine_type, | 
					
						
							|  |  |  |                                                  int options, | 
					
						
							|  |  |  |                                                  const char *vert, | 
					
						
							|  |  |  |                                                  const char *geom, | 
					
						
							|  |  |  |                                                  const char *frag_lib, | 
					
						
							|  |  |  |                                                  const char *defines, | 
					
						
							|  |  |  |                                                  bool deferred); | 
					
						
							|  |  |  | struct GPUMaterial *DRW_shader_create_from_material(struct Scene *scene, | 
					
						
							|  |  |  |                                                     struct Material *ma, | 
					
						
							|  |  |  |                                                     const void *engine_type, | 
					
						
							|  |  |  |                                                     int options, | 
					
						
							|  |  |  |                                                     const char *vert, | 
					
						
							|  |  |  |                                                     const char *geom, | 
					
						
							|  |  |  |                                                     const char *frag_lib, | 
					
						
							|  |  |  |                                                     const char *defines, | 
					
						
							|  |  |  |                                                     bool deferred); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | void DRW_shader_free(struct GPUShader *shader); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | #define DRW_SHADER_FREE_SAFE(shader) \
 | 
					
						
							|  |  |  |   do { \ | 
					
						
							|  |  |  |     if (shader != NULL) { \ | 
					
						
							|  |  |  |       DRW_shader_free(shader); \ | 
					
						
							|  |  |  |       shader = NULL; \ | 
					
						
							|  |  |  |     } \ | 
					
						
							|  |  |  |   } while (0) | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Batches */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | typedef enum { | 
					
						
							| 
									
										
										
										
											2019-05-17 14:04:30 +02:00
										 |  |  |   /** Wrtie mask */ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   DRW_STATE_WRITE_DEPTH = (1 << 0), | 
					
						
							|  |  |  |   DRW_STATE_WRITE_COLOR = (1 << 1), | 
					
						
							| 
									
										
										
										
											2019-05-17 14:04:30 +02:00
										 |  |  |   DRW_STATE_WRITE_STENCIL = (1 << 2), | 
					
						
							|  |  |  |   DRW_STATE_WRITE_STENCIL_SHADOW_PASS = (1 << 3), | 
					
						
							|  |  |  |   DRW_STATE_WRITE_STENCIL_SHADOW_FAIL = (1 << 4), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** Depth test */ | 
					
						
							|  |  |  |   DRW_STATE_DEPTH_ALWAYS = (1 << 5), | 
					
						
							|  |  |  |   DRW_STATE_DEPTH_LESS = (1 << 6), | 
					
						
							|  |  |  |   DRW_STATE_DEPTH_LESS_EQUAL = (1 << 7), | 
					
						
							|  |  |  |   DRW_STATE_DEPTH_EQUAL = (1 << 8), | 
					
						
							|  |  |  |   DRW_STATE_DEPTH_GREATER = (1 << 9), | 
					
						
							|  |  |  |   DRW_STATE_DEPTH_GREATER_EQUAL = (1 << 10), | 
					
						
							|  |  |  |   /** Culling test */ | 
					
						
							|  |  |  |   DRW_STATE_CULL_BACK = (1 << 11), | 
					
						
							|  |  |  |   DRW_STATE_CULL_FRONT = (1 << 12), | 
					
						
							|  |  |  |   /** Stencil test */ | 
					
						
							|  |  |  |   DRW_STATE_STENCIL_EQUAL = (1 << 13), | 
					
						
							|  |  |  |   DRW_STATE_STENCIL_NEQUAL = (1 << 14), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** Blend state */ | 
					
						
							|  |  |  |   DRW_STATE_ADDITIVE = (1 << 15), | 
					
						
							|  |  |  |   /** Same as additive but let alpha accumulate without premult. */ | 
					
						
							|  |  |  |   DRW_STATE_ADDITIVE_FULL = (1 << 16), | 
					
						
							|  |  |  |   DRW_STATE_BLEND = (1 << 17), | 
					
						
							|  |  |  |   /** Use that if color is already premult by alpha. */ | 
					
						
							|  |  |  |   DRW_STATE_BLEND_PREMUL = (1 << 18), | 
					
						
							|  |  |  |   DRW_STATE_BLEND_PREMUL_UNDER = (1 << 19), | 
					
						
							|  |  |  |   DRW_STATE_BLEND_OIT = (1 << 20), | 
					
						
							|  |  |  |   DRW_STATE_MULTIPLY = (1 << 21), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   DRW_STATE_CLIP_PLANES = (1 << 22), | 
					
						
							|  |  |  |   DRW_STATE_WIRE_SMOOTH = (1 << 23), | 
					
						
							|  |  |  |   DRW_STATE_FIRST_VERTEX_CONVENTION = (1 << 24), | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /** Polygon offset. Does not work with lines and points. */ | 
					
						
							| 
									
										
										
										
											2019-05-17 14:04:30 +02:00
										 |  |  |   DRW_STATE_OFFSET_POSITIVE = (1 << 25), | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /** Polygon offset. Does not work with lines and points. */ | 
					
						
							| 
									
										
										
										
											2019-05-17 14:04:30 +02:00
										 |  |  |   DRW_STATE_OFFSET_NEGATIVE = (1 << 26), | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | } DRWState; | 
					
						
							| 
									
										
										
										
											2019-05-17 14:04:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | #define DRW_STATE_DEFAULT \
 | 
					
						
							|  |  |  |   (DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL) | 
					
						
							|  |  |  | #define DRW_STATE_RASTERIZER_ENABLED \
 | 
					
						
							|  |  |  |   (DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_STENCIL | \ | 
					
						
							|  |  |  |    DRW_STATE_WRITE_STENCIL_SHADOW_PASS | DRW_STATE_WRITE_STENCIL_SHADOW_FAIL) | 
					
						
							| 
									
										
										
										
											2017-05-03 20:09:17 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-14 18:59:15 +01:00
										 |  |  | typedef enum { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   DRW_ATTR_INT, | 
					
						
							|  |  |  |   DRW_ATTR_FLOAT, | 
					
						
							| 
									
										
										
										
											2019-01-29 07:46:25 +11:00
										 |  |  | } eDRWAttrType; | 
					
						
							| 
									
										
										
										
											2018-02-14 18:59:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-29 07:46:25 +11:00
										 |  |  | typedef struct DRWInstanceAttrFormat { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   char name[32]; | 
					
						
							|  |  |  |   eDRWAttrType type; | 
					
						
							|  |  |  |   int components; | 
					
						
							| 
									
										
										
										
											2019-01-29 07:46:25 +11:00
										 |  |  | } DRWInstanceAttrFormat; | 
					
						
							| 
									
										
										
										
											2018-02-14 18:59:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | struct GPUVertFormat *DRW_shgroup_instance_format_array(const DRWInstanceAttrFormat attrs[], | 
					
						
							|  |  |  |                                                         int arraysize); | 
					
						
							|  |  |  | #define DRW_shgroup_instance_format(format, ...) \
 | 
					
						
							|  |  |  |   do { \ | 
					
						
							|  |  |  |     if (format == NULL) { \ | 
					
						
							|  |  |  |       DRWInstanceAttrFormat drw_format[] = __VA_ARGS__; \ | 
					
						
							|  |  |  |       format = DRW_shgroup_instance_format_array( \ | 
					
						
							|  |  |  |           drw_format, (sizeof(drw_format) / sizeof(DRWInstanceAttrFormat))); \ | 
					
						
							|  |  |  |     } \ | 
					
						
							|  |  |  |   } while (0) | 
					
						
							| 
									
										
										
										
											2017-05-03 08:20:11 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | DRWShadingGroup *DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass); | 
					
						
							| 
									
										
										
										
											2018-10-11 15:50:46 +02:00
										 |  |  | DRWShadingGroup *DRW_shgroup_create_sub(DRWShadingGroup *shgroup); | 
					
						
							| 
									
										
										
										
											2017-04-27 22:27:09 +02:00
										 |  |  | DRWShadingGroup *DRW_shgroup_material_create(struct GPUMaterial *material, DRWPass *pass); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | DRWShadingGroup *DRW_shgroup_transform_feedback_create(struct GPUShader *shader, | 
					
						
							|  |  |  |                                                        DRWPass *pass, | 
					
						
							|  |  |  |                                                        struct GPUVertBuf *tf_target); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-24 12:29:15 +02:00
										 |  |  | /* return final visibility */ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | typedef bool(DRWCallVisibilityFn)(bool vis_in, void *user_data); | 
					
						
							| 
									
										
										
										
											2018-04-24 12:29:15 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-13 17:56:20 +02:00
										 |  |  | /* TODO(fclem): Remove the _add suffix. */ | 
					
						
							| 
									
										
										
										
											2019-05-13 18:28:36 +02:00
										 |  |  | void DRW_shgroup_call(DRWShadingGroup *sh, struct GPUBatch *geom, float (*obmat)[4]); | 
					
						
							|  |  |  | void DRW_shgroup_call_range( | 
					
						
							| 
									
										
										
										
											2019-05-13 17:56:20 +02:00
										 |  |  |     DRWShadingGroup *sh, struct GPUBatch *geom, float (*obmat)[4], uint v_sta, uint v_ct); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-13 18:28:36 +02:00
										 |  |  | void DRW_shgroup_call_procedural_points(DRWShadingGroup *sh, uint point_ct, float (*obmat)[4]); | 
					
						
							|  |  |  | void DRW_shgroup_call_procedural_lines(DRWShadingGroup *sh, uint line_ct, float (*obmat)[4]); | 
					
						
							|  |  |  | void DRW_shgroup_call_procedural_triangles(DRWShadingGroup *sh, uint tri_ct, float (*obmat)[4]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void DRW_shgroup_call_object_ex(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                 struct GPUBatch *geom, | 
					
						
							|  |  |  |                                 struct Object *ob, | 
					
						
							|  |  |  |                                 bool bypass_culling); | 
					
						
							|  |  |  | #define DRW_shgroup_call_object(shgroup, geom, ob) \
 | 
					
						
							|  |  |  |   DRW_shgroup_call_object_ex(shgroup, geom, ob, false) | 
					
						
							|  |  |  | #define DRW_shgroup_call_object_no_cull(shgroup, geom, ob) \
 | 
					
						
							|  |  |  |   DRW_shgroup_call_object_ex(shgroup, geom, ob, true) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-17 13:31:39 +02:00
										 |  |  | /* TODO(fclem) remove this when we have DRWView */ | 
					
						
							| 
									
										
										
										
											2019-05-13 18:28:36 +02:00
										 |  |  | void DRW_shgroup_call_object_with_callback(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                            struct GPUBatch *geom, | 
					
						
							|  |  |  |                                            struct Object *ob, | 
					
						
							|  |  |  |                                            DRWCallVisibilityFn *callback, | 
					
						
							|  |  |  |                                            void *user_data); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void DRW_shgroup_call_instances(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                 struct GPUBatch *geom, | 
					
						
							|  |  |  |                                 float (*obmat)[4], | 
					
						
							|  |  |  |                                 uint count); | 
					
						
							|  |  |  | void DRW_shgroup_call_instances_with_attribs(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                              struct GPUBatch *geom, | 
					
						
							|  |  |  |                                              float (*obmat)[4], | 
					
						
							|  |  |  |                                              struct GPUBatch *inst_attributes); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void DRW_shgroup_call_sculpt(DRWShadingGroup *sh, Object *ob, bool wire, bool mask, bool vcol); | 
					
						
							|  |  |  | void DRW_shgroup_call_sculpt_with_materials(DRWShadingGroup **sh, Object *ob, bool vcol); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DRWCallBuffer *DRW_shgroup_call_buffer(DRWShadingGroup *shading_group, | 
					
						
							|  |  |  |                                        struct GPUVertFormat *format, | 
					
						
							|  |  |  |                                        GPUPrimType prim_type); | 
					
						
							|  |  |  | DRWCallBuffer *DRW_shgroup_call_buffer_instance(DRWShadingGroup *shading_group, | 
					
						
							|  |  |  |                                                 struct GPUVertFormat *format, | 
					
						
							|  |  |  |                                                 struct GPUBatch *geom); | 
					
						
							| 
									
										
										
										
											2019-05-13 17:56:20 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | void DRW_buffer_add_entry_array(DRWCallBuffer *buffer, const void *attr[], uint attr_len); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define DRW_buffer_add_entry(buffer, ...) \
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   do { \ | 
					
						
							|  |  |  |     const void *array[] = {__VA_ARGS__}; \ | 
					
						
							| 
									
										
										
										
											2019-05-13 17:56:20 +02:00
										 |  |  |     DRW_buffer_add_entry_array(buffer, array, (sizeof(array) / sizeof(*array))); \ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   } while (0) | 
					
						
							| 
									
										
										
										
											2018-03-01 19:27:38 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-03 08:20:11 +10:00
										 |  |  | void DRW_shgroup_state_enable(DRWShadingGroup *shgroup, DRWState state); | 
					
						
							| 
									
										
										
										
											2017-07-10 11:26:16 +02:00
										 |  |  | void DRW_shgroup_state_disable(DRWShadingGroup *shgroup, DRWState state); | 
					
						
							| 
									
										
										
										
											2018-05-11 07:48:52 +02:00
										 |  |  | void DRW_shgroup_stencil_mask(DRWShadingGroup *shgroup, uint mask); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | void DRW_shgroup_uniform_texture(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                  const char *name, | 
					
						
							|  |  |  |                                  const struct GPUTexture *tex); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_texture_persistent(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                             const char *name, | 
					
						
							|  |  |  |                                             const struct GPUTexture *tex); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_block(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                const char *name, | 
					
						
							|  |  |  |                                const struct GPUUniformBuffer *ubo); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_block_persistent(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                           const char *name, | 
					
						
							|  |  |  |                                           const struct GPUUniformBuffer *ubo); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_texture_ref(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                      const char *name, | 
					
						
							|  |  |  |                                      struct GPUTexture **tex); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_float(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                const char *name, | 
					
						
							|  |  |  |                                const float *value, | 
					
						
							|  |  |  |                                int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_vec2(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                               const char *name, | 
					
						
							|  |  |  |                               const float *value, | 
					
						
							|  |  |  |                               int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_vec3(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                               const char *name, | 
					
						
							|  |  |  |                               const float *value, | 
					
						
							|  |  |  |                               int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_vec4(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                               const char *name, | 
					
						
							|  |  |  |                               const float *value, | 
					
						
							|  |  |  |                               int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_short_to_int(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                       const char *name, | 
					
						
							|  |  |  |                                       const short *value, | 
					
						
							|  |  |  |                                       int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_short_to_float(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                         const char *name, | 
					
						
							|  |  |  |                                         const short *value, | 
					
						
							|  |  |  |                                         int arraysize); | 
					
						
							| 
									
										
										
										
											2018-01-03 20:39:44 +01:00
										 |  |  | /* Boolean are expected to be 4bytes longs for opengl! */ | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | void DRW_shgroup_uniform_bool(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                               const char *name, | 
					
						
							|  |  |  |                               const int *value, | 
					
						
							|  |  |  |                               int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_int(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                              const char *name, | 
					
						
							|  |  |  |                              const int *value, | 
					
						
							|  |  |  |                              int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_ivec2(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                const char *name, | 
					
						
							|  |  |  |                                const int *value, | 
					
						
							|  |  |  |                                int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_ivec3(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                const char *name, | 
					
						
							|  |  |  |                                const int *value, | 
					
						
							|  |  |  |                                int arraysize); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_ivec4(DRWShadingGroup *shgroup, | 
					
						
							|  |  |  |                                const char *name, | 
					
						
							|  |  |  |                                const int *value, | 
					
						
							|  |  |  |                                int arraysize); | 
					
						
							| 
									
										
										
										
											2018-04-20 18:10:00 +02:00
										 |  |  | void DRW_shgroup_uniform_mat3(DRWShadingGroup *shgroup, const char *name, const float (*value)[3]); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_mat4(DRWShadingGroup *shgroup, const char *name, const float (*value)[4]); | 
					
						
							| 
									
										
										
										
											2018-04-17 12:59:18 +02:00
										 |  |  | /* Store value instead of referencing it. */ | 
					
						
							|  |  |  | void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value); | 
					
						
							| 
									
										
										
										
											2018-05-11 19:00:08 +02:00
										 |  |  | void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value); | 
					
						
							|  |  |  | void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value); | 
					
						
							| 
									
										
										
										
											2019-05-13 19:20:58 +02:00
										 |  |  | void DRW_shgroup_uniform_vec2_copy(DRWShadingGroup *shgroup, const char *name, const float *value); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-30 12:23:23 +02:00
										 |  |  | bool DRW_shgroup_is_empty(DRWShadingGroup *shgroup); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | /* Passes */ | 
					
						
							|  |  |  | DRWPass *DRW_pass_create(const char *name, DRWState state); | 
					
						
							| 
									
										
										
										
											2018-01-21 19:12:59 +01:00
										 |  |  | void DRW_pass_state_set(DRWPass *pass, DRWState state); | 
					
						
							| 
									
										
										
										
											2018-05-07 15:01:58 +02:00
										 |  |  | void DRW_pass_state_add(DRWPass *pass, DRWState state); | 
					
						
							|  |  |  | void DRW_pass_state_remove(DRWPass *pass, DRWState state); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | void DRW_pass_foreach_shgroup(DRWPass *pass, | 
					
						
							|  |  |  |                               void (*callback)(void *userData, DRWShadingGroup *shgrp), | 
					
						
							|  |  |  |                               void *userData); | 
					
						
							| 
									
										
										
										
											2017-07-10 14:45:19 +02:00
										 |  |  | void DRW_pass_sort_shgroup_z(DRWPass *pass); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-30 12:23:23 +02:00
										 |  |  | bool DRW_pass_is_empty(DRWPass *pass); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-16 21:41:22 +02:00
										 |  |  | #define DRW_PASS_CREATE(pass, state) (pass = DRW_pass_create(#pass, state))
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | /* Viewport */ | 
					
						
							|  |  |  | typedef enum { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /* keep in sync with the union struct DRWMatrixState. */ | 
					
						
							|  |  |  |   DRW_MAT_PERS = 0, | 
					
						
							|  |  |  |   DRW_MAT_PERSINV, | 
					
						
							|  |  |  |   DRW_MAT_VIEW, | 
					
						
							|  |  |  |   DRW_MAT_VIEWINV, | 
					
						
							|  |  |  |   DRW_MAT_WIN, | 
					
						
							|  |  |  |   DRW_MAT_WININV, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   DRW_MAT_COUNT,  // Don't use this.
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | } DRWViewportMatrixType; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-09 19:52:37 +01:00
										 |  |  | typedef struct DRWMatrixState { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   union { | 
					
						
							|  |  |  |     float mat[DRW_MAT_COUNT][4][4]; | 
					
						
							|  |  |  |     struct { | 
					
						
							|  |  |  |       /* keep in sync with the enum DRWViewportMatrixType. */ | 
					
						
							|  |  |  |       float persmat[4][4]; | 
					
						
							|  |  |  |       float persinv[4][4]; | 
					
						
							|  |  |  |       float viewmat[4][4]; | 
					
						
							|  |  |  |       float viewinv[4][4]; | 
					
						
							|  |  |  |       float winmat[4][4]; | 
					
						
							|  |  |  |       float wininv[4][4]; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							| 
									
										
										
										
											2018-03-02 18:05:42 +01:00
										 |  |  | } DRWMatrixState; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | void DRW_viewport_matrix_get(float mat[4][4], DRWViewportMatrixType type); | 
					
						
							| 
									
										
										
										
											2018-03-02 18:05:42 +01:00
										 |  |  | void DRW_viewport_matrix_get_all(DRWMatrixState *state); | 
					
						
							| 
									
										
										
										
											2018-04-15 19:03:42 +02:00
										 |  |  | void DRW_viewport_matrix_override_set(const float mat[4][4], DRWViewportMatrixType type); | 
					
						
							| 
									
										
										
										
											2018-03-02 18:05:42 +01:00
										 |  |  | void DRW_viewport_matrix_override_set_all(DRWMatrixState *state); | 
					
						
							| 
									
										
										
										
											2017-06-08 20:19:42 +02:00
										 |  |  | void DRW_viewport_matrix_override_unset(DRWViewportMatrixType type); | 
					
						
							| 
									
										
										
										
											2018-03-02 18:05:42 +01:00
										 |  |  | void DRW_viewport_matrix_override_unset_all(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-03 09:08:00 +02:00
										 |  |  | /* These are in view-space so negative if in perspective.
 | 
					
						
							| 
									
										
										
										
											2018-05-04 17:32:53 +02:00
										 |  |  |  * Extract near and far clip distance from the projection matrix. */ | 
					
						
							|  |  |  | float DRW_viewport_near_distance_get(void); | 
					
						
							|  |  |  | float DRW_viewport_far_distance_get(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-12 12:10:01 +10:00
										 |  |  | const float *DRW_viewport_size_get(void); | 
					
						
							| 
									
										
										
										
											2018-03-13 22:38:07 +01:00
										 |  |  | const float *DRW_viewport_invert_size_get(void); | 
					
						
							| 
									
										
										
										
											2017-04-12 12:10:01 +10:00
										 |  |  | const float *DRW_viewport_screenvecs_get(void); | 
					
						
							|  |  |  | const float *DRW_viewport_pixelsize_get(void); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | bool DRW_viewport_is_persp_get(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | struct DefaultFramebufferList *DRW_viewport_framebuffer_list_get(void); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | struct DefaultTextureList *DRW_viewport_texture_list_get(void); | 
					
						
							| 
									
										
										
										
											2017-03-08 20:00:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-08 20:25:20 +02:00
										 |  |  | void DRW_viewport_request_redraw(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-29 12:01:07 +02:00
										 |  |  | void DRW_render_to_image(struct RenderEngine *engine, struct Depsgraph *depsgraph); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | void DRW_render_object_iter(void *vedata, | 
					
						
							|  |  |  |                             struct RenderEngine *engine, | 
					
						
							|  |  |  |                             struct Depsgraph *depsgraph, | 
					
						
							|  |  |  |                             void (*callback)(void *vedata, | 
					
						
							|  |  |  |                                              struct Object *ob, | 
					
						
							|  |  |  |                                              struct RenderEngine *engine, | 
					
						
							|  |  |  |                                              struct Depsgraph *depsgraph)); | 
					
						
							| 
									
										
										
										
											2018-02-14 18:59:15 +01:00
										 |  |  | void DRW_render_instance_buffer_finish(void); | 
					
						
							| 
									
										
										
										
											2018-09-17 11:53:43 +02:00
										 |  |  | void DRW_render_viewport_size_set(int size[2]); | 
					
						
							| 
									
										
										
										
											2018-01-29 14:56:16 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | void DRW_custom_pipeline(DrawEngineType *draw_engine_type, | 
					
						
							|  |  |  |                          struct Depsgraph *depsgraph, | 
					
						
							|  |  |  |                          void (*callback)(void *vedata, void *user_data), | 
					
						
							|  |  |  |                          void *user_data); | 
					
						
							| 
									
										
										
										
											2018-07-10 14:40:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-22 10:52:39 -02:00
										 |  |  | /* ViewLayers */ | 
					
						
							| 
									
										
										
										
											2017-11-29 11:00:50 +01:00
										 |  |  | void *DRW_view_layer_engine_data_get(DrawEngineType *engine_type); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | void **DRW_view_layer_engine_data_ensure_ex(struct ViewLayer *view_layer, | 
					
						
							|  |  |  |                                             DrawEngineType *engine_type, | 
					
						
							|  |  |  |                                             void (*callback)(void *storage)); | 
					
						
							|  |  |  | void **DRW_view_layer_engine_data_ensure(DrawEngineType *engine_type, | 
					
						
							|  |  |  |                                          void (*callback)(void *storage)); | 
					
						
							| 
									
										
										
										
											2017-05-30 22:28:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 14:14:55 +02:00
										 |  |  | /* DrawData */ | 
					
						
							|  |  |  | DrawData *DRW_drawdata_get(ID *ib, DrawEngineType *engine_type); | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | DrawData *DRW_drawdata_ensure(ID *id, | 
					
						
							|  |  |  |                               DrawEngineType *engine_type, | 
					
						
							|  |  |  |                               size_t size, | 
					
						
							|  |  |  |                               DrawDataInitCb init_cb, | 
					
						
							|  |  |  |                               DrawDataFreeCb free_cb); | 
					
						
							| 
									
										
										
										
											2019-05-07 20:56:20 +02:00
										 |  |  | void **DRW_duplidata_get(void *vedata); | 
					
						
							| 
									
										
										
										
											2017-04-03 19:01:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | /* Settings */ | 
					
						
							| 
									
										
										
										
											2018-10-08 10:43:34 +11:00
										 |  |  | bool DRW_object_is_renderable(const struct Object *ob); | 
					
						
							| 
									
										
										
										
											2018-12-18 18:18:00 +01:00
										 |  |  | int DRW_object_visibility_in_active_context(const struct Object *ob); | 
					
						
							| 
									
										
										
										
											2017-07-13 00:27:06 +10:00
										 |  |  | bool DRW_object_is_flat_normal(const struct Object *ob); | 
					
						
							| 
									
										
										
										
											2018-11-25 18:34:28 +03:00
										 |  |  | bool DRW_object_use_hide_faces(const struct Object *ob); | 
					
						
							| 
									
										
										
										
											2019-05-02 16:51:17 +02:00
										 |  |  | bool DRW_object_use_pbvh_drawing(const struct Object *ob); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  | bool DRW_object_is_visible_psys_in_active_context(const struct Object *object, | 
					
						
							|  |  |  |                                                   const struct ParticleSystem *psys); | 
					
						
							| 
									
										
										
										
											2018-05-09 16:55:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-26 15:23:16 +01:00
										 |  |  | struct Object *DRW_object_get_dupli_parent(const struct Object *ob); | 
					
						
							|  |  |  | struct DupliObject *DRW_object_get_dupli(const struct Object *ob); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | /* Draw commands */ | 
					
						
							|  |  |  | void DRW_draw_pass(DRWPass *pass); | 
					
						
							| 
									
										
										
										
											2017-06-26 20:42:58 +02:00
										 |  |  | void DRW_draw_pass_subset(DRWPass *pass, DRWShadingGroup *start_group, DRWShadingGroup *end_group); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-05 18:09:43 +01:00
										 |  |  | void DRW_draw_callbacks_pre_scene(void); | 
					
						
							|  |  |  | void DRW_draw_callbacks_post_scene(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-03 20:09:17 +10:00
										 |  |  | void DRW_state_reset_ex(DRWState state); | 
					
						
							| 
									
										
										
										
											2017-02-07 11:20:15 +01:00
										 |  |  | void DRW_state_reset(void); | 
					
						
							| 
									
										
										
										
											2018-03-01 17:14:35 +11:00
										 |  |  | void DRW_state_lock(DRWState state); | 
					
						
							| 
									
										
										
										
											2017-06-16 14:23:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-21 11:24:19 +11:00
										 |  |  | void DRW_state_clip_planes_len_set(uint plane_len); | 
					
						
							| 
									
										
										
										
											2017-06-16 14:23:30 +02:00
										 |  |  | void DRW_state_clip_planes_reset(void); | 
					
						
							| 
									
										
										
										
											2019-01-21 23:51:34 +11:00
										 |  |  | void DRW_state_clip_planes_set_from_rv3d(struct RegionView3D *rv3d); | 
					
						
							| 
									
										
										
										
											2017-06-16 14:23:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-08 17:54:14 +01:00
										 |  |  | /* Culling, return true if object is inside view frustum. */ | 
					
						
							|  |  |  | bool DRW_culling_sphere_test(BoundSphere *bsphere); | 
					
						
							|  |  |  | bool DRW_culling_box_test(BoundBox *bbox); | 
					
						
							| 
									
										
										
										
											2018-05-03 15:43:42 +02:00
										 |  |  | bool DRW_culling_plane_test(float plane[4]); | 
					
						
							| 
									
										
										
										
											2018-03-08 17:54:14 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-26 22:28:35 +02:00
										 |  |  | void DRW_culling_frustum_corners_get(BoundBox *corners); | 
					
						
							| 
									
										
										
										
											2018-06-04 17:33:25 +02:00
										 |  |  | void DRW_culling_frustum_planes_get(float planes[6][4]); | 
					
						
							| 
									
										
										
										
											2018-05-26 22:28:35 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-26 16:11:37 +10:00
										 |  |  | /* Selection */ | 
					
						
							| 
									
										
										
										
											2018-05-11 07:48:52 +02:00
										 |  |  | void DRW_select_load_id(uint id); | 
					
						
							| 
									
										
										
										
											2017-04-26 16:11:37 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-27 02:04:56 +10:00
										 |  |  | /* Draw State */ | 
					
						
							|  |  |  | void DRW_state_dfdy_factors_get(float dfdyfac[2]); | 
					
						
							|  |  |  | bool DRW_state_is_fbo(void); | 
					
						
							|  |  |  | bool DRW_state_is_select(void); | 
					
						
							| 
									
										
										
										
											2017-04-28 04:33:58 +10:00
										 |  |  | bool DRW_state_is_depth(void); | 
					
						
							| 
									
										
										
										
											2017-06-20 18:33:58 +02:00
										 |  |  | bool DRW_state_is_image_render(void); | 
					
						
							|  |  |  | bool DRW_state_is_scene_render(void); | 
					
						
							| 
									
										
										
										
											2018-02-16 16:52:08 +01:00
										 |  |  | bool DRW_state_is_opengl_render(void); | 
					
						
							| 
									
										
										
										
											2018-12-04 15:39:30 +01:00
										 |  |  | bool DRW_state_is_playback(void); | 
					
						
							| 
									
										
										
										
											2017-04-28 04:33:58 +10:00
										 |  |  | bool DRW_state_show_text(void); | 
					
						
							| 
									
										
										
										
											2017-07-03 16:16:24 +02:00
										 |  |  | bool DRW_state_draw_support(void); | 
					
						
							| 
									
										
										
										
											2017-12-20 15:28:12 -02:00
										 |  |  | bool DRW_state_draw_background(void); | 
					
						
							| 
									
										
										
										
											2017-04-28 04:33:58 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-26 00:35:08 +10:00
										 |  |  | /* Avoid too many lookups while drawing */ | 
					
						
							|  |  |  | typedef struct DRWContextState { | 
					
						
							| 
									
										
										
										
											2018-02-06 16:10:03 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   struct ARegion *ar;        /* 'CTX_wm_region(C)' */ | 
					
						
							|  |  |  |   struct RegionView3D *rv3d; /* 'CTX_wm_region_view3d(C)' */ | 
					
						
							|  |  |  |   struct View3D *v3d;        /* 'CTX_wm_view3d(C)' */ | 
					
						
							| 
									
										
										
										
											2017-04-26 00:35:08 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   struct Scene *scene;          /* 'CTX_data_scene(C)' */ | 
					
						
							|  |  |  |   struct ViewLayer *view_layer; /* 'CTX_data_view_layer(C)' */ | 
					
						
							| 
									
										
										
										
											2017-04-26 00:35:08 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /* Use 'object_edit' for edit-mode */ | 
					
						
							|  |  |  |   struct Object *obact; /* 'OBACT' */ | 
					
						
							| 
									
										
										
										
											2017-05-17 11:03:09 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   struct RenderEngineType *engine_type; | 
					
						
							| 
									
										
										
										
											2017-10-16 17:15:03 -02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   struct Depsgraph *depsgraph; | 
					
						
							| 
									
										
										
										
											2018-01-16 15:42:03 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   eObjectMode object_mode; | 
					
						
							| 
									
										
										
										
											2018-02-06 16:10:03 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   eGPUShaderConfig sh_cfg; | 
					
						
							| 
									
										
										
										
											2019-01-23 13:21:49 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /** Last resort (some functions take this as an arg so we can't easily avoid).
 | 
					
						
							|  |  |  |    * May be NULL when used for selection or depth buffer. */ | 
					
						
							|  |  |  |   const struct bContext *evil_C; | 
					
						
							| 
									
										
										
										
											2018-02-06 16:10:03 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /* ---- */ | 
					
						
							| 
									
										
										
										
											2018-02-13 18:15:47 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /* Cache: initialized by 'drw_context_state_init'. */ | 
					
						
							|  |  |  |   struct Object *object_pose; | 
					
						
							|  |  |  |   struct Object *object_edit; | 
					
						
							| 
									
										
										
										
											2018-02-09 02:31:09 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-26 00:35:08 +10:00
										 |  |  | } DRWContextState; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const DRWContextState *DRW_context_state_get(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-22 18:52:07 +01:00
										 |  |  | #endif /* __DRW_RENDER_H__ */
 |