diff libinterp/corefcn/gl-render.h @ 21459:385b67d48dda

Don't enable opengl lighting when no light object is present (bug #42006) * gl_render.h: Add private bool property has_light to opengl_renderer to indicate whether a light object is present and visible in the current axes. * gl_render.cc (draw_axes_children): Set value of has_ligh before drawing any children object. * gl_render.cc (draw_patch, draw_surface): Enable lighting for patch and surface objects only if has_light is true. * contributors.in: add contributor
author mmuetzel <markus.muetzel@gmx.de>
date Tue, 15 Mar 2016 13:46:22 +0100
parents e4fc19d8c6c3
children 2aef506f3fec
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.h	Wed Mar 16 20:52:55 2016 -0700
+++ b/libinterp/corefcn/gl-render.h	Tue Mar 15 13:46:22 2016 +0100
@@ -191,6 +191,9 @@
 
   text_renderer txt_renderer;
 
+  // light object present and visible
+  bool has_light;
+
 private:
   class patch_tesselator;
 };