diff options
-rw-r--r-- | make/build-common.xml | 2 | ||||
-rw-r--r-- | make/build-oculusvr.xml | 187 | ||||
-rw-r--r-- | make/config/oculusvr/oculusvr-common.cfg | 5 | ||||
-rw-r--r-- | make/config/oculusvr/oculusvr.c | 3 | ||||
-rwxr-xr-x | make/scripts/make.jogl.all.macosx-java6.sh | 5 | ||||
-rwxr-xr-x | make/scripts/make.jogl.all.macosx.sh | 1 | ||||
-rw-r--r-- | make/scripts/tests.sh | 4 | ||||
m--------- | oculusvr-sdk | 0 | ||||
-rw-r--r-- | src/jogl/native/openmax/jogamp_opengl_util_av_impl_OMXGLMediaPlayer.c | 2 | ||||
-rw-r--r-- | src/jogl/native/openmax/omx_tool.h | 1 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java | 81 | ||||
-rw-r--r-- | src/newt/native/bcm_vc_iv.c | 2 | ||||
-rw-r--r-- | src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java | 12 | ||||
-rw-r--r-- | src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java | 3 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp | 8 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp | 8 |
16 files changed, 236 insertions, 88 deletions
diff --git a/make/build-common.xml b/make/build-common.xml index 5be5fedc7..1d408a057 100644 --- a/make/build-common.xml +++ b/make/build-common.xml @@ -239,7 +239,7 @@ <property name="rootrel.oculusvr.sdk" value="oculusvr-sdk"/> <property name="rel.oculusvr.sdk" value="${project.root}/${rootrel.oculusvr.sdk}"/> <condition property="oculusvr.sdk.available"> - <available file="${rel.oculusvr.sdk}/LibOVR/Src/OVR_CAPI.h"/> + <available file="${rel.oculusvr.sdk}/LibOVR/Include/OVR_CAPI.h"/> </condition> <property name="results.test" value="${build}/test/results" /> diff --git a/make/build-oculusvr.xml b/make/build-oculusvr.xml index 1d280d882..1090ce565 100644 --- a/make/build-oculusvr.xml +++ b/make/build-oculusvr.xml @@ -62,19 +62,29 @@ <property name="classes" value="${build.oculusvr}/classes" /> <!-- The OculusVR headers from which Java files are generated --> + <property name="stub.includes.kern" value="${rel.oculusvr.sdk}/LibOVRKernel/Src" /> + <property name="stub.includes.inc" value="${rel.oculusvr.sdk}/LibOVR/Include" /> <property name="stub.includes.ovr" value="${rel.oculusvr.sdk}/LibOVR/Src" /> - <property name="stub.includes.all.ovr" value="${stub.includes.ovr},${stub.includes.ovr}/CAPI" /> + <property name="stub.includes.all.ovr" value="${stub.includes.kern},${stub.includes.inc},${stub.includes.ovr},${stub.includes.ovr}/CAPI" /> <echo message="rel.oculusvr.sdk ${rel.oculusvr.sdk}" /> + <echo message="stub.includes.kern ${stub.includes.kern}" /> + <echo message="stub.includes.inc ${stub.includes.inc}" /> <echo message="stub.includes.ovr ${stub.includes.ovr}" /> <echo message="stub.includes.all.ovr ${stub.includes.all.ovr}"/> - <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.ovr}"> + <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.kern}"> + <include name="**" /> + </fileset> + <fileset id="stub.includes.dependencies.fileset.2" dir="${stub.includes.inc}"> + <include name="**" /> + </fileset> + <fileset id="stub.includes.dependencies.fileset.3" dir="${stub.includes.ovr}"> <include name="**" /> </fileset> <!-- echo message="stub.includes.dependencies.fileset.1 ${toString:stub.includes.dependencies.fileset.1}"/ --> - <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" /> - <fileset id="stub.includes.dependencies.fileset.3" dir="${config.oculusvr}"> + <fileset id="stub.includes.dependencies.fileset.4" file="${gluegen.jar}" /> + <fileset id="stub.includes.dependencies.fileset.5" dir="${config.oculusvr}"> <include name="*.cfg" /> <include name="*.java" /> <include name="*.c" /> @@ -125,6 +135,8 @@ <srcfileset refid="stub.includes.dependencies.fileset.1" /> <srcfileset refid="stub.includes.dependencies.fileset.2" /> <srcfileset refid="stub.includes.dependencies.fileset.3" /> + <srcfileset refid="stub.includes.dependencies.fileset.4" /> + <srcfileset refid="stub.includes.dependencies.fileset.5" /> <targetfileset dir="${src.generated}"> <include name="**/*.java" /> <include name="**/*.c" /> @@ -138,6 +150,8 @@ <srcfiles refid="stub.includes.dependencies.fileset.1" /> <srcfiles refid="stub.includes.dependencies.fileset.2" /> <srcfiles refid="stub.includes.dependencies.fileset.3" /> + <srcfiles refid="stub.includes.dependencies.fileset.4" /> + <srcfiles refid="stub.includes.dependencies.fileset.5" /> </uptodate> <condition property="java.generate.skip"> @@ -156,8 +170,8 @@ config="${config.oculusvr}/oculusvr.cfg" literalInclude="${stub.includes.gluegen.gg},${stub.includes.all.ovr}" emitter="com.jogamp.gluegen.JavaEmitter" - debug="false" - dumpCPP="false"> + debug="true" + dumpCPP="true"> <classpath refid="gluegen.classpath" /> </gluegen> <!-- @@ -417,67 +431,67 @@ <include name="${rootrel.generated.c}/OVR_JNI.c"/> </patternset> <patternset id="c.src.files.oculusvr.cpp"> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_CAPI.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_DistortionRenderer.cpp"/> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.cpp"/--> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/GL/CAPI_GL_HSWDisplay.cpp"/--> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/GL/CAPI_GL_Util.cpp"/--> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/GL/CAPI_GLE.cpp"/--> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_FrameTimeManager.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_HMDState.cpp"/> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_HSWDisplay.cpp"/ --> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_LatencyStatistics.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Alg.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Allocator.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Atomic.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Callbacks.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_CRC32.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_DebugHelp.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_File.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_FileFILE.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_JSON.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Lockless.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Log.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Rand.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_RefCount.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_SharedMemory.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Std.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_String.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_String_FormatUtil.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_String_PathUtil.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_SysFile.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_System.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_ThreadCommandQueue.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_ThreadsPthread.cpp" if="isLinux"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_ThreadsPthread.cpp" if="isOSX"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp" if="isWindows"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_Timer.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Kernel/OVR_UTF8Util.cpp"/> + + <!-- include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_Direct3D.cpp" if="isWindows"/ --> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_GetSystemSpecs.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_ImageWindow.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_LongPollThread.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_SystemGUI.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_SystemInfo.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_Watchdog.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_SystemGUI_OSX.mm" if="isOSX"/> + <include name="${rootrel.oculusvr.sdk}/LibOVRKernel/Src/Util/Util_SystemInfo_OSX.mm" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_JSON.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_CAPI.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_CAPI_Util.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Linux_UDEV.cpp" if="isLinux"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Profile.cpp"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_SerialFormat.cpp"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Stereo.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_StereoProjection.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Alg.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Allocator.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Atomic.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_CRC32.cpp"/> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_DebugHelp.cpp"/ --> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_File.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_FileFILE.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Lockless.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Log.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Math.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_RefCount.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_SharedMemory.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Std.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_String.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_String_FormatUtil.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_String_PathUtil.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_SysFile.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_System.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_ThreadCommandQueue.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_Timer.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_UTF8Util.cpp"/> - - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_ImageWindow.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_Interface.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_LatencyTest2Reader.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_Render_Stereo.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_SystemGUI.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_SystemGUI_OSX.mm" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_SystemInfo.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_SystemInfo_OSX.mm" if="isOSX"/> + <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_DistortionRenderer.cpp"/ --> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_DistortionTiming.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_FrameLatencyTracker.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_FrameTimeManager3.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_HMDState.cpp"/> + <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/CAPI/CAPI_HSWDisplay.cpp"/ --> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Display.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Linux_Display.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Linux_SDKWindow.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_OSX_Display.cpp" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Win32_Display.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Win32_FocusReader.cpp" if="isWindows"/> + <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Linux_Display.cpp" if="isLinux"/ --> + <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Linux_SDKWindow.cpp" if="isLinux"/ --> + <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_OSX_Display.cpp" if="isOSX"/ --> + <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Win32_Display.cpp" if="isWindows"/ --> + <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Win32_FocusReader.cpp" if="isWindows"/ --> <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Win32_RenderShim.cpp" if="isWindows"/ --> <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_Win32_ShimFunctions.cpp" if="isWindows"/ --> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_OSX_FocusObserver.mm" if="isOSX"/ --> - <!-- include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Displays/OVR_OSX_FocusReader.mm" if="isOSX"/ --> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_BitStream.cpp"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_NetworkPlugin.cpp"/> @@ -488,14 +502,20 @@ <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_Unix_Socket.cpp" if="isLinux"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_Unix_Socket.cpp" if="isOSX"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_Win32_Socket.cpp" if="isWindows"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Service/Service_NetClient.cpp"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Service/Service_NetSessionCommon.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Service/Service_Win32_FastIPC_Client.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Tracking/Tracking_SensorStateReader.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_Interface.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_LatencyTest2Reader.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_MatFile.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_Render_Stereo.cpp"/> - <include name="${rootrel.oculusvr.sdk}/3rdParty/TinyXml/tinyxml2.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Vision/SensorFusion/Vision_SensorStateReader.cpp"/> - <include name="${rootrel.oculusvr.sdk}/3rdParty/EDID/edid.cpp" if="isLinux"/> + <!-- include name="${rootrel.oculusvr.sdk}/3rdParty/TinyXml/tinyxml2.cpp"/ --> + <!-- include name="${rootrel.oculusvr.sdk}/3rdParty/EDID/edid.cpp" if="isLinux"/ --> </patternset> <echo message="Compiling @{output.lib.name}" /> @@ -530,6 +550,8 @@ <sysincludepath path="${java.includes.dir}"/> <sysincludepath path="${java.includes.dir.platform}"/> <sysincludepath path="${stub.includes.gluegen.cc}"/> + <includepath path="${stub.includes.kern}"/> + <includepath path="${stub.includes.inc}"/> <includepath path="${stub.includes.ovr}"/> <includepath path="${stub.includes.ovr}/CAPI"/> @@ -537,8 +559,12 @@ <includepath path="${src.c}"/> <includepath path="${src.generated.c}" /> - <compilerarg location="start" value="-ObjC" if="isOSX"/> + <compilerarg location="start" value="-ObjC" if="isOSX"/> + <compilerarg location="start" value="-mmacosx-version-min=10.7" if="isOSX"/> + <compilerarg value="-municode" if="isMingW"/> + <compilerarg value="-DUNICODE" if="isMingW"/> + <compilerarg value="-D_UNICODE" if="isMingW"/> </compiler> </cc> <!-- C++ Compilation --> @@ -558,6 +584,8 @@ <sysincludepath path="${java.includes.dir}"/> <sysincludepath path="${java.includes.dir.platform}"/> <sysincludepath path="${stub.includes.gluegen.cc}"/> + <includepath path="${stub.includes.kern}"/> + <includepath path="${stub.includes.inc}"/> <includepath path="${stub.includes.ovr}"/> <includepath path="${stub.includes.ovr}/CAPI"/> @@ -565,16 +593,28 @@ <includepath path="${src.c}"/> <includepath path="${src.generated.c}" /> - <compilerarg location="start" value="-ObjC++" if="isOSX"/> - <compilerarg location="start" value="-x" if="isCLANG" unless="isOSX"/> - <compilerarg location="start" value="c++" if="isCLANG" unless="isOSX"/> - + <compilerarg location="start" value="-ObjC++" if="isOSX"/> + <compilerarg location="start" value="-x" if="isCLANG" unless="isOSX"/> + <compilerarg location="start" value="c++" if="isCLANG" unless="isOSX"/> + <!-- + <compilerarg location="start" value="-x" if="isCLANG"/> + <compilerarg location="start" value="c++" if="isCLANG"/> + --> + <compilerarg location="start" value="-stdlib=libc++" if="isOSX"/> + <compilerarg location="start" value="-mmacosx-version-min=10.7" if="isOSX"/> + + <compilerarg value="-std=c++11"/> <compilerarg value="-fno-rtti"/> + <compilerarg value="-fno-strict-aliasing"/> + <compilerarg value="-msse2"/> <!-- oops FIXME --> + <compilerarg value="-DHEADLESS_APP=1"/> + <!-- compilerarg value="-DOVR_PRIVATE_FILE=''"/ --> + <compilerarg value="-DOVR_STATIC_BUILD"/> - <compilerarg value="-municode" if="isMingW"/> - <compilerarg value="-DUNICODE" if="isMingW"/> - <compilerarg value="-D_UNICODE" if="isMingW"/> + <compilerarg value="-municode" if="isMingW"/> + <compilerarg value="-DUNICODE" if="isMingW"/> + <compilerarg value="-D_UNICODE" if="isMingW"/> </compiler> </cc> <!-- Linkage --> @@ -606,12 +646,15 @@ <syslibset dir="/usr/lib/amd64" libs="X11 Xrandr udev m" if="isSolarisAMD64"/> <syslibset dir="/usr/lib/sparcv9" libs="X11 Xrandr udev m" if="isSolarisSparcv9"/> + <linkerarg location="start" value="-mmacosx-version-min=10.7" if="isOSX"/> + <!-- syslibset libs="stdc++" Don't link dynamic Static link directive must be at the end! --> - <linkerarg location="end" value="-Wl,-Bstatic" if="isGCC"/> - <linkerarg location="end" value="-lstdc++" /> - <linkerarg location="end" value="-Wl,-Bdynamic" if="isGCC"/> + <linkerarg location="end" value="-Wl,-Bstatic" if="isGCC" unless="isOSX"/> + <linkerarg location="end" value="-lstdc++" unless="isOSX"/> + <linkerarg location="end" value="-Wl,-Bdynamic" if="isGCC" unless="isOSX"/> + <linkerarg location="end" value="-lc++" if="isOSX"/> </linker> </cc> diff --git a/make/config/oculusvr/oculusvr-common.cfg b/make/config/oculusvr/oculusvr-common.cfg index 86d0ce745..d42ddae86 100644 --- a/make/config/oculusvr/oculusvr-common.cfg +++ b/make/config/oculusvr/oculusvr-common.cfg @@ -22,11 +22,16 @@ Ignore ovrRenderAPIConfig.PlatformData # Not native sized: CType['uintptr_t *', size [fixed false, lnx64 64], [array*1]] Ignore ovrTexture.PlatformData +# FIXME: Add wrapper for native/java callbacks +Ignore ovrLogCallback +Ignore ovrInitParams.LogCallback + # We use the SDK in headless mode: # #define HEADLESS_APP 1 # implying: ovrHmdCap_ExtendDesktop # Ignore ovr_InitializeRenderingShim +Ignore ovr_InitializeRenderingShimVersion Ignore ovrHmd_RegisterPostDistortionCallback Ignore ovrHmd_AttachToWindow # HSW = Health and Safety Warning diff --git a/make/config/oculusvr/oculusvr.c b/make/config/oculusvr/oculusvr.c index 35f86eb78..a3a9a3512 100644 --- a/make/config/oculusvr/oculusvr.c +++ b/make/config/oculusvr/oculusvr.c @@ -6,4 +6,7 @@ typedef struct ovrHmdStruct { #define OVR_ALIGNAS(n) +/** Removed in 0.5.0, but permanently enabled! */ +#define ovrDistortionCap_Chromatic 0x01 + #include "OVR_CAPI.h" diff --git a/make/scripts/make.jogl.all.macosx-java6.sh b/make/scripts/make.jogl.all.macosx-java6.sh index 2dfcb372e..4dd4a2619 100755 --- a/make/scripts/make.jogl.all.macosx-java6.sh +++ b/make/scripts/make.jogl.all.macosx-java6.sh @@ -25,6 +25,7 @@ export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org" export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet" +# BUILD_ARCHIVE=true \ ant \ - -Drootrel.build=build-macosx \ - $* 2>&1 | tee make.jogl.all.macosx.log + -Drootrel.build=build-macosx-java6 \ + $* 2>&1 | tee make.jogl.all.macosx-java6.log diff --git a/make/scripts/make.jogl.all.macosx.sh b/make/scripts/make.jogl.all.macosx.sh index dd5415b78..aa85b9213 100755 --- a/make/scripts/make.jogl.all.macosx.sh +++ b/make/scripts/make.jogl.all.macosx.sh @@ -25,6 +25,7 @@ export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org" export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet" +# BUILD_ARCHIVE=true \ ant \ -Drootrel.build=build-macosx \ $* 2>&1 | tee make.jogl.all.macosx.log diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index eeec83ec1..083a6d78b 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -409,7 +409,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile02NEWTNoARBCtx $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile03NEWTOffscreen $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile04NEWTOffscreenNoARBCtx $* -testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* +#testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* # # Stereo @@ -547,7 +547,7 @@ testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOMix2DemosES2NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOMRTNEWT01 $* -#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLPointsNEWT $* +testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLPointsNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLMesaBug651NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLMesaBug658NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestX11DefaultDisplay $* diff --git a/oculusvr-sdk b/oculusvr-sdk -Subproject 3c7b8a17e907f4ef2afd9f77db566a3f6179cbe +Subproject eea4866ec9af301985d3eb2f648b8c95661fae2 diff --git a/src/jogl/native/openmax/jogamp_opengl_util_av_impl_OMXGLMediaPlayer.c b/src/jogl/native/openmax/jogamp_opengl_util_av_impl_OMXGLMediaPlayer.c index 3166306ba..fc2fb6ea3 100644 --- a/src/jogl/native/openmax/jogamp_opengl_util_av_impl_OMXGLMediaPlayer.c +++ b/src/jogl/native/openmax/jogamp_opengl_util_av_impl_OMXGLMediaPlayer.c @@ -39,7 +39,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_OMXGLMediaPlayer_init jclass c; if (omxGLMediaPlayerClazz != NULL) { - return; + return JNI_FALSE; } c = (*env)->FindClass(env, ClazzNameOMXGLMediaPlayer); diff --git a/src/jogl/native/openmax/omx_tool.h b/src/jogl/native/openmax/omx_tool.h index 022c56cf9..31abfc5b2 100644 --- a/src/jogl/native/openmax/omx_tool.h +++ b/src/jogl/native/openmax/omx_tool.h @@ -27,6 +27,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> // FIXME: Move all sync/buffer handling to Java - Already done -> GLMediaPlayerImpl #define EGLIMAGE_MAX_BUFFERS 4 diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java index 29c7f9898..93c28d370 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java @@ -37,7 +37,8 @@ import com.jogamp.nativewindow.NativeWindowException; import com.jogamp.nativewindow.VisualIDHolder; import com.jogamp.nativewindow.util.Insets; import com.jogamp.nativewindow.util.Point; - +import com.jogamp.nativewindow.util.Rectangle; +import com.jogamp.nativewindow.util.RectangleImmutable; import com.jogamp.common.util.IntBitfield; import com.jogamp.nativewindow.egl.EGLGraphicsDevice; import com.jogamp.newt.event.MouseEvent; @@ -63,6 +64,75 @@ public class WindowDriver extends WindowImpl { windowHandleClose = 0; } + /** + * Clamp given rectangle to given screen bounds. + * + * @param screen + * @param rect the {@link RectangleImmutable} in pixel units + * @param definePosSize if {@code true} issue {@link #definePosition(int, int)} and {@link #defineSize(int, int)} + * if either has changed. + * @return If position or size has been clamped a new {@link RectangleImmutable} instance w/ clamped values + * will be returned, otherwise the given {@code rect} is returned. + */ + private RectangleImmutable clampRect(final ScreenDriver screen, final RectangleImmutable rect, final boolean definePosSize) { + int x = rect.getX(); + int y = rect.getY(); + int w = rect.getWidth(); + int h = rect.getHeight(); + final int s_w = screen.getWidth(); + final int s_h = screen.getHeight(); + boolean modPos = false; + boolean modSize = false; + if( 0 > x ) { + x = 0; + modPos = true; + } + if( 0 > y ) { + y = 0; + modPos = true; + } + if( s_w < x + w ) { + if( 0 < x ) { + x = 0; + modPos = true; + } + if( s_w < w ) { + w = s_w; + modSize = true; + } + } + if( s_h < y + h ) { + if( 0 < y ) { + y = 0; + modPos = true; + } + if( s_h < h ) { + h = s_h; + modSize = true; + } + } + if( modPos || modSize ) { + if( definePosSize ) { + if( modPos ) { + definePosition(x, y); + } + if( modSize ) { + defineSize(w, h); + } + } + return new Rectangle(x, y, w, h); + } else { + return rect; + } + } + + @Override + protected boolean canCreateNativeImpl() { + // clamp if required incl. redefinition of position and size + clampRect((ScreenDriver) getScreen(), new Rectangle(getX(), getY(), getWidth(), getHeight()), true); + return true; // default: always able to be created + } + @Override protected void createNativeImpl() { if(0!=getParentWindowHandle()) { @@ -110,7 +180,8 @@ public class WindowDriver extends WindowImpl { chosenCaps.setBackgroundOpaque(capsRequested.isBackgroundOpaque()); } setGraphicsConfiguration(cfg); - nativeWindowHandle = CreateWindow0(display.getBCMHandle(), layer, getX(), getY(), getWidth(), getHeight(), + nativeWindowHandle = CreateWindow0(display.getBCMHandle(), layer, + getX(), getY(), getWidth(), getHeight(), chosenCaps.isBackgroundOpaque(), chosenCaps.getAlphaBits()); if (nativeWindowHandle == 0) { throw new NativeWindowException("Error creating egl window: "+cfg); @@ -155,7 +226,9 @@ public class WindowDriver extends WindowImpl { @Override protected boolean reconfigureWindowImpl(final int x, final int y, final int width, final int height, final int flags) { - reconfigure0(nativeWindowHandle, x, y, width, height, flags); + final RectangleImmutable rect = clampRect((ScreenDriver) getScreen(), new Rectangle(x, y, width, height), false); + // reconfigure0 will issue position/size changed events if required + reconfigure0(nativeWindowHandle, rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight(), flags); return true; } @@ -174,7 +247,7 @@ public class WindowDriver extends WindowImpl { final int x, final int y, final short button, final float[] rotationXYZ, final float rotationScale) { if( MouseEvent.EVENT_MOUSE_MOVED == eventType ) { final DisplayDriver display = (DisplayDriver) getScreen().getDisplay(); - display.moveActivePointerIcon(x, y); + display.moveActivePointerIcon(getX() + x, getY() + y); } super.doMouseEvent(enqueue, wait, eventType, modifiers, x, y, button, rotationXYZ, rotationScale); } diff --git a/src/newt/native/bcm_vc_iv.c b/src/newt/native/bcm_vc_iv.c index 6b1ee3aaf..611dd5a4a 100644 --- a/src/newt/native/bcm_vc_iv.c +++ b/src/newt/native/bcm_vc_iv.c @@ -457,7 +457,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_bcm_vc_iv_WindowDriver_reconfigur (*env)->CallVoidMethod(env, obj, positionChangedID, JNI_FALSE, x, y); } if( sizeChanged ) { - (*env)->CallVoidMethod(env, obj, sizeChangedID, JNI_FALSE, (jint) width, (jint) height, JNI_FALSE); + (*env)->CallVoidMethod(env, obj, sizeChangedID, JNI_FALSE, width, height, JNI_FALSE); } } diff --git a/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java b/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java index 50e0efd30..1b85e8450 100644 --- a/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java +++ b/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java @@ -41,6 +41,16 @@ import java.util.jar.Manifest; public class OVRVersion extends JogampVersion { + /** + * Default init-params for {@link OVR#ovr_Initialize(ovrInitParams)}, + * w/ flags {@link OVR#ovrInit_ServerOptional}. + */ + public static final ovrInitParams defaultInitParams; + static { + defaultInitParams = ovrInitParams.create(); + defaultInitParams.setFlags(OVR.ovrInit_ServerOptional); + } + protected static volatile OVRVersion jogampCommonVersionInfo; protected OVRVersion(final String packageName, final Manifest mf) { @@ -64,7 +74,7 @@ public class OVRVersion extends JogampVersion { if(null==sb) { sb = new StringBuilder(); } - if( !OVR.ovr_Initialize() ) { // recursive .. + if( !OVR.ovr_Initialize(defaultInitParams) ) { // recursive .. sb.append("\tOVR not available").append(Platform.getNewline()); } else { final ovrHmdDesc hmdDesc = OVR.ovrHmd_Create(ovrHmdIndex); diff --git a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java index 772891115..f9969a9ad 100644 --- a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java +++ b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java @@ -36,9 +36,8 @@ import com.jogamp.opengl.util.stereo.StereoDevice; import com.jogamp.opengl.util.stereo.StereoDeviceFactory; public class OVRStereoDeviceFactory extends StereoDeviceFactory { - public static boolean isAvailable() { - if( OVR.ovr_Initialize() ) { // recursive .. + if( OVR.ovr_Initialize(OVRVersion.defaultInitParams) ) { // recursive .. boolean res = false; final int count = OVR.ovrHmd_Detect(); System.err.println("Detect.0: ovrHmd_Detect() -> "+count); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp index 3210762b1..82268958f 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp @@ -6,9 +6,15 @@ #define mgl_FragColor gl_FragColor #endif +#ifdef GL_ES + #define MEDIUMP mediump +#else + #define MEDIUMP +#endif + // [0].rgba: 0, smooth, attnMinSz, attnMaxSz // [1].rgba: attnCoeff(3), attnFadeTs -uniform vec4 mgl_PointParams[2]; +uniform MEDIUMP vec4 mgl_PointParams[2]; #define pointSmooth (mgl_PointParams[0].g) diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp index 4fa49b901..562874785 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp @@ -4,12 +4,18 @@ #define varying out #endif +#ifdef GL_ES + #define MEDIUMP mediump +#else + #define MEDIUMP +#endif + uniform vec4 mgl_ColorStatic; uniform mat4 mgl_PMVMatrix[4]; // P, Mv, Mvi and Mvit (transpose(inverse(ModelView)) == normalMatrix) // [0].rgba: 0, smooth, attnMinSz, attnMaxSz // [1].rgba: attnCoeff(3), attnFadeTs -uniform vec4 mgl_PointParams[2]; +uniform MEDIUMP vec4 mgl_PointParams[2]; #define pointSmooth (mgl_PointParams[0].g) #define pointSizeMin (mgl_PointParams[0].b) |