class GameOfLife::Client

Defined in:

game_of_life/client.cr

Constant Summary

CELL_MODEL = Float32[0.0_f32, 1.0_f32, 0.0_f32, 0.0_f32, 0.0_f32, 0.0_f32, 0.0_f32, 1.0_f32, 1.0_f32, 0.0_f32, 1.0_f32, 1.0_f32, 1.0_f32, 0.0_f32, 1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32, 0.0_f32, 0.0_f32, 1.0_f32, 0.0_f32, 0.0_f32]
FRAGMENT_CELLS = read_shader("resources/cell/fragment.glsl")
FRAGMENT_CURSOR = read_shader("resources/cursor/fragment.glsl")
MAX_TICK_RATE = 500
MIN_TICK_RATE = 1
TEXTURE_CURSOR = read_texture("resources/cursor/cursor.png")
VERTEX_CELLS = read_shader("resources/cell/vertex.glsl")
VERTEX_CURSOR = read_shader("resources/cursor/vertex.glsl")

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Macro Detail

macro read_shader(path) #

[View source]
macro read_texture(path) #

[View source]

Instance Method Detail

def cursor_cell_position #

[View source]
def finalize #

[View source]
def generate_cells_mesh(cells) #

[View source]
def generate_cursor_mesh(cell_x : Float32, cell_y : Float32) #

[View source]
def start #

[View source]
def update_buffer(mesh) #

[View source]
def update_view_position(mouse_x : Float32, mouse_y : Float32) #

[View source]
def use_programs(*shader_programs, &) #

[View source]
def zoom_level_normalized #

[View source]