summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java19
-rwxr-xr-xsrc/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java6
-rwxr-xr-xsrc/jogl/classes/com/sun/opengl/impl/egl/EGLDynamicLookupHelper.java14
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java6
-rw-r--r--src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java11
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java3
-rwxr-xr-xsrc/newt/native/BroadcomEGL.c2
7 files changed, 15 insertions, 46 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java
index e71cf33a0..c381f68f5 100644
--- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java
+++ b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java
@@ -52,24 +52,7 @@ public abstract class GLDrawableImpl implements GLDrawable {
this.factory = factory;
this.component = comp;
this.realized = realized;
-
- AbstractGraphicsConfiguration agc = component.getGraphicsConfiguration();
- if (agc == null) {
- System.out.println("GLDrawableImpl no AbstractGraphicsConfiguration");
- System.out.println(component.getClass().getName());
- return;
- }
- AbstractGraphicsConfiguration ngc = agc.getNativeGraphicsConfiguration();
- if (ngc == null) {
- System.out.println("GLDrawableImpl no native AbstractGraphicsConfiguration");
- return;
- }
- Capabilities caps = ngc.getRequestedCapabilities();
- if (caps == null) {
- System.out.println("GLDrawableImpl no native Capabilities");
- return;
- }
- this.requestedCapabilities = (GLCapabilities)caps; // a copy ..
+ this.requestedCapabilities = (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getRequestedCapabilities(); // a copy ..
}
/**
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
index e2ee65d27..396580c1d 100755
--- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
@@ -45,19 +45,15 @@ import com.sun.gluegen.runtime.NativeLibrary;
public class EGLDrawableFactory extends GLDrawableFactoryImpl {
static {
- try {
// Register our GraphicsConfigurationFactory implementations
// The act of constructing them causes them to be registered
new EGLGraphicsConfigurationFactory();
// Check for other underlying stuff ..
- /* if(NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(false))) {
+ if(NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(false))) {
try {
NWReflection.createInstance("com.sun.opengl.impl.x11.glx.X11GLXGraphicsConfigurationFactory");
} catch (Throwable t) {}
- } */
- } catch (Throwable th) {
- th.printStackTrace();
}
}
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDynamicLookupHelper.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDynamicLookupHelper.java
index 99f163ca1..8bed0eb35 100755
--- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDynamicLookupHelper.java
+++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDynamicLookupHelper.java
@@ -50,7 +50,7 @@ import com.sun.gluegen.runtime.DynamicLookupHelper;
* Currently two implementations exist, one for ES1 and one for ES2.
*/
public abstract class EGLDynamicLookupHelper implements DynamicLookupHelper {
- protected static final boolean DEBUG = true; /* com.sun.opengl.impl.Debug.debug("EGL"); */
+ protected static final boolean DEBUG = com.sun.opengl.impl.Debug.debug("EGL");
private static final EGLDynamicLookupHelper eglES1DynamicLookupHelper;
private static final EGLDynamicLookupHelper eglES2DynamicLookupHelper;
@@ -136,13 +136,9 @@ public abstract class EGLDynamicLookupHelper implements DynamicLookupHelper {
private NativeLibrary loadFirstAvailable(List/*<String>*/ libNames, ClassLoader loader) {
for (Iterator iter = libNames.iterator(); iter.hasNext(); ) {
- String libname = (String) iter.next();
- NativeLibrary lib = NativeLibrary.open(libname, loader, false /*global*/);
+ NativeLibrary lib = NativeLibrary.open((String) iter.next(), loader, false /*global*/);
if (lib != null) {
- System.out.println("found: " + libname);
return lib;
- } else {
- System.out.println("looked for: " + libname);
}
}
return null;
@@ -168,11 +164,9 @@ public abstract class EGLDynamicLookupHelper implements DynamicLookupHelper {
// EGL libraries ..
lib = loadFirstAvailable(eglLibNames, loader);
if (lib == null) {
- // throw new GLException("Unable to dynamically load EGL library for profile ES" + esProfile);
- System.out.println("Unable to dynamically load EGL library for profile ES" + esProfile);
- } else {
- glesLibraries.add(lib);
+ throw new GLException("Unable to dynamically load EGL library for profile ES" + esProfile);
}
+ glesLibraries.add(lib);
}
if (esProfile==2) {
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 83a9b0098..ead5f6396 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -54,7 +54,7 @@ import com.sun.nativewindow.impl.jvm.JVMUtil;
* or more specialized versions using the other static GetProfile methods.
*/
public class GLProfile implements Cloneable {
- public static final boolean DEBUG = true; /* Debug.debug("GLProfile"); */
+ public static final boolean DEBUG = Debug.debug("GLProfile");
//
// Public (user-visible) profiles
@@ -736,8 +736,8 @@ public class GLProfile implements Cloneable {
}
}
mappedProfiles = _mappedProfiles; // final ..
- if (null==defaultGLProfile) {
- System.out.println("No profile available: "+list2String(GL_PROFILE_LIST_ALL));
+ if(null==defaultGLProfile) {
+ throw new GLException("No profile available: "+list2String(GL_PROFILE_LIST_ALL));
}
}
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
index d054c205b..b13cf4317 100644
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
+++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
@@ -40,7 +40,7 @@ import java.lang.reflect.*;
import javax.media.nativewindow.*;
public final class NWReflection {
- public static final boolean DEBUG = true; /* Debug.debug("NWReflection"); */
+ public static final boolean DEBUG = Debug.debug("NWReflection");
public static final boolean isClassAvailable(String clazzName) {
try {
@@ -69,11 +69,7 @@ public final class NWReflection {
try {
factory = factoryClass.getDeclaredConstructor( cstrArgTypes );
} catch(NoSuchMethodException nsme) {
- nsme.printStackTrace();
- throw new NativeWindowException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found");
- } catch (Throwable th) {
- th.printStackTrace();
- throw new NativeWindowException(th);
+ throw new NativeWindowException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found");
}
return factory;
} catch (Throwable e) {
@@ -95,9 +91,6 @@ public final class NWReflection {
factory = getConstructor(clazzName, cstrArgTypes);
return factory.newInstance( cstrArgs ) ;
} catch (Exception e) {
- if (DEBUG) {
- e.printStackTrace();
- }
throw new NativeWindowException(e);
}
}
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
index 9b790bd1f..29b92bc8f 100755
--- a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
+++ b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
@@ -124,6 +124,9 @@ public class BCEGLWindow extends Window {
if (config == null) {
throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this);
}
+ if(DEBUG_IMPLEMENTATION) {
+ System.out.println("BCEGLWindow.windowCreated: 0x"+Integer.toHexString(cfgID)+", "+width+"x"+height+", "+config);
+ }
}
private long windowHandleClose;
diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c
index 55ca5f155..716f7d9ee 100755
--- a/src/newt/native/BroadcomEGL.c
+++ b/src/newt/native/BroadcomEGL.c
@@ -58,7 +58,7 @@ EGLSurface EGLUtil_CreateWindow( EGLDisplay eglDisplay, /* bool */ GLuint bChrom
void EGLUtil_DestroyWindow( EGLDisplay eglDisplay, EGLSurface eglSurface );
void EGLUtil_SwapWindow( EGLDisplay eglDisplay, EGLSurface eglSurface );
-#define VERBOSE_ON 1
+// #define VERBOSE_ON 1
#ifdef VERBOSE_ON
#define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__)