diff options
author | sg215889 <[email protected]> | 2009-07-28 19:03:32 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-28 19:03:32 -0700 |
commit | 4b5e1a0f826597d8cdcf81865194ee8d67511b70 (patch) | |
tree | 33c7394f6a11fcde8ce59035f94f680e1d2d3861 | |
parent | 0a92a47567cfa36b33590bacf4c782c0ec4f9eaf (diff) |
Cleanup ..
-rw-r--r-- | make/build-jogl.xml | 24 | ||||
-rw-r--r-- | make/build-nativewindow.xml | 31 | ||||
-rw-r--r-- | make/build-newt.xml | 28 | ||||
-rw-r--r-- | make/make.jogl.all.linux-x86.sh | 2 | ||||
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java | 19 | ||||
-rwxr-xr-x | src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java | 6 | ||||
-rwxr-xr-x | src/jogl/classes/com/sun/opengl/impl/egl/EGLDynamicLookupHelper.java | 14 | ||||
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLProfile.java | 6 | ||||
-rw-r--r-- | src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java | 11 | ||||
-rwxr-xr-x | src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java | 3 | ||||
-rwxr-xr-x | src/newt/native/BroadcomEGL.c | 2 |
11 files changed, 38 insertions, 108 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml index fda65c5b2..6a065a8e4 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -51,8 +51,8 @@ - - Some environment defs affecting compilation - - setup.noAWT is set iff: - !isWindows && !isOSX && !noX11 + - setup.nodesktop is set iff: + !isWindows && !isOSX && !isX11 - Internal settings, may not be necessary to set them manually, since all JAR archives are orthogonal. @@ -77,7 +77,7 @@ --> <target name="base.init" depends="gluegen.cpptasks.detect.os"> - <condition property="setup.noAWT"> + <condition property="setup.nodesktop"> <and> <isfalse value="${isWindows}" /> <isfalse value="${isOSX}" /> @@ -86,25 +86,11 @@ </condition> <condition property="setup.noall"> - <or> - <isset property="noX11"/> - <isset property="setup.noAWT"/> - </or> - </condition> - <condition property="setup.noall-cdc"> - <or> - <isset property="noX11"/> - </or> - </condition> - <condition property="setup.nodesktop"> - <or> - <isset property="noX11"/> - </or> + <isset property="setup.noAWT"/> </condition> <echo message="setup.nodesktop: ${setup.nodesktop}" /> <echo message="setup.noall: ${setup.noall}" /> - <echo message="setup.noall-cdc: ${setup.noall-cdc}" /> <echo message="setup.noAWT: ${setup.noAWT}" /> <echo message="setup.noCDC: ${setup.noCDC}" /> @@ -1769,7 +1755,7 @@ includes="${java.part.util.fixedfunc.shaders}"/> </jar> </target> - <target name="build-jars-all-cdc" depends="setup-manifestfile" unless="setup.noall-cdc"> + <target name="build-jars-all-cdc" depends="setup-manifestfile"> <jar manifest="${build}/tempversion-cdc" destfile="${jogl.all.cdc.jar}"> <fileset dir="${classes-cdc}" includes="${java.part.core} ${java.part.egl} ${java.part.glutess} ${java.part.glumipmap} ${java.part.openmax} ${java.part.sdk} ${java.part.glx} ${java.part.cgl} ${java.part.gl2es12} ${java.part.wgl} ${java.part.es1} ${java.part.es1.dbg} ${java.part.es2} ${java.part.es2.dbg} ${java.part.util} ${java.part.util.glsl} ${java.part.util.fixedfuncemu}" diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml index 641e2a4f5..7dae934e4 100644 --- a/make/build-nativewindow.xml +++ b/make/build-nativewindow.xml @@ -44,8 +44,8 @@ - - Some environment defs affecting compilation - - setup.noAWT is set iff: - !isWindows && !isOSX && !noX11 + - setup.nodesktop is set iff: + !isWindows && !isOSX && !isX11 - Internal settings, may not be necessary to set them manually, since all JAR archives are orthogonal. @@ -68,7 +68,7 @@ --> <target name="base.init" depends="gluegen.cpptasks.detect.os"> - <condition property="setup.noAWT"> + <condition property="setup.nodesktop"> <and> <isfalse value="${isWindows}" /> <isfalse value="${isOSX}" /> @@ -77,21 +77,13 @@ </condition> <condition property="setup.noall"> - <or> - <isset property="noX11"/> - <isset property="setup.noAWT"/> - </or> - </condition> - <condition property="setup.noall-cdc"> - <or> - <isset property="noX11"/> - </or> + <isset property="setup.noAWT"/> </condition> <property name="javac.bootclasspath-cdc.jar" value="../../gluegen/make/lib/cdc_fp.jar" /> + <echo message="setup.nodesktop: ${setup.nodesktop}" /> <echo message="setup.noall: ${setup.noall}" /> - <echo message="setup.noall-cdc: ${setup.noall-cdc}" /> <echo message="setup.noAWT: ${setup.noAWT}" /> <echo message="javac.bootclasspath-cdc.jar: ${javac.bootclasspath-cdc.jar}" /> @@ -108,17 +100,12 @@ <!-- condition excludes --> - <condition property="java.excludes.x11" - value="${java.part.x11}"> - <isset property="noX11"/> - </condition> - <condition property="java.excludes.awt" value="${java.part.awt}"> <isset property="setup.noAWT"/> </condition> - <property name="java.excludes.all" value="${java.excludes.awt} ${java.excludes.x11}" /> + <property name="java.excludes.all" value="${java.excludes.awt}" /> <echo message="java.excludes.all: ${java.excludes.all}" /> @@ -842,13 +829,13 @@ </jar> </target> - <target name="build-jars-x11" depends="setup-manifestfile" unless="noX11"> + <target name="build-jars-x11" depends="setup-manifestfile"> <jar manifest="tempversion" destfile="${nativewindow.x11.jar}"> <fileset dir="${classes}" includes="${java.part.x11}" /> </jar> </target> - <target name="build-jars-x11-cdc" depends="setup-manifestfile-cdc" unless="noX11"> + <target name="build-jars-x11-cdc" depends="setup-manifestfile-cdc"> <jar manifest="tempversion-cdc" destfile="${nativewindow.x11.cdc.jar}"> <fileset dir="${classes-cdc}" includes="${java.part.x11}" /> @@ -865,7 +852,7 @@ </fileset> </jar> </target> - <target name="build-jars-all-cdc" depends="setup-manifestfile-cdc" unless="setup.noall-cdc"> + <target name="build-jars-all-cdc" depends="setup-manifestfile-cdc"> <jar manifest="tempversion-cdc" destfile="${nativewindow.all.cdc.jar}"> <fileset dir="${classes-cdc}"> <include name="javax/media/nativewindow/**" /> diff --git a/make/build-newt.xml b/make/build-newt.xml index 1ed039a57..be9547684 100644 --- a/make/build-newt.xml +++ b/make/build-newt.xml @@ -50,8 +50,8 @@ setup.noAWT setup.noOpenGL - - setup.noAWT is set iff: - !isWindows && !isOSX && !noX11 + - setup.nodesktop is set iff: + !isWindows && !isOSX && !isX11 --> <project name="NEWT" basedir="." default="all"> @@ -73,28 +73,16 @@ <property name="javac.bootclasspath-cdc.jar" value="../../gluegen/make/lib/cdc_fp.jar"/> - <condition property="setup.noAWT"> + <condition property="setup.nodesktop"> <and> <isfalse value="${isWindows}" /> <isfalse value="${isOSX}" /> <isfalse value="${isX11}" /> </and> </condition> + <condition property="setup.noall"> - <or> - <isset property="noX11"/> - <isset property="setup.noAWT"/> - </or> - </condition> - <condition property="setup.noall-cdc"> - <or> - <isset property="noX11"/> - </or> - </condition> - <condition property="setup.nodesktop"> - <or> - <isset property="noX11"/> - </or> + <isset property="setup.noAWT"/> </condition> <condition property="setup.nonatives"> @@ -110,7 +98,6 @@ <echo message="setup.nonatives: ${setup.nonatives}" /> <echo message="setup.nodesktop: ${setup.nodesktop}" /> <echo message="setup.noall: ${setup.noall}" /> - <echo message="setup.noall-cdc: ${setup.noall-cdc}" /> <echo message="setup.noCDC: ${setup.noCDC}" /> <echo message="setup.noAWT: ${setup.noAWT}" /> <echo message="setup.noOpenGL: ${setup.noOpenGL}" /> @@ -764,10 +751,11 @@ </jar> </target> - <target name="build-jars-all-cdc" depends="setup-manifestfile-cdc" unless="setup.noall-cdc"> + <target name="build-jars-all-cdc" depends="setup-manifestfile-cdc"> <jar manifest="tempversion-cdc" destfile="${newt.all.cdc.jar}"> <fileset dir="${classes-cdc}" - includes="${java.part.core} ${java.part.opengl} ${java.part.broadcomegl}"/> + includes="com/sun/javafx/newt/**" + excludes="${java.excludes.cdcfp}" /> </jar> </target> diff --git a/make/make.jogl.all.linux-x86.sh b/make/make.jogl.all.linux-x86.sh index 8842cbc0c..0f764b360 100644 --- a/make/make.jogl.all.linux-x86.sh +++ b/make/make.jogl.all.linux-x86.sh @@ -13,13 +13,13 @@ fi # -DisUnix=true \ # -DisLinux=true \ # -DisLinuxX86=true \ +# -DisX11=true \ ant \ -Dbuild.noarchives=true \ -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86 \ -Drootrel.build=build-x86 \ -Dos.arch=x86 \ - -DisX11=true \ -DuseKD=true \ -DuseOpenMAX=true \ $* 2>&1 | tee make.jogl.all.linux-x86.log 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__) |