Tidying constructor calls and passing nmegl reference through ready instead for now

This commit is contained in:
underscorediscovery
2013-06-23 15:20:41 -02:30
parent 7911fae295
commit edf15b6806
4 changed files with 10 additions and 17 deletions

View File

@@ -97,16 +97,12 @@ class Main {
private var startTime:Dynamic;
private var vertexPosition:Dynamic;
public function new( _nmegl : NMEGL) {
public function new() {}
lib = _nmegl;
//NOTE : You cannot do anything before creating the actual window, which will call ready() for you when it is done
}
public function ready() {
public function ready( _nmegl : NMEGL ) {
lib = _nmegl;
// Init the shaders and view
init();

View File

@@ -27,15 +27,12 @@ class Main {
private var red_direction : Int = 1;
public function new( _nmegl : NMEGL) {
public function new() { }
lib = _nmegl;
public function ready( _nmegl : NMEGL ) {
//NOTE : You cannot do anything before creating the actual window, which will call ready() for you when it is done
}
public function ready() {
//Store a reference
lib = _nmegl;
// Init the shaders and view
init();