aboutsummaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rwxr-xr-xsrc/net/java/games/jogl/GLContext.java3
-rw-r--r--src/net/java/games/jogl/GLJPanel.java13
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java4
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsGLContext.java4
-rw-r--r--src/net/java/games/jogl/impl/x11/X11GLContext.java4
5 files changed, 24 insertions, 4 deletions
diff --git a/src/net/java/games/jogl/GLContext.java b/src/net/java/games/jogl/GLContext.java
index 18b94bc96..e784e1de1 100755
--- a/src/net/java/games/jogl/GLContext.java
+++ b/src/net/java/games/jogl/GLContext.java
@@ -50,8 +50,7 @@ public abstract class GLContext {
* Returns the GLDrawable to which this context may be used to
* draw.
*/
- // FIXME
- // public abstract GLDrawable getGLDrawable();
+ public abstract GLDrawable getGLDrawable();
/**
* Makes this GLContext current on the calling thread.
diff --git a/src/net/java/games/jogl/GLJPanel.java b/src/net/java/games/jogl/GLJPanel.java
index c094c8946..f07a79902 100644
--- a/src/net/java/games/jogl/GLJPanel.java
+++ b/src/net/java/games/jogl/GLJPanel.java
@@ -77,7 +77,7 @@ import net.java.games.jogl.impl.*;
methods as side-effect-free as possible.
*/
-public final class GLJPanel extends JPanel implements GLAutoDrawable {
+public class GLJPanel extends JPanel implements GLAutoDrawable {
protected static final boolean DEBUG = Debug.debug("GLJPanel");
protected static final boolean VERBOSE = Debug.verbose();
@@ -127,7 +127,16 @@ public final class GLJPanel extends JPanel implements GLAutoDrawable {
private int[] skippixels = new int[1];
private int[] alignment = new int[1];
- GLJPanel(GLCapabilities capabilities, GLCapabilitiesChooser chooser, GLContext shareWith) {
+ /** Creates a new GLJPanel component. The passed GLCapabilities must
+ be non-null and specifies the OpenGL capabilities for the
+ component. The GLCapabilitiesChooser must be non-null and
+ specifies the algorithm for selecting one of the available
+ GLCapabilities for the component; the GLDrawableFactory uses a
+ DefaultGLCapabilitesChooser if the user does not provide
+ one. The passed GLContext may be null and specifies an OpenGL
+ context with which to share textures, display lists and other
+ OpenGL state. */
+ protected GLJPanel(GLCapabilities capabilities, GLCapabilitiesChooser chooser, GLContext shareWith) {
super();
// Works around problems on many vendors' cards; we don't need a
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
index 039194f9a..bd1253cc4 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
@@ -64,6 +64,10 @@ public abstract class MacOSXGLContext extends GLContextImpl
return new MacOSXGLImpl(this);
}
+ public GLDrawable getGLDrawable() {
+ return drawable;
+ }
+
protected String mapToRealGLFunctionName(String glFunctionName)
{
return glFunctionName;
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
index 532483c68..cfad7f3ac 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
@@ -75,6 +75,10 @@ public class WindowsGLContext extends GLContextImpl {
return new WindowsGLImpl(this);
}
+ public GLDrawable getGLDrawable() {
+ return drawable;
+ }
+
protected String mapToRealGLFunctionName(String glFunctionName) {
String lookup = (String) functionNameMap.get(glFunctionName);
if (lookup != null) {
diff --git a/src/net/java/games/jogl/impl/x11/X11GLContext.java b/src/net/java/games/jogl/impl/x11/X11GLContext.java
index 97f1b3593..451997a73 100644
--- a/src/net/java/games/jogl/impl/x11/X11GLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11GLContext.java
@@ -76,6 +76,10 @@ public abstract class X11GLContext extends GLContextImpl {
return new X11GLImpl(this);
}
+ public GLDrawable getGLDrawable() {
+ return drawable;
+ }
+
protected String mapToRealGLFunctionName(String glFunctionName) {
String lookup = (String) functionNameMap.get(glFunctionName);
if (lookup != null) {