Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11940/src/java/org/lwjgl/opengl
Modified Files:
AWTGLCanvas.java
Log Message:
Added initGL to AWTGLCanvas
Index: AWTGLCanvas.java
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- AWTGLCanvas.java 12 May 2005 15:45:53 -0000 1.14
+++ AWTGLCanvas.java 28 Dec 2005 22:23:35 -0000 1.15
@@ -229,6 +229,14 @@
}
/**
+ * Override this to do initialising of the context.
+ * It will be called once from paint(), immediately after
+ * the context is created.
+ */
+ protected void initGL() {
+ }
+
+ /**
* Override this to do painting
*/
protected void paintGL() {
@@ -246,6 +254,8 @@
try {
if (context == null) {
this.context = new Context(peer_info, drawable != null ? drawable.getContext() : null);
+ context.makeCurrent();
+ initGL();
}
if (!context.isCurrent())
context.makeCurrent();
|