Use onWindowCreate() instead of init(), fix support for multiple GL windows, use window.renderer instead of currentRenderer

This commit is contained in:
Joshua Granick
2015-08-20 13:39:53 -07:00
parent f79a73fa47
commit 56c0872b8a
11 changed files with 104 additions and 54 deletions

View File

@@ -27,7 +27,7 @@ class WindowTest {
var window = new Window ();
Assert.isNull (window.currentRenderer);
Assert.isNull (window.renderer);
Assert.isNull (window.config);
Assert.isFalse (window.fullscreen);
Assert.areEqual (0, window.height);
@@ -37,7 +37,7 @@ class WindowTest {
app.createWindow (window);
Assert.isNotNull (window.currentRenderer);
Assert.isNotNull (window.renderer);
Assert.isNull (window.config);
#if !html5
@@ -70,7 +70,7 @@ class WindowTest {
window.width = 400;
window.height = 300;
Assert.isNull (window.currentRenderer);
Assert.isNull (window.renderer);
Assert.isNull (window.config);
Assert.isFalse (window.fullscreen);
Assert.areEqual (300, window.height);
@@ -80,7 +80,7 @@ class WindowTest {
app.createWindow (window);
Assert.isNotNull (window.currentRenderer);
Assert.isNotNull (window.renderer);
Assert.isNull (window.config);
Assert.isFalse (window.fullscreen);
Assert.areEqual (300, window.height);
@@ -104,7 +104,7 @@ class WindowTest {
var config = {};
var window = new Window (config);
Assert.isNull (window.currentRenderer);
Assert.isNull (window.renderer);
Assert.areEqual (config, window.config);
Assert.isFalse (window.fullscreen);
Assert.areEqual (0, window.height);
@@ -114,7 +114,7 @@ class WindowTest {
app.createWindow (window);
Assert.isNotNull (window.currentRenderer);
Assert.isNotNull (window.renderer);
Assert.areEqual (config, window.config);
#if !html5
@@ -143,7 +143,7 @@ class WindowTest {
var config = { width: 400, height: 300 };
var window = new Window (config);
Assert.isNull (window.currentRenderer);
Assert.isNull (window.renderer);
Assert.areEqual (config, window.config);
Assert.isFalse (window.fullscreen);
Assert.areEqual (300, window.height);
@@ -153,7 +153,7 @@ class WindowTest {
app.createWindow (window);
Assert.isNotNull (window.currentRenderer);
Assert.isNotNull (window.renderer);
Assert.areEqual (config, window.config);
Assert.isFalse (window.fullscreen);
Assert.areEqual (300, window.height);