aboutsummaryrefslogtreecommitdiffstats
path: root/make/build-jogl.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-06-10 09:35:06 +0200
committerSven Gothel <[email protected]>2010-06-10 09:35:06 +0200
commit1d333a771ce0bc7c8594e21d031703f698f06a46 (patch)
tree933d470582896320855fa1d98c1a917edc412c24 /make/build-jogl.xml
parent4512900ddcb9ce9a498411d257b1b6d6010ec006 (diff)
Fix: Locking/Threading; Common IntIntHashMap and Buffers; Fix: glMap*Buffer*; GLX/WGL/CgGL: All runtime dynamic; Misc ..
TODO: Compile and test on MacOSX .. Fix: ===== Multithreading/Locking: See jogl/doc/Implementation/MultiThreading.txt - Locking layer is not platform agnostic, ie GLContextImpl, GLDrawableImpl, .. and NEWT: Window/Display - No more use of JAWT global lock necessary, removed. - No need for X11 Display lock, on the contrary, this made the NV driver hang. - Use common window/surface lock - All NativeWindow surfaceLock's are recursive now glMapBuffer: If size is 0, don't do cont with the native call. glMapBufferRange: Fix capacity. glNamedBufferDataEXT: Track the size. glMapNamedBufferEXT: Manual impl. - use the tracked size glXGetVisualFromFBConfig, glXChooseFBConfig, glXChooseVisual: Instead of ignoring and implement a renamed version (*Copied), we just use ManualImplementation for the proper copy-result code. DesktopGLDynamicLookupHelper: Initialize _hasGLBinding* attributes in the determing loadGLJNILibrary() method, which is called by super(). Otherwise static init will overwrite them after the super() call. X11GLXDrawableFactory: Don't release anything at shutdown (removed sharedContext.destroy()), since this caused a freeze/SEGV sometimes. Fixed NEWT's reparentWindow() functionality incl NewtCanvasAWT usage. - Native: if not visible, don't focus, etc - NewtCanvasAWT: Use the container size to start with - Run the command on the EDT Using GlueGen's new DynamicLibraryBundle utility: - X11, Windows and MacOSX OpenGL adapted to DynamicLibraryBundleInfo. - X11GLXDynamicLookupHelper -> X11GLXDynamicLibraryBundleInfo - Remove all path from lib names. - GL order: libGL.so.1, libGL.so, GL - shallLinkGlobal: true -> to server some 'old' DRI systems -> http://dri.sourceforge.net/doc/DRIuserguide.html - shallLookupGlobal: false - Try both : glXGetProcAddressARB and glXGetProcAddress - Using bootstrap: GLX.glXGetProcAddress(long glxGetProcAddressHandle, String glFuncName) Found the issue with LIBGL_DRIVERS_PATH, ie if not set no valid GL instance can be found (ie ATI fglrx/DRI). This may happen if using a differen user than the desktop user for whom the env var is set within some /etc/X11/Xsession.d/ script. Enhancements: ============= GLBufferSizeTracker: Use IntIntHashMap and add DirectState size tracking. GLBufferStateTracker: Use IntIntHashMap. GLStateTracker: Use IntIntHashMap. GLDynamicLookupHelper: More generic (global loading/lookup and GetProcAddress function name list), remove redundant code. FIXME: MacOSXCGLDynamicLookupHelper: - Not tested - Not using NSImage lookup anymore as recommended by OSX API Doc, so dlsym is used always (to be tested) WindowsWGLDynamicLookupHelper: - Not tested GLX/WGL/CgGL is all runtime-dynamic as now, ie loaded and looked-up at runtime, no compile time dependencies to GL anymore, nor a need to specify CgGL. Split up WGL in GDI and WGL, to allow proper dynamic runtime linkage of OpenGL32 while using static binding to GDI32 NEWT events generated by native code are enqueued and not send directly. This should ease locking mechanisms .. if any are necessary. NEWT: More platform specific code moved to *Impl method, simplifying the generic code of the superclass and impl protocol. Cleanup: ========= Replace all InternalBufferUtil's with com.jogamp.common.nio.Buffers Removed all InternalBufferUtil's from repository Removed GLContextImpl notion of 'optimized' surface locking, where the surface gets unlocked during makeCurrent/release. This just makes no sense and would impact multithreading in a horrible way.
Diffstat (limited to 'make/build-jogl.xml')
-rw-r--r--make/build-jogl.xml44
1 files changed, 24 insertions, 20 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 9203542a7..74b9da089 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -38,11 +38,6 @@
- Optional properties:
- -Djogl.cg=1 when combined with the build or javadoc targets will cause
- the experimental binding to NVidia's Cg language to be built.
- - Then you need to define the location of your CG libraries:
- - -Dwindows.cg.lib32=<PATH> for Windows x32 and
- - -Dwindows.cg.lib64=<PATH> for Windows x64 and
- - -Dx11.cg.lib32=<PATH> for X11/Unix x32
- - -Dx11.cg.lib64=<PATH> for X11/Unix x64
-
- Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
- ANT build, including the GlueGen and StaticGLInfo tasks, the building of
@@ -299,7 +294,6 @@
<target name="setup.javacdc">
<copy file="../src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javame_cdc_fp" tofile="${src.generated.java-cdc}/com/jogamp/opengl/impl/SystemUtil.java" />
- <copy file="../src/jogl/classes/com/jogamp/opengl/impl/InternalBufferUtil.java.javame_cdc_fp" tofile="${src.generated.java-cdc}/com/jogamp/opengl/impl/InternalBufferUtil.java" />
<copy file="../src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java.javame_cdc_fp" tofile="${src.generated.java-cdc}/com/jogamp/opengl/util/texture/TextureIO.java" />
<copy file="../src/jogl/classes/com/jogamp/opengl/util/texture/spi/DDSImage.java.javame_cdc_fp" tofile="${src.generated.java-cdc}/com/jogamp/opengl/util/texture/spi/DDSImage.java" />
<copy file="../src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javame_cdc_fp" tofile="${src.generated.java-cdc}/com/jogamp/opengl/util/texture/spi/TGAImage.java" />
@@ -307,7 +301,6 @@
<target name="setup.javase">
<copy file="../src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javase" tofile="${src.generated.java}/com/jogamp/opengl/impl/SystemUtil.java" />
- <copy file="../src/jogl/classes/com/jogamp/opengl/impl/InternalBufferUtil.java.javase" tofile="${src.generated.java}/com/jogamp/opengl/impl/InternalBufferUtil.java" />
<copy file="../src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java.javase" tofile="${src.generated.java}/com/jogamp/opengl/util/texture/TextureIO.java" />
<copy file="../src/jogl/classes/com/jogamp/opengl/util/texture/spi/DDSImage.java.javase" tofile="${src.generated.java}/com/jogamp/opengl/util/texture/spi/DDSImage.java" />
<copy file="../src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javase" tofile="${src.generated.java}/com/jogamp/opengl/util/texture/spi/TGAImage.java" />
@@ -622,7 +615,7 @@
<echo message="Generating EGL implementation class" />
<antcall target="java.generate.copy2temp" inheritRefs="true" />
<dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes}/${window.es.system}/** ${stub.includes}/common/**" />
- <gluegen src="${stub.includes}/${window.es.system}/window-system.c"
+ <gluegen src="${stub.includes}/${window.es.system}/window-system1.c"
outputRootDir="${build.jogl}"
config="${window.es.cfg}"
includeRefid="stub.includes.fileset.platform"
@@ -644,12 +637,24 @@
</gluegen>
</target>
- <target name="java.generate.window.system.os" if="window.os.cfg">
+ <target name="java.generate.window.system.os0" if="window.os0.cfg">
<echo message="Generating window system glue impl: ${window.os.system}" />
<antcall target="java.generate.copy2temp" inheritRefs="true" />
- <gluegen src="${stub.includes}/${window.os.system}/window-system.c"
+ <gluegen src="${stub.includes}/${window.os.system}/window-system0.c"
outputRootDir="${build.jogl}"
- config="${window.os.cfg}"
+ config="${window.os0.cfg}"
+ includeRefid="stub.includes.fileset.platform"
+ emitter="com.sun.gluegen.opengl.GLEmitter">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+ </target>
+
+ <target name="java.generate.window.system.os1" if="window.os1.cfg">
+ <echo message="Generating window system glue impl: ${window.os.system}" />
+ <antcall target="java.generate.copy2temp" inheritRefs="true" />
+ <gluegen src="${stub.includes}/${window.os.system}/window-system1.c"
+ outputRootDir="${build.jogl}"
+ config="${window.os1.cfg}"
includeRefid="stub.includes.fileset.platform"
emitter="com.sun.gluegen.opengl.GLEmitter">
<classpath refid="gluegen.classpath" />
@@ -659,7 +664,8 @@
<target name="java.generate.gl.platforms" >
<dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes}/${window.os.system}/** ${stub.includes}/${window.es.system}/** ${stub.includes}/common/** ${stub.includes}/opengl/**" />
- <antcall target="java.generate.window.system.os" inheritRefs="true" />
+ <antcall target="java.generate.window.system.os0" inheritRefs="true" />
+ <antcall target="java.generate.window.system.os1" inheritRefs="true" />
<antcall target="java.generate.platform.glext" inheritRefs="true" />
</target>
@@ -688,21 +694,22 @@
<antcall target="java.generate.gl.platforms" inheritRefs="true">
<param name="window.os.system" value="x11"/>
- <param name="window.os.cfg" value="${config.jogl}/glx-x11.cfg" />
+ <param name="window.os1.cfg" value="${config.jogl}/glx-x11.cfg" />
<param name="glext.platform.cfg" value="${config.jogl}/glxext.cfg" />
<param name="glext.platform.header" value="${stub.includes}/x11/glxext.c" />
</antcall>
<antcall target="java.generate.gl.platforms" inheritRefs="true">
<param name="window.os.system" value="win32"/>
- <param name="window.os.cfg" value="${config.jogl}/wgl-win32.cfg" />
+ <param name="window.os0.cfg" value="${config.jogl}/gdi-win32.cfg" />
+ <param name="window.os1.cfg" value="${config.jogl}/wgl-win32.cfg" />
<param name="glext.platform.cfg" value="${config.jogl}/wglext.cfg" />
<param name="glext.platform.header" value="${stub.includes}/win32/wglext.c" />
</antcall>
<antcall target="java.generate.gl.platforms" inheritRefs="true">
<param name="window.os.system" value="macosx"/>
- <param name="window.os.cfg" value="${config.jogl}/cgl-macosx.cfg" />
+ <param name="window.os1.cfg" value="${config.jogl}/cgl-macosx.cfg" />
<param name="glext.platform.cfg" value="${config.jogl}/cglext.cfg" />
<param name="glext.platform.header" value="${stub.includes}/macosx/cglext.c" />
</antcall>
@@ -754,7 +761,7 @@
outputRootDir="${build.jogl}"
config="${config.jogl}/cg-common.cfg"
includeRefid="stub.includes.cg.fileset.all"
- emitter="com.sun.gluegen.JavaEmitter">
+ emitter="com.sun.gluegen.procaddress.ProcAddressEmitter">
<classpath refid="gluegen.classpath" />
</gluegen>
</target>
@@ -1108,10 +1115,6 @@
<syslibset libs="Xxf86vm" />
</linker>
- <linker id="linker.cfg.linux.jogl.cg" extends="linker.cfg.linux.jogl.x11">
- <syslibset dir="${x11.cg.lib32}" libs="Cg, CgGL"/>
- </linker>
-
<linker id="linker.cfg.linux.amd64.jogl.x11" extends="linker.cfg.linux.amd64">
<syslibset libs="X11"/>
<syslibset libs="Xxf86vm" />
@@ -1288,6 +1291,7 @@
<include name="${rootrel.generated.c.jogl}/gl2/GLUgl2_JNI.c"/>
<include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
<include name="${rootrel.generated.c.jogl}/MacOSX/CGL*.c" if="isOSX"/>
+ <include name="${rootrel.generated.c.jogl}/Windows/GDI*.c" if="isWindows"/>
<include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
</patternset>