diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate_private.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate_private.hh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate_private.hh b/source/blender/gpu/intern/gpu_immediate_private.hh index 38db8131942..9fcbe2bdc0b 100644 --- a/source/blender/gpu/intern/gpu_immediate_private.hh +++ b/source/blender/gpu/intern/gpu_immediate_private.hh @@ -47,7 +47,7 @@ class Immediate { /** Current draw call specification. */ GPUPrimType prim_type = GPU_PRIM_NONE; - GPUVertFormat vertex_format; + GPUVertFormat vertex_format = {}; GPUShader *shader = NULL; /** Enforce strict vertex count (disabled when using immBeginAtMost). */ bool strict_vertex_len = true; @@ -55,6 +55,15 @@ class Immediate { /** Batch in construction when using immBeginBatch. */ GPUBatch *batch = NULL; + /** Wide Line workaround. */ + + /** Previously bound shader to restore after drawing. */ + GPUShader *prev_shader = NULL; + /** Builtin shader index. Used to test if the workaround can be done. */ + eGPUBuiltinShader builtin_shader_bound = GPU_SHADER_TEXT; + /** Uniform color: Kept here to update the wideline shader just before immBegin. */ + float uniform_color[4]; + public: Immediate(){}; virtual ~Immediate(){}; @@ -66,4 +75,4 @@ class Immediate { } // namespace blender::gpu void immActivate(void); -void immDeactivate(void);
\ No newline at end of file +void immDeactivate(void); |