Tidying constructor calls and passing nmegl reference through ready instead for now
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user