diff options
Diffstat (limited to 'src/classes/com/sun/opengl/impl/egl')
4 files changed, 23 insertions, 19 deletions
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLConfig.java b/src/classes/com/sun/opengl/impl/egl/EGLConfig.java index 4948b3a0c..2c03a20a6 100644 --- a/src/classes/com/sun/opengl/impl/egl/EGLConfig.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLConfig.java @@ -36,6 +36,7 @@ package com.sun.opengl.impl.egl; import java.util.*; +import javax.media.nwi.*; import javax.media.opengl.*; import com.sun.opengl.impl.*; import com.sun.gluegen.runtime.NativeLibrary; @@ -50,7 +51,7 @@ public class EGLConfig { return configID; } - public GLCapabilities getCapabilities() { + public NWCapabilities getCapabilities() { return capabilities; } @@ -82,11 +83,11 @@ public class EGLConfig { if (numConfigs[0] == 0) { throw new GLException("No valid graphics configuration selected from eglChooseConfig"); } - capabilities = new GLCapabilities(); + capabilities = new NWCapabilities(); setup(display, configID, configs[0]); } - public EGLConfig(long display, GLCapabilities caps) { + public EGLConfig(long display, NWCapabilities caps) { int[] attrs = glCapabilities2AttribList(caps); _EGLConfig[] configs = new _EGLConfig[1]; int[] numConfigs = new int[1]; @@ -99,7 +100,7 @@ public class EGLConfig { if (numConfigs[0] == 0) { throw new GLException("No valid graphics configuration selected from eglChooseConfig"); } - capabilities = (GLCapabilities)caps.clone(); + capabilities = (NWCapabilities)caps.clone(); setup(display, -1, configs[0]); } @@ -136,7 +137,7 @@ public class EGLConfig { } } - public static int[] glCapabilities2AttribList(GLCapabilities caps) { + public static int[] glCapabilities2AttribList(NWCapabilities caps) { int[] attrs = new int[] { EGL.EGL_RENDERABLE_TYPE, -1, // FIXME: does this need to be configurable? @@ -166,6 +167,6 @@ public class EGLConfig { } private _EGLConfig _config; private int configID; - private GLCapabilities capabilities; + private NWCapabilities capabilities; } diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java index df3bd2a34..b7cfb051e 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java @@ -35,6 +35,7 @@ package com.sun.opengl.impl.egl; +import javax.media.nwi.*; import javax.media.opengl.*; import com.sun.opengl.impl.*; import com.sun.gluegen.runtime.ProcAddressTable; diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java index 215c6ed28..3e7df000c 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java @@ -38,10 +38,11 @@ package com.sun.opengl.impl.egl; import com.sun.opengl.impl.GLDrawableImpl; import com.sun.opengl.impl.GLReflection; +import javax.media.nwi.*; import javax.media.opengl.*; public class EGLDrawable extends GLDrawableImpl { - private GLCapabilitiesChooser chooser; + private NWCapabilitiesChooser chooser; private long display; private EGLConfig config; private long surface; @@ -49,8 +50,8 @@ public class EGLDrawable extends GLDrawableImpl { public EGLDrawable(EGLDrawableFactory factory, NativeWindow component, - GLCapabilities requestedCapabilities, - GLCapabilitiesChooser chooser) throws GLException { + NWCapabilities requestedCapabilities, + NWCapabilitiesChooser chooser) throws GLException { super(factory, component, requestedCapabilities, false); this.chooser = chooser; surface=EGL.EGL_NO_SURFACE; @@ -114,9 +115,9 @@ public class EGLDrawable extends GLDrawableImpl { if (!EGL.eglInitialize(display, null, null)) { throw new GLException("eglInitialize failed"); } - config = new EGLConfig(display, getRequestedGLCapabilities()); + config = new EGLConfig(display, getRequestedNWCapabilities()); } - setChosenGLCapabilities(config.getCapabilities()); + setChosenNWCapabilities(config.getCapabilities()); } else if (surface != EGL.EGL_NO_SURFACE) { // Destroy the window surface if (!EGL.eglDestroySurface(display, surface)) { diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java index 37dd6c8fe..6fc009752 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java @@ -36,6 +36,7 @@ package com.sun.opengl.impl.egl; import java.util.*; +import javax.media.nwi.*; import javax.media.opengl.*; import com.sun.opengl.impl.*; import com.sun.gluegen.runtime.NativeLibrary; @@ -116,23 +117,23 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } } - public AbstractGraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities, - GLCapabilitiesChooser chooser, + public AbstractGraphicsConfiguration chooseGraphicsConfiguration(NWCapabilities capabilities, + NWCapabilitiesChooser chooser, AbstractGraphicsDevice device) { return null; } public GLDrawable createGLDrawable(NativeWindow target, - GLCapabilities capabilities, - GLCapabilitiesChooser chooser) { + NWCapabilities capabilities, + NWCapabilitiesChooser chooser) { target = NativeWindowFactory.getNativeWindow(target); return new EGLDrawable(this, target, capabilities, chooser); } - public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities, - GLCapabilitiesChooser chooser, + public GLDrawableImpl createOffscreenDrawable(NWCapabilities capabilities, + NWCapabilitiesChooser chooser, int width, int height) { throw new GLUnsupportedException("Not yet implemented"); @@ -142,8 +143,8 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { // Not supported on OpenGL ES return false; } - public GLPbuffer createGLPbuffer(final GLCapabilities capabilities, - final GLCapabilitiesChooser chooser, + public GLPbuffer createGLPbuffer(final NWCapabilities capabilities, + final NWCapabilitiesChooser chooser, final int initialWidth, final int initialHeight, final GLContext shareWith) { |