Class: Budgie::DrawMap

Inherits:
DrawPickerMap show all
Defined in:
lib/budgie/draw_map.rb

Instance Attribute Summary

Attributes inherited from DrawPickerMap

#map, #partial_size

Instance Method Summary collapse

Methods inherited from DrawPickerMap

#compile, #draw, #update_partial

Methods included from Index

#from_index, #to_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