Skip to content

Commit

Permalink
Fix typo in WEBGL_lose_context causing it not to be detected
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharshachilakapati committed Oct 22, 2015
1 parent ffb05a8 commit 339af60
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public static boolean isSupported()
{
switch (supportedExtension)
{
case "WEBGL_lost_context":
case "O_WEBGL_lost_context":
case "IE_WEBGL_lost_context":
case "MOZ_WEBGL_lost_context":
case "WEBKIT_WEBGL_lost_context":
case "WEBGL_lose_context":
case "O_WEBGL_lose_context":
case "IE_WEBGL_lose_context":
case "MOZ_WEBGL_lose_context":
case "WEBKIT_WEBGL_lose_context":
return true;
}
}
Expand All @@ -64,7 +64,7 @@ public static void enableExtension()
throw new IllegalStateException("You must have a WebGL context >= 1.0 to enable this extension.");

if (!isSupported())
throw new RuntimeException("This browser does not support the WEBGL_lost_context extension.");
throw new RuntimeException("This browser does not support the WEBGL_lose_context extension.");

if (!isExtensionEnabled())
nEnableExtension();
Expand Down Expand Up @@ -96,11 +96,11 @@ public static native boolean isExtensionEnabled() /*-{
}-*/;

private static native void nEnableExtension() /*-{
$wnd.gl.wlc_ext = $wnd.gl.getExtension('WEBGL_lost_context') ||
$wnd.gl.getExtension('O_WEBGL_lost_context') ||
$wnd.gl.getExtension('IE_WEBGL_lost_context') ||
$wnd.gl.getExtension('MOZ_WEBGL_lost_context') ||
$wnd.gl.getExtension('WEBKIT_WEBGL_lost_context');
$wnd.gl.wlc_ext = $wnd.gl.getExtension('WEBGL_lose_context') ||
$wnd.gl.getExtension('O_WEBGL_lose_context') ||
$wnd.gl.getExtension('IE_WEBGL_lose_context') ||
$wnd.gl.getExtension('MOZ_WEBGL_lose_context') ||
$wnd.gl.getExtension('WEBKIT_WEBGL_lose_context');
}-*/;

private static native void nglLoseContext() /*-{
Expand Down

0 comments on commit 339af60

Please sign in to comment.