diff options
author | Sven Gothel <[email protected]> | 2015-03-27 03:07:58 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-27 03:07:58 +0100 |
commit | e626312c79f49b2244b5fdae8dbbf1ee22520817 (patch) | |
tree | 717c760aa7f02bd67ca5ab020844286ae4caa367 /make | |
parent | bb6a8fdc8decdbec64bbab0fe2175e76211d0e77 (diff) |
Bug 1116: Oculus SDK 0.4.4 support for JOGL - Part-3: New set of C-files, adapt to new SDK API
- Tested on Windows and working StereoDemo01 w/ DK2!
Diffstat (limited to 'make')
-rw-r--r-- | make/build-oculusvr.xml | 87 | ||||
-rw-r--r-- | make/config/oculusvr/oculusvr-common.cfg | 19 | ||||
-rw-r--r-- | make/config/oculusvr/oculusvr.c | 2 | ||||
-rw-r--r-- | make/config/oculusvr/oculusvr.cfg | 1 | ||||
-rwxr-xr-x | make/scripts/tests-win.bat | 4 | ||||
-rw-r--r-- | make/scripts/tests.sh | 3 |
6 files changed, 71 insertions, 45 deletions
diff --git a/make/build-oculusvr.xml b/make/build-oculusvr.xml index 48d48056d..717322efa 100644 --- a/make/build-oculusvr.xml +++ b/make/build-oculusvr.xml @@ -403,71 +403,81 @@ <include name="${rootrel.generated.c}/OVR_JNI.c"/> </patternset> <patternset id="c.src.files.oculusvr.cpp"> - <include name="${rootrel.src.c}/OVRImplMisc.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/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_GlobalState.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/OVR_DeviceHandle.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_DeviceImpl.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}/LibOVR/Src/OVR_JSON.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_LatencyTestImpl.cpp"/> <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Profile.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_SensorCalibration.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_SensorFilter.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_SensorFusion.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_SensorImpl.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Sensor2Impl.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_SensorImpl_Common.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_SensorTimeFilter.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_ThreadCommandQueue.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/OVR_Recording.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_LatencyTest.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Util/Util_LatencyTest2.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_SystemInfo.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_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/Net/OVR_BitStream.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_NetworkPlugin.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_PacketizedTCPSocket.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_RPC1.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_Session.cpp"/> + <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Net/OVR_Socket.cpp"/> + <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/Tracking/Tracking_SensorStateReader.cpp"/> + <include name="${rootrel.oculusvr.sdk}/3rdParty/TinyXml/tinyxml2.cpp"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Linux_HIDDevice.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Linux_SensorDevice.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Linux_DeviceManager.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Linux_HMDDevice.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Linux_SensorDevice.cpp" if="isLinux"/> - <include name="${rootrel.oculusvr.sdk}/3rdParty/EDID/edid.cpp" if="isLinux"/> - - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Win32_DeviceManager.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Win32_DeviceStatus.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Win32_HIDDevice.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Win32_HMDDevice.cpp" if="isWindows"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_Win32_SensorDevice.cpp" if="isWindows"/> - - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_OSX_DeviceManager.cpp" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_OSX_HIDDevice.cpp" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_OSX_HMDDevice.cpp" if="isOSX"/> - <include name="${rootrel.oculusvr.sdk}/LibOVR/Src/OVR_OSX_SensorDevice.cpp" if="isOSX"/> + <include name="${rootrel.oculusvr.sdk}/3rdParty/EDID/edid.cpp" if="isLinux"/> </patternset> <echo message="Compiling @{output.lib.name}" /> @@ -538,6 +548,7 @@ <compilerarg location="start" value="c++" if="isCLANG"/> <compilerarg value="-fno-rtti"/> + <compilerarg value="-DHEADLESS_APP=1"/> <compilerarg value="-municode" if="isMingW"/> <compilerarg value="-DUNICODE" if="isMingW"/> @@ -560,6 +571,8 @@ <linker extends="@{linker.cfg.id}"> <syslibset libs="setupapi, winmm" if="isWindows"/> <syslibset libs="gdi32, kernel32" if="isWindows"/> + <syslibset libs="version" if="isWindows"/> + <syslibset libs="ws2_32" if="isWindows"/> <syslibset libs="X11 Xrandr udev m" if="isLinux" unless="isLinuxARMv6" /> <syslibset dir="${env.TARGET_PLATFORM_ROOT}/usr/lib" diff --git a/make/config/oculusvr/oculusvr-common.cfg b/make/config/oculusvr/oculusvr-common.cfg index c330ce5be..86d0ce745 100644 --- a/make/config/oculusvr/oculusvr-common.cfg +++ b/make/config/oculusvr/oculusvr-common.cfg @@ -17,14 +17,23 @@ RuntimeExceptionType OVRException # Mappings for data types Opaque boolean ovrBool -# Not implemented in SDK !? -Ignore ovrHmd_ProcessLatencyTest - # Not native sized: CType['uintptr_t *', size [fixed false, lnx64 64], [array*1]] Ignore ovrRenderAPIConfig.PlatformData # Not native sized: CType['uintptr_t *', size [fixed false, lnx64 64], [array*1]] Ignore ovrTexture.PlatformData +# We use the SDK in headless mode: +# #define HEADLESS_APP 1 +# implying: ovrHmdCap_ExtendDesktop +# +Ignore ovr_InitializeRenderingShim +Ignore ovrHmd_RegisterPostDistortionCallback +Ignore ovrHmd_AttachToWindow +# HSW = Health and Safety Warning +Ignore ovrHSWDisplayState +Ignore ovrHmd_GetHSWDisplayState +Ignore ovrHmd_DismissHSWDisplay + # These routines use or return strings ReturnsString ovrHmd_GetLastError ReturnsString ovrHmd_GetLatencyTestResult @@ -39,8 +48,8 @@ ReturnedArrayLength ovrHmdDesc.Handle 1 ReturnedArrayLength ovrDistortionMesh.pVertexData getVertexCount() ReturnedArrayLength ovrDistortionMesh.pIndexData getIndexCount() -ReturnValueCapacity ovrHmd_Create sizeof(ovrHmd) -ReturnValueCapacity ovrHmd_CreateDebug sizeof(ovrHmd) +ReturnValueCapacity ovrHmd_Create sizeof(ovrHmdDesc) +ReturnValueCapacity ovrHmd_CreateDebug sizeof(ovrHmdDesc) JavaPrologue ovr_Initialize if( !isAvailable() ) { return false; } JavaPrologue ovrHmd_Create if( !isAvailable() ) { return null; } diff --git a/make/config/oculusvr/oculusvr.c b/make/config/oculusvr/oculusvr.c index bab34e5a9..35f86eb78 100644 --- a/make/config/oculusvr/oculusvr.c +++ b/make/config/oculusvr/oculusvr.c @@ -1,4 +1,6 @@ +#define HEADLESS_APP 1 + typedef struct ovrHmdStruct { } OvrHmdContext; diff --git a/make/config/oculusvr/oculusvr.cfg b/make/config/oculusvr/oculusvr.cfg index 11e1ee78b..d2d446f21 100644 --- a/make/config/oculusvr/oculusvr.cfg +++ b/make/config/oculusvr/oculusvr.cfg @@ -12,6 +12,7 @@ IncludeAs CustomJavaCode OVR oculusvr-ovr-CustomJavaCode.java ManualStaticInitCall OVR # Provide #includes to native code +CustomCCode #define HEADLESS_APP 1 CustomCCode typedef struct ovrHmdStruct { CustomCCode } OvrHmdContext; CustomCCode #include <OVR_CAPI.h> diff --git a/make/scripts/tests-win.bat b/make/scripts/tests-win.bat index 7f25e33b8..0f73de53d 100755 --- a/make/scripts/tests-win.bat +++ b/make/scripts/tests-win.bat @@ -79,7 +79,7 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01 REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile02NEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile02NEWTNoARBCtx $* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile03NEWTOffscreen $* -scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile04NEWTOffscreenNoARBCtx $* +REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile04NEWTOffscreenNoARBCtx $* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.glels.TestGLContextDrawableSwitch02AWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLContextDrawableSwitch01NEWT %* @@ -221,4 +221,4 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.graph.demos.GPUUISceneNewt REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestBug461FBOSupersamplingSwingAWT REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01 -REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.stereo.StereoDemo01 %* +scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.stereo.StereoDemo01 %* diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 2d137a0b3..ed9d85896 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -408,12 +408,13 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $* #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 $* +#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile04NEWTOffscreenNoARBCtx $* #testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* # # Stereo # +testnoawt com.jogamp.oculusvr.OVRVersion $* #testnoawt com.jogamp.opengl.test.junit.jogl.stereo.StereoDemo01 $* # |