diff options
author | Kenneth Russel <[email protected]> | 2009-03-19 00:32:21 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2009-03-19 00:32:21 +0000 |
commit | c4cd0db6b9865c97245921d2824bcc4c1541e615 (patch) | |
tree | 6f9df4a383767992fa9ec36d820630bfabedf75a /src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java | |
parent | 23d13ee00ebdf7052299fc65af6f50e43d673e67 (diff) |
Movement of Capabilities class and chooseCapabilities functionality
into NativeWindowFactory introduced an undesirable dependence between
the windowing toolkit, which can be replaced via NativeWindowFactory,
and the library which implements the selection algorithm, for example
OpenGL. This would prevent, for example, an easy SWT port of JOGL.
To fix this, refactored chooseCapabilities into new
GraphicsConfigurationFactory, the default implementation of which is
currently a no-op on X11 platforms, and which is provided by JOGL in a
toolkit-agnostic manner via GLX. Refactored OpenGL portions of
Capabilities class back into GLCapabilities. Reintroduced
GLCapabilitiesChooser interface for compatibility and to avoid having
to import javax.media.nativewindow classes in most user code.
Fixed problem in GLProfile where failures to load native libraries
were being squelched. Reorganized build to have all outputs under
build/ directory.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1884 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java')
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java index ce1dc6fdf..9df572af1 100644 --- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java +++ b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java @@ -43,16 +43,16 @@ import javax.media.nativewindow.*; import javax.media.opengl.*; public abstract class GLDrawableImpl implements GLDrawable { - private NWCapabilities requestedCapabilities; + private GLCapabilities requestedCapabilities; protected GLDrawableImpl(GLDrawableFactory factory, NativeWindow comp, - NWCapabilities requestedCapabilities, + GLCapabilities requestedCapabilities, boolean realized) { this.factory = factory; this.component = comp; this.requestedCapabilities = - (requestedCapabilities == null) ? null : (NWCapabilities) requestedCapabilities.clone(); + (requestedCapabilities == null) ? null : (GLCapabilities) requestedCapabilities.clone(); this.realized = realized; } @@ -73,20 +73,20 @@ public abstract class GLDrawableImpl implements GLDrawable { return GLContextImpl.toHexString(hex); } - protected NWCapabilities getRequestedNWCapabilities() { + protected GLCapabilities getRequestedGLCapabilities() { return requestedCapabilities; } - public NWCapabilities getChosenNWCapabilities() { + public GLCapabilities getChosenGLCapabilities() { if (chosenCapabilities == null) return null; // Must return a new copy to avoid mutation by end user - return (NWCapabilities) chosenCapabilities.clone(); + return (GLCapabilities) chosenCapabilities.clone(); } - protected void setChosenNWCapabilities(NWCapabilities caps) { - chosenCapabilities = (caps==null) ? null : (NWCapabilities) caps.clone(); + protected void setChosenGLCapabilities(GLCapabilities caps) { + chosenCapabilities = (caps==null) ? null : (GLCapabilities) caps.clone(); } public NativeWindow getNativeWindow() { @@ -100,7 +100,7 @@ public abstract class GLDrawableImpl implements GLDrawable { public void setRealized(boolean realized) { this.realized = realized; if(!realized) { - setChosenNWCapabilities(null); + setChosenGLCapabilities(null); component.invalidate(); } } @@ -141,7 +141,7 @@ public abstract class GLDrawableImpl implements GLDrawable { protected GLDrawableFactory factory; protected NativeWindow component; - private NWCapabilities chosenCapabilities; + private GLCapabilities chosenCapabilities; // Indicates whether the component (if an onscreen context) has been // realized. Plausibly, before the component is realized the JAWT |