diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-24 09:12:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-24 09:12:06 +0300 |
commit | 11428e0b7f7aafd3c6fa6b0cd0a77f4c1ff8e48c (patch) | |
tree | 95ac27ca3b90c0297296f7251948efbc72af1f71 /source/blender/draw/intern/DRW_render.h | |
parent | 4d29312c66dd56498fbab35e2892944d33484461 (diff) |
DRW: use clipping for depth buffer
Object selection now supports clipping.
Diffstat (limited to 'source/blender/draw/intern/DRW_render.h')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 22d740bd512..395d9483deb 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -94,6 +94,16 @@ typedef struct BoundSphere { float center[3], radius; } BoundSphere; +/** + * Support selecting shaders with different options compiled in. + * Needed for clipping support because it means using a separate set of shaders. + */ +typedef enum eDRW_ShaderSlot { + DRW_SHADER_SLOT_DEFAULT = 0, + DRW_SHADER_SLOT_CLIPPED = 1, +} eDRW_ShaderSlot; +#define DRW_SHADER_SLOT_LEN 2 + /* declare members as empty (unused) */ typedef char DRWViewportEmptyList; @@ -259,7 +269,7 @@ struct GPUShader *DRW_shader_create_with_transform_feedback( struct GPUShader *DRW_shader_create_2D(const char *frag, const char *defines); struct GPUShader *DRW_shader_create_3D(const char *frag, const char *defines); struct GPUShader *DRW_shader_create_fullscreen(const char *frag, const char *defines); -struct GPUShader *DRW_shader_create_3D_depth_only(void); +struct GPUShader *DRW_shader_create_3D_depth_only(eDRW_ShaderSlot slot); 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( @@ -571,16 +581,6 @@ bool DRW_state_show_text(void); bool DRW_state_draw_support(void); bool DRW_state_draw_background(void); -/** - * Support selecting shaders with different options compiled in. - * Needed for clipping support because it means using a separate set of shaders. - */ -typedef enum eDRW_ShaderSlot { - DRW_SHADER_SLOT_DEFAULT = 0, - DRW_SHADER_SLOT_CLIPPED = 1, -} eDRW_ShaderSlot; -#define DRW_SHADER_SLOT_LEN 2 - /* Avoid too many lookups while drawing */ typedef struct DRWContextState { |