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/egl/EGLConfig.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/egl/EGLConfig.java')
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/egl/EGLConfig.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLConfig.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLConfig.java index f9ad6e318..0f60dd6b4 100644 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLConfig.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLConfig.java @@ -41,7 +41,7 @@ import javax.media.opengl.*; import com.sun.opengl.impl.*; import com.sun.gluegen.runtime.NativeLibrary; -public class EGLConfig { +public class EGLConfig implements AbstractGraphicsConfiguration { public _EGLConfig getNativeConfig() { return _config; @@ -51,7 +51,7 @@ public class EGLConfig { return configID; } - public NWCapabilities getCapabilities() { + public GLCapabilities getCapabilities() { return capabilities; } @@ -83,11 +83,11 @@ public class EGLConfig { if (numConfigs[0] == 0) { throw new GLException("No valid graphics configuration selected from eglChooseConfig"); } - capabilities = new NWCapabilities(); + capabilities = new GLCapabilities(); setup(display, configID, configs[0]); } - public EGLConfig(long display, NWCapabilities caps) { + public EGLConfig(long display, GLCapabilities caps) { int[] attrs = glCapabilities2AttribList(caps); _EGLConfig[] configs = new _EGLConfig[1]; int[] numConfigs = new int[1]; @@ -100,7 +100,7 @@ public class EGLConfig { if (numConfigs[0] == 0) { throw new GLException("No valid graphics configuration selected from eglChooseConfig"); } - capabilities = (NWCapabilities)caps.clone(); + capabilities = (GLCapabilities)caps.clone(); setup(display, -1, configs[0]); } @@ -137,7 +137,7 @@ public class EGLConfig { } } - public static int[] glCapabilities2AttribList(NWCapabilities caps) { + public static int[] glCapabilities2AttribList(GLCapabilities caps) { int[] attrs = new int[] { EGL.EGL_RENDERABLE_TYPE, -1, // FIXME: does this need to be configurable? @@ -167,6 +167,6 @@ public class EGLConfig { } private _EGLConfig _config; private int configID; - private NWCapabilities capabilities; + private GLCapabilities capabilities; } |