Skip to content

Commit 339af60

Browse files
Fix typo in WEBGL_lose_context causing it not to be detected
1 parent ffb05a8 commit 339af60

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

webgl4j/src/main/java/com/shc/webgl4j/client/WEBGL_lose_context.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ public static boolean isSupported()
4646
{
4747
switch (supportedExtension)
4848
{
49-
case "WEBGL_lost_context":
50-
case "O_WEBGL_lost_context":
51-
case "IE_WEBGL_lost_context":
52-
case "MOZ_WEBGL_lost_context":
53-
case "WEBKIT_WEBGL_lost_context":
49+
case "WEBGL_lose_context":
50+
case "O_WEBGL_lose_context":
51+
case "IE_WEBGL_lose_context":
52+
case "MOZ_WEBGL_lose_context":
53+
case "WEBKIT_WEBGL_lose_context":
5454
return true;
5555
}
5656
}
@@ -64,7 +64,7 @@ public static void enableExtension()
6464
throw new IllegalStateException("You must have a WebGL context >= 1.0 to enable this extension.");
6565

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

6969
if (!isExtensionEnabled())
7070
nEnableExtension();
@@ -96,11 +96,11 @@ public static native boolean isExtensionEnabled() /*-{
9696
}-*/;
9797

9898
private static native void nEnableExtension() /*-{
99-
$wnd.gl.wlc_ext = $wnd.gl.getExtension('WEBGL_lost_context') ||
100-
$wnd.gl.getExtension('O_WEBGL_lost_context') ||
101-
$wnd.gl.getExtension('IE_WEBGL_lost_context') ||
102-
$wnd.gl.getExtension('MOZ_WEBGL_lost_context') ||
103-
$wnd.gl.getExtension('WEBKIT_WEBGL_lost_context');
99+
$wnd.gl.wlc_ext = $wnd.gl.getExtension('WEBGL_lose_context') ||
100+
$wnd.gl.getExtension('O_WEBGL_lose_context') ||
101+
$wnd.gl.getExtension('IE_WEBGL_lose_context') ||
102+
$wnd.gl.getExtension('MOZ_WEBGL_lose_context') ||
103+
$wnd.gl.getExtension('WEBKIT_WEBGL_lose_context');
104104
}-*/;
105105

106106
private static native void nglLoseContext() /*-{

0 commit comments

Comments
 (0)