comparison src/gl-render.h @ 12324:85934e0fcce9

gl-renderer.cc and gl2ps-renderer.cc: access objects directly from gh_manager instead of working with handles
author John W. Eaton <jwe@octave.org>
date Tue, 01 Feb 2011 16:25:15 -0500
parents 6ba28900706b
children 2ad37783bf01
comparison
equal deleted inserted replaced
12323:c8da31f12c1d 12324:85934e0fcce9
57 #endif 57 #endif
58 { } 58 { }
59 59
60 virtual ~opengl_renderer (void) { } 60 virtual ~opengl_renderer (void) { }
61 61
62 virtual void draw (const graphics_handle& h)
63 { draw (gh_manager::get_object (h)); }
64
65 virtual void draw (const graphics_object& go); 62 virtual void draw (const graphics_object& go);
66 63
67 virtual void draw (const Matrix& hlist) 64 virtual void draw (const Matrix& hlist)
68 { 65 {
69 int len = hlist.length (); 66 int len = hlist.length ();
70 67
71 for (int i = len-1; i >= 0; i--) 68 for (int i = len-1; i >= 0; i--)
72 { 69 {
73 graphics_handle h = gh_manager::lookup (hlist(i)); 70 graphics_object obj = gh_manager::get_object (hlist(i));
74 71
75 if (h.ok ()) 72 if (obj)
76 draw (h); 73 draw (obj);
77 } 74 }
78 } 75 }
79 76
80 virtual void set_viewport (int w, int h); 77 virtual void set_viewport (int w, int h);
81 virtual graphics_xform get_transform (void) const { return xform; } 78 virtual graphics_xform get_transform (void) const { return xform; }