aboutsummaryrefslogtreecommitdiffstats
path: root/gl4java/drawable
diff options
context:
space:
mode:
Diffstat (limited to 'gl4java/drawable')
-rw-r--r--gl4java/drawable/GLDrawable.java35
-rwxr-xr-xgl4java/drawable/SunJDK13GLDrawableFactory.java17
-rw-r--r--gl4java/drawable/X11SunJDK13GLDrawableFactory.java2
3 files changed, 47 insertions, 7 deletions
diff --git a/gl4java/drawable/GLDrawable.java b/gl4java/drawable/GLDrawable.java
index 1710e3a..73004b2 100644
--- a/gl4java/drawable/GLDrawable.java
+++ b/gl4java/drawable/GLDrawable.java
@@ -1,5 +1,6 @@
package gl4java.drawable;
+import java.awt.Dimension;
import java.awt.event.*;
import java.util.EventListener;
@@ -98,6 +99,40 @@ public interface GLDrawable
public void repaint();
/**
+ * This function returns, if everything is init: the GLContext,
+ * the and the users init function
+ * This value is set in the paint method!
+ *
+ * @return boolean
+ *
+ * @see gl4java.awt.GLCanvas#paint
+ * @see gl4java.awt.GLCanvas#init
+ */
+ public boolean cvsIsInit();
+
+ /**
+ * You should call this before releasing/dispose this Window !
+ * Also you can overwrite this class,
+ * to dispose your own elements, e.g. a Frame etc. -
+ * but be shure that you call
+ * cvsDispose implementation call this one !
+ *
+ * This function calls gljDestroy of GLContext !
+ *
+ * Be sure to implement finalize,
+ * which should call this one !!
+ *
+ * @see gl4java.GLContext#gljDestroy
+ * @see gl4java.drawable.GLEventListener#cleanup
+ */
+ public void cvsDispose();
+
+ /**
+ * this function returns the current size of the object
+ */
+ public Dimension getSize();
+
+ /**
* the components listener's should be implemented also !
* since JDK 1.1
*/
diff --git a/gl4java/drawable/SunJDK13GLDrawableFactory.java b/gl4java/drawable/SunJDK13GLDrawableFactory.java
index bc707d8..cb74edb 100755
--- a/gl4java/drawable/SunJDK13GLDrawableFactory.java
+++ b/gl4java/drawable/SunJDK13GLDrawableFactory.java
@@ -62,13 +62,18 @@ public abstract class SunJDK13GLDrawableFactory extends GLDrawableFactory {
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice());
}
- //----------------------------------------------------------------------
- // Internals only below this point
- //
+ /** Returns the GraphicsConfiguration most closely matching the
+ specified set of GLCapabilities and your given device !
+ Return null if there was no matching visual.
- /** The choice of the GraphicsDevice is not yet exported to
- clients. */
- abstract GraphicsConfiguration
+ @param capabilities the requested set of OpenGL capabilities of
+ the canvas
+ @param device the used GraphicsDevice,
+ e.g. usefull for FullScreen mode !
+ @return a GraphicsConfiguration supporting the set of specified capabilities,
+ or null if there was no matching visual
+ */
+ public abstract GraphicsConfiguration
getGraphicsConfiguration(GLCapabilities capabilities,
GraphicsDevice device);
}
diff --git a/gl4java/drawable/X11SunJDK13GLDrawableFactory.java b/gl4java/drawable/X11SunJDK13GLDrawableFactory.java
index 52ce5ec..3e4657e 100644
--- a/gl4java/drawable/X11SunJDK13GLDrawableFactory.java
+++ b/gl4java/drawable/X11SunJDK13GLDrawableFactory.java
@@ -59,7 +59,7 @@ public class X11SunJDK13GLDrawableFactory
public X11SunJDK13GLDrawableFactory() { }
- GraphicsConfiguration
+ public GraphicsConfiguration
getGraphicsConfiguration(GLCapabilities capabilities,
GraphicsDevice device)
{