Reorganising classes and structure, changing how render and update loops are accessed for clarity and better code

This commit is contained in:
underscorediscovery
2013-06-23 03:16:12 -02:30
parent 9d6eae9c02
commit 7911fae295
10 changed files with 53 additions and 72 deletions

View File

@@ -40,13 +40,10 @@ class Main {
// Init the shaders and view
init();
//Tell it to let us draw here
lib.set_render_function( on_render );
lib.set_update_function( on_update );
}
public function on_update() {
//called each frame by NMEGL for logic (called before render)
//Called each frame by NMEGL for logic (called before render)
public function update() {
//an awful magic number to change the value slowly
@@ -62,7 +59,8 @@ class Main {
}
public function on_render() {
//Called by NMEGL
public function render() {
//Set the viewport for GL
GL.viewport( 0, 0, lib.config.width, lib.config.height );