Mercurial > octave
comparison libinterp/corefcn/gl-render.h @ 22192:20b225a3ebf8
Update to light (patch #8943)
* gl-render.h, gl-render.cc (get_maxlights): New static function.
(opengl_renderer::max_lights): New data member.
(opengl_renderer::opengl_renderer): Use get_maxlights to initialize
max_lights data member.
(opengl_renderer::draw_all_lights): New function. Support local
light sources.
(opengl_renderer::draw_axes_children): Call draw_all_lights instead
of doing the work here.
(opengl_renderer::draw_surface): Remove warning for "phong".
* scripts/plot/draw/light.m: Update docstring. Add and update demos.
* doc/interpreter/genpropdoc.m: Update docstring.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 23 Jul 2016 17:45:32 +0200 |
parents | 6780a8657be3 |
children | bac0d6f07a3e |
comparison
equal
deleted
inserted
replaced
22191:8971508e21c8 | 22192:20b225a3ebf8 |
---|---|
167 void draw_axes_y_grid (const axes::properties& props); | 167 void draw_axes_y_grid (const axes::properties& props); |
168 void draw_axes_z_grid (const axes::properties& props); | 168 void draw_axes_z_grid (const axes::properties& props); |
169 | 169 |
170 void draw_axes_children (const axes::properties& props); | 170 void draw_axes_children (const axes::properties& props); |
171 | 171 |
172 void draw_all_lights (const base_properties& props, std::list<graphics_object>& obj_list); | |
173 | |
172 private: | 174 private: |
173 // The graphics toolkit associated with the figure being rendered. | 175 // The graphics toolkit associated with the figure being rendered. |
174 graphics_toolkit toolkit; | 176 graphics_toolkit toolkit; |
175 | 177 |
176 // axes transformation data | 178 // axes transformation data |
196 text_renderer txt_renderer; | 198 text_renderer txt_renderer; |
197 | 199 |
198 // light object present and visible | 200 // light object present and visible |
199 int num_lights; | 201 int num_lights; |
200 unsigned int current_light; | 202 unsigned int current_light; |
203 int max_lights; | |
201 | 204 |
202 private: | 205 private: |
203 class patch_tesselator; | 206 class patch_tesselator; |
204 }; | 207 }; |
205 | 208 |