Class: Budgie::DrawMap
- Inherits:
-
DrawPickerMap
- Object
- DrawPickerMap
- Budgie::DrawMap
- Defined in:
- lib/budgie/draw_map.rb
Instance Attribute Summary
Attributes inherited from DrawPickerMap
Instance Method Summary collapse
- #cube_color(x, y, z, index) ⇒ Object
-
#initialize(map, palette) ⇒ DrawMap
constructor
A new instance of DrawMap.
Methods inherited from DrawPickerMap
#compile, #draw, #update_partial
Methods included from Index
Constructor Details
#initialize(map, palette) ⇒ DrawMap
Returns a new instance of DrawMap.
4 5 6 7 |
# File 'lib/budgie/draw_map.rb', line 4 def initialize(map, palette) @palette = palette super map end |
Instance Method Details
#cube_color(x, y, z, index) ⇒ Object
9 10 11 12 13 |
# File 'lib/budgie/draw_map.rb', line 9 def cube_color(x, y, z, index) @palette.rgb(index) do |r, g, b| glColor3ub r, g, b end end |