aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java14
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java4
-rw-r--r--src/newt/classes/jogamp/newt/x11/X11Window.java10
3 files changed, 19 insertions, 9 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
index 6c4bb00ab..3cc273966 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
@@ -103,7 +103,7 @@ public abstract class EGLDrawable extends GLDrawableImpl {
AbstractGraphicsDevice aDevice = aConfig.getScreen().getDevice();
if(aDevice instanceof EGLGraphicsDevice) {
if(DEBUG) {
- System.err.println("EGLDrawable.setRealized: using existing EGL config: "+this);
+ System.err.println("EGLDrawable.setRealized: using existing EGL config - START");
}
// just fetch the data .. trust but verify ..
eglDisplay = aDevice.getHandle();
@@ -135,9 +135,12 @@ public abstract class EGLDrawable extends GLDrawableImpl {
} else {
throw new GLException("EGLGraphicsDevice hold by non EGLGraphicsConfiguration: "+aConfig);
}
+ if(DEBUG) {
+ System.err.println("EGLDrawable.setRealized: using existing EGL config - END: "+this);
+ }
} else {
if(DEBUG) {
- System.err.println("EGLDrawable.setRealized: creating new EGL config: "+this);
+ System.err.println("EGLDrawable.setRealized: creating new EGL config - START");
}
// create a new EGL config ..
ownEGLDisplay=true;
@@ -169,8 +172,8 @@ public abstract class EGLDrawable extends GLDrawableImpl {
EGLGraphicsDevice e = new EGLGraphicsDevice(eglDisplay, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
DefaultGraphicsScreen s = new DefaultGraphicsScreen(e, aConfig.getScreen().getIndex());
// yes, use the already chosen/requested Capabilities (x11,win32,..)
- GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) aConfig.getChosenCapabilities();
- GLCapabilitiesImmutable capsRequested = (GLCapabilitiesImmutable) aConfig.getRequestedCapabilities();
+ final GLCapabilitiesImmutable capsRequested = (GLCapabilitiesImmutable) aConfig.getRequestedCapabilities();
+ final GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) aConfig.getChosenCapabilities();
eglConfig = (EGLGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(e).chooseGraphicsConfiguration(
capsChosen, capsRequested, null, s);
if (null == eglConfig) {
@@ -179,6 +182,9 @@ public abstract class EGLDrawable extends GLDrawableImpl {
System.err.println("Chosen eglConfig: "+eglConfig);
}
recreateSurface();
+ if(DEBUG) {
+ System.err.println("EGLDrawable.setRealized: creating new EGL config - END: "+this);
+ }
}
} else if (ownEGLSurface && eglSurface != EGL.EGL_NO_SURFACE) {
// Destroy the window surface
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
index 2fad75b74..8de590879 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
@@ -79,7 +79,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
public Object clone() {
return super.clone();
}
-
+
void updateGraphicsConfiguration() {
EGLGraphicsConfiguration newConfig = (EGLGraphicsConfiguration)
GraphicsConfigurationFactory.getFactory(getScreen().getDevice()).chooseGraphicsConfiguration(
@@ -88,7 +88,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
// FIXME: setScreen( ... );
setChosenCapabilities(newConfig.getChosenCapabilities());
if(DEBUG) {
- System.err.println("!!! updateGraphicsConfiguration: "+this);
+ System.err.println("!!! updateGraphicsConfiguration(1): "+this);
}
}
}
diff --git a/src/newt/classes/jogamp/newt/x11/X11Window.java b/src/newt/classes/jogamp/newt/x11/X11Window.java
index 8f9455629..9934d4b7a 100644
--- a/src/newt/classes/jogamp/newt/x11/X11Window.java
+++ b/src/newt/classes/jogamp/newt/x11/X11Window.java
@@ -50,10 +50,14 @@ public class X11Window extends WindowImpl {
}
protected void createNativeImpl() {
- X11Screen screen = (X11Screen) getScreen();
- X11Display display = (X11Display) screen.getDisplay();
- config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(
+ final X11Screen screen = (X11Screen) getScreen();
+ final X11Display display = (X11Display) screen.getDisplay();
+ final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice());
+ config = factory.chooseGraphicsConfiguration(
capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen());
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window.createNativeImpl() factory: "+factory+", chosen config: "+config);
+ }
if (config == null) {
throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
}