diff options
author | Sven Gothel <[email protected]> | 2001-02-13 05:32:07 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2001-02-13 05:32:07 +0000 |
commit | 3e2b16a820bfe03f8f3837c3aaa615c8c4b7f18c (patch) | |
tree | d834a05eb37751b4c95045c3021589f2e22fcd9f /demos/HodglimsNeHe/Lesson7.java | |
parent | 91bc9d109b2d16e6d42f1fbcc9d3dbca51c40b69 (diff) |
JAWT Support JDK >=1.3
Diffstat (limited to 'demos/HodglimsNeHe/Lesson7.java')
-rw-r--r-- | demos/HodglimsNeHe/Lesson7.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/demos/HodglimsNeHe/Lesson7.java b/demos/HodglimsNeHe/Lesson7.java index d6f65f4..a19a016 100644 --- a/demos/HodglimsNeHe/Lesson7.java +++ b/demos/HodglimsNeHe/Lesson7.java @@ -351,6 +351,7 @@ public class Lesson7 extends Applet //Swap buffers
glj.gljSwap();
+ glj.gljFree();
}
// Methods required for the implementation of MouseListener
@@ -396,6 +397,10 @@ public class Lesson7 extends Applet */
public void keyPressed(KeyEvent e)
{
+ //Ensure GL is initialised correctly
+ if (glj.gljMakeCurrent(true) == false)
+ return;
+
switch(e.getKeyCode())
{
//Switch ON/OFF light when L is pressed
@@ -473,6 +478,8 @@ public class Lesson7 extends Applet break;
}
}
+ glj.gljFree();
+
}
|