Method: MiniGL::GameWindow#clear

Defined in:
lib/minigl/global.rb

#clear(color) ⇒ Object

Draws a rectangle with the size of the entire screen, in the given color.

Parameters:

color

Color of the rectangle to be drawn, in hexadecimal RRGGBB format.



236
237
238
239
240
241
242
# File 'lib/minigl/global.rb', line 236

def clear(color)
  color |= 0xff000000
  draw_quad 0, 0, color,
            width, 0, color,
            width, height, color,
            0, height, color, 0
end