From e4d856e31b2719c8ab9796495c1ac7aa48870246 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 27 Apr 2017 14:32:47 -0400 Subject: OpenGL: manage legacy state only when WITH_LEGACY_OPENGL=ON - enabled lights - alpha test - texture environment - point sprites (always enabled in modern GL) Moved is_clip_plane for better struct packing, no functional change there. Part of T51164 --- source/blender/gpu/GPU_draw.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/blender/gpu/GPU_draw.h') diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index f6bfada7fd8..cd305d5697f 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -187,13 +187,10 @@ typedef struct GPUStateValues eGPUStateMask mask; /* GL_ENABLE_BIT */ - unsigned int is_alpha_test : 1; unsigned int is_blend : 1; - bool is_clip_plane[6]; unsigned int is_cull_face : 1; unsigned int is_depth_test : 1; unsigned int is_dither : 1; - bool is_light[8]; unsigned int is_lighting : 1; unsigned int is_line_smooth : 1; unsigned int is_color_logic_op : 1; @@ -205,6 +202,13 @@ typedef struct GPUStateValues unsigned int is_scissor_test : 1; unsigned int is_stencil_test : 1; +#ifdef WITH_LEGACY_OPENGL + unsigned int is_alpha_test : 1; + bool is_light[8]; +#endif + + bool is_clip_plane[6]; + /* GL_DEPTH_BUFFER_BIT */ /* unsigned int is_depth_test : 1; */ int depth_func; -- cgit v1.2.3