aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE.txt532
-rw-r--r--LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj763
-rw-r--r--LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata7
-rw-r--r--LibOVR/Src/Displays/OVR_OSX_Display.cpp368
-rw-r--r--LibOVR/Src/Displays/OVR_OSX_Display.h139
-rw-r--r--LibOVR/Src/Displays/OVR_OSX_FocusObserver.h47
-rw-r--r--LibOVR/Src/Displays/OVR_OSX_FocusReader.h17
-rw-r--r--LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp842
-rw-r--r--LibOVR/Src/Net/OVR_Unix_Socket.cpp596
-rw-r--r--LibOVR/Src/Net/OVR_Unix_Socket.h152
-rw-r--r--READ_ME_FIRST.txt36
-rwxr-xr-x[-rw-r--r--]Release_Notes.txt0
-rw-r--r--Samples/CommonSrc/Platform/OSX_Gamepad.cpp430
-rw-r--r--Samples/CommonSrc/Platform/OSX_Gamepad.h66
-rw-r--r--Samples/CommonSrc/Platform/OSX_Platform.h113
-rw-r--r--Samples/CommonSrc/Platform/OSX_Platform.mm553
-rw-r--r--Samples/CommonSrc/Platform/OSX_PlatformObjc.h53
-rw-r--r--Samples/CommonSrc/Platform/OSX_WavPlayer.cpp250
-rw-r--r--Samples/CommonSrc/Platform/OSX_WavPlayer.h72
-rw-r--r--Samples/LibOVR_With_Samples.xcworkspace/contents.xcworkspacedata10
-rw-r--r--Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/LibOVR.xcscheme59
-rw-r--r--Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/OculusWorldDemo.xcscheme86
-rw-r--r--Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo-Info.plist34
-rw-r--r--Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj/project.pbxproj460
24 files changed, 5401 insertions, 284 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
index b240aa8..8979893 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,266 +1,266 @@
-Oculus VR Rift SDK Software License
-
-Oculus VR, LLC Software Development Kit License Agreement
-
-Copyright © 2014 Oculus VR, LLC. All rights reserved.
-
-The text of this may be found at: http://www.oculusvr.com/licenses/LICENSE-3.2
-
-Human-Readable Summary*:
-
-You are Free to:
-
-Use, modify, and distribute the Oculus VR Rift SDK in source and binary
-form with your applications/software.
-
-With the Following Restrictions:
-
-You can only distribute or re-distribute the source code to LibOVR in
-whole, not in part.
-
-Modifications to the Oculus VR Rift SDK in source or binary form must
-be shared with Oculus VR.
-
-If your applications cause health and safety issues, you may lose your
-right to use the Oculus VR Rift SDK, including LibOVR.
-
-The Oculus VR Rift SDK may not be used to interface with unapproved commercial
-virtual reality mobile or non-mobile products or hardware.
-
-* - This human-readable Summary is not a license. It is simply a convenient
-reference for understanding the full Oculus VR Rift SDK License Agreement.
-The Summary is written as a user-friendly interface to the full Oculus VR Rift
-SDK License below. This Summary itself has no legal value, and its contents do
-not appear in the actual license.
-
-Full-length Legal Copy:
-
-1. Subject to the terms and conditions of this License Agreement (the "License"),
-Oculus VR, LLC ("Oculus VR") hereby grants to you a perpetual, worldwide,
-non-exclusive, no-charge, royalty-free, sublicenseable copyright license to use,
-reproduce, redistribute (subject to restrictions below), modify, and improve the
-software contained in this Oculus VR Rift Software Development Kit ("RIFT SDK"),
-including, but not limited to, the samples, headers, LibOVR headers, and LibOVR
-source. This license is subject to the following terms and conditions:
-
-1.1. This license includes the non-exclusive license and right to use (i) the RIFT
-SDK to make applications, content, games and demos (collectively and generally
-referred to as "Developer Content") that run on the Oculus VR approved mobile hardware
-and software products ("Oculus Approved Rift Products") and which may incorporate
-the RIFT SDK in whole or in part in binary or object code; and (ii) to use the
-RIFT SDK to create derivative works of the RIFT SDK itself ("RIFT SDK Derivatives"),
-whether in source, binary, or object form, in whole or in part, including third
-party software unless otherwise noted.
-
-1.2. RIFT SDK Derivatives are further defined as source, binary or object code
-derived exclusively from the RIFT SDK by you; provided, however, that RIFT SDK
-Derivatives do not include the Developer Content (engines, utilities, applications,
-content, games or demos) which may be developed using the RIFT SDK. By way of example
-a mobile application or game or demo that is developed using the RIFT SDK would not
-be a RIFT SDK Derivative , nor would a utility or tool set in a pre-existing game
-engine that is adapted to work with the RIFT SDK be a RIFT SDK Derivative.
-By way of example, but not limitation, a RIFT SDK Derivative is or would be: either (i)
-an adaptation of a utility or piece of code from the RIFT SDK to improve efficiency;
-or (ii) an addition of code or improvement to the RIFT SDK that adds functionality.
-
-1.3 For the sake of clarification when you use the RIFT SDK (including RIFT SDK
-Derivatives) in or with Developer Content, you retain all rights to your Developer
-Content, and you have no obligations to share or license Developer Content (including
-your source and object code) to Oculus VR or any third parties; provided, however,
-Oculus VR retains all rights to the RIFT SDK and the RIFT SDK Derivatives that may
-be incorporated into your Developer Content.
-
-1.4 You agree to and you will use the Flash Screen Warning and the Health and
-Safety Warnings (collectively the "Oculus Warnings") and the Oculus VR health and
-safety protocols found in the Oculus Best Practices Guide ("Oculus H&S Protocols"),
-and your use of the Oculus Warnings and the Oculus end user license agreement
-("Oculus EULA") with your Developer Content as provided for in the Oculus Developer
-Center, all of which can be found at the following link:
-https://developer.oculusvr.com/?action=doc.
-
-2. You, the recipient and user of the RIFT SDK, hereby agree and accept that that
-Oculus VR shall own all right, title and interest to the intellectual property
-rights, including, but limited to copyright, trademark and patent rights, to any
-RIFT SDK Derivatives that you may create, and you hereby assign any and all such
-rights to such RIFT SDK Derivatives to Oculus VR, subject to the following.
-
-2.1 We hereby grant to you the a fully paid up, no-charge, royalty-free,
-world-wide, in perpetuity, non-exclusive right and license back to use these RIFT
-SDK Derivatives solely in conjunction with the RIFT SDK (or any components of the
-RIFT SDK) and/or Developer Content on Oculus Rift Products as set forth herein.
-
-2.2 Furthermore, for the sake of clarification, Oculus VR and its assignees and
-licensees shall be free to use such RIFT SDK Derivatives without any approval
-from you and without compensation or attribution to you.
-
-2.3 You also agree upon Oculus VR's request to provide the source and binary code
-of any RIFT SDK Derivatives to Oculus VR. FAILURE TO COMPLY WITH THIS REQUEST
-IS THE BASIS FOR AUTOMATIC TERMINATION OF THIS LICENSE BY OCULUS VR.
-
-3. Subject to the terms and conditions of this License, your license to redistribute
-and sublicense the RIFT SDK and RIFT SDK Derivatives is also expressly made
-subject to the following conditions:
-
-3.1. You may sublicense and redistribute the source, binary, or object code of
-the RIFT SDK in whole or in part by itself for no charge or as part of a for charge
-piece of Developer Content; provided, however, you may only license, sublicense
-or redistribute the source, binary or object code of LibOVR in whole, and you may
-not license, sublicense or redistribute any portion or element of LibOVR separately
-or in part (in either source, binary or object form). If you license, sublicense
-or redistribute RIFT SDK Derivatives in and of themselves (not as a part of a
-piece of Developer Content) then you may only do that solely with and in conjunction
-with either the RIFT SDK or LibOVR. The RIFT SDK (including, but not limited to
-LibOVR), any RIFT SDK Derivatives, and any Developer Content may only be used
-with Oculus Approved Rift Products and may not be used, licensed, or sublicensed
-to interface with mobile software or hardware or other commercial headsets,
-mobile tablets or phones that are not authorized and approved by Oculus VR;
-
-3.2. You must include with all such redistributed or sublicensed RIFT SDK
-or RIFT SDK Derivatives code the following copyright notice:
-"Copyright © 2014 Oculus VR, LLC. All rights reserved," and include the
-list of conditions contained in this Section 3, including the full text of
-the disclaimer in Section 3.6 below;
-
-3.3. Neither the name of Oculus VR, LLC nor the names of Oculus VR, LLC's
-contributors, licensors, employees, or contractors, may be used to endorse or promote
-products derived from this RIFT SDK without specific prior written permission
-of Oculus VR, LLC;
-
-3.4. You must give any other recipients of the RIFT SDK or any elements thereof,
-including LibOVR or RIFT SDK Derivatives, a copy of this License as such recipients,
-licensees or sublicensees may only use the RIFT SDK or any RIFT SDK Derivatives
-or any elements thereof subject to the terms of this Licence and such recipients,
-licensees or sublicensees agreement and acceptance of this License with Oculus VR
-(which will convey all rights to the recipients’ or licensees’ or sublicensees’
-RIFT SDK Derivatives to Oculus VR), and you must cause any modified files to
-carry prominent notices stating that you changed the files;
-
-3.5. If the RIFT SDK or a specific element thereof such as LibOVR includes a
-"LICENSE" text file as part of its distribution (the "License Notice"), then
-any RIFT SDK Derivatives that you distribute with the RIFT SDK in whole or in
-part must include a readable copy of such attribution notices as are contained
-within the applicable License Notice file (excluding those notices that do not
-pertain to any part of the RIFT SDK Derivatives), in at least one of the following
-places: within a License Notice text file distributed as part of the RIFT SDK
-Derivatives; within the source form or documentation, if provided along with
-the RIFT SDK Derivatives; or, within a display generated by the RIFT SDK Derivatives,
-if and wherever such third-party notices normally appear. You must also include
-in the License Notice file for all RIFT SDK Derivatives a copy of all notices
-(including any product liability or health and safety notices). The contents
-of the License Notice file are for informational purposes only and do not modify
-the License. You may add your own attribution notices within RIFT SDK Derivatives
-that you distribute, alongside or as an addendum to the License Notice text from
-the RIFT SDK or any part thereof, provided that such additional attribution notices
-cannot be construed as modifying the License.
-
-3.6. THIS RIFT SDK AND ANY COMPONENT THEREOF IS PROVIDED BY OCULUS VR AND
-ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OCULUS VR AS THE
-COPYRIGHT OWNER OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS RIFT
-SDK OR THE RIFT SDK DERIVATIVES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-4. This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of Oculus VR, except as required for reasonable
-and customary use in describing the origin of the RIFT SDK, LibOVR, or any
-element thereof, and reproducing the content of the License Notice file.
-Oculus VR reserves all rights not expressly granted to you under this License.
-
-5. In no event and under no legal theory, whether in tort (including negligence),
-contract, or otherwise, unless required by applicable law (such as
-deliberate and grossly negligent acts) or agreed to in writing, shall Oculus VR
-or any contributor be liable to you or your licensees or sublicensees for
-damages, including any direct, indirect, special, incidental, or consequential
-damages of any character arising as a result of this License or out of the use
-or inability to use the RIFT SDK, LibOVR, any element thereof or any RIFT SDK
-Derivatives (including but not limited to damages for loss of goodwill, work
-stoppage, computer failure or malfunction, or any and all other commercial
-damages or losses), even if you or such contributor has been advised of the
-possibility of such damages.
-
-6. Your acceptance of the terms and conditions of this License in and of
-itself and for all Developer Content created as of March 1, 2014, may be
-evidenced by any of the following: your usage of the RIFT SDK or any element
-thereof, acceptance of the click-through agreement, or opening the packaging
-of the CD-ROM containing the RIFT SDK or any element thereof, including LibOVR.
-As this License is updated for future releases of the RIFT SDK and/or LibOVR,
-you agree to abide by and meet all requirements of future updates of this
-License for those future RIFT SDK releases as evidenced by the same usage of
-the RIFT SDK or any element thereof and the future updates of this License
-will apply for that future Developer Content that may developed for or with
-that future RIFT SDK or any element thereof (i.e., you cannot sidestep out
-of the requirements of future updates of the License by developing against
-an older release of the RIFT SDK or License).
-
-7. Oculus VR reserves the right to terminate this License and all your
-rights hereunder in the event you materially breach this License and fail
-to cure such breach within ten (10) business days after notice of breach
-from Oculus VR.
-
-8. Furthermore, Oculus VR also reserves the right to cancel or terminate
-this License for any of the following reasons upon notice to you, subject
-to the appeal process set forth in Section 14 for a wrongful termination:
-
- a) Intellectual property infringement by you with Developer Content
- or RIFT SDK Derivatives created by you that is used with or by the
- RIFT SDK or any part thereof, or any of the RIFT SDK Derivatives;
-
- b) Developer Content that violates or infringes upon applicable law;
-
- c) Health and safety issues associated with your Developer Content;
-
- d) Failure to comply with or use properly the Oculus Warnings,
- Oculus H&S Protocols, or Oculus EULA;
-
- e) Use of the RIFT SDK, RIFT SDK Derivatives or LibOVR with a
- commercial product other than an Oculus Approved Product; and
-
- f) Failure to provide required notices or deliver source code
- and/or binary of RIFT SDK Derivatives as set forth above.
-
-If you believe that you have been wrongfully terminated under this Section 8
-with respect to material breach or with respect to these above conditions,
-you have the right to appeal the termination of this License under Section 14.
-
-9. This License may be amended by Oculus VR on a prospective basis, and your
-usage of the License after such amendments or changes signifies your consent
-to and acceptance of any such amendments or changes on a going forward basis.
-
-10. In the event any provision of this License is determined to be invalid,
-prohibited or unenforceable by a court or other body of competent jurisdiction,
-this License shall be construed as if such invalid, prohibited or unenforceable
-provision has been more narrowly drawn so as not to be invalid, prohibited or
-unenforceable.
-
-11. You may not assign any rights or obligations under this License without
-the advance written consent of Oculus VR, which may be withheld in its sole
-discretion. Oculus VR may assign its rights or obligations under this License
-in its sole discretion.
-
-12. Failure of either party at any time to enforce any of the provisions of
-this License will not be construed as a waiver of such provisions or in any way
-affect the validity of this License or parts thereof.
-
-13. Your remedies under this License shall be limited to the right to collect
-money damages, if any, and you hereby waive your right to injunctive or other
-equitable relief.
-
-14. This License shall be governed by the laws of the State of California,
-without giving effect to choice of law principles. All disputes relating to
-this License shall be resolved by binding non-appearance-based arbitration
-before a neutral arbitrator in Orange County, California. If your License
-has been terminated hereunder by Oculus, you may appeal your termination
-through this arbitration process on an expedited basis with an arbitration
-within thirty days of your giving Oculus VR notice of the appeal. The
-arbitration shall be conducted in accordance with the rules and procedures
-of JAMS then in effect, and the judgment of the arbitrator shall be final
-and capable of entry in any court of competent jurisdiction. You agree
-to submit to the personal jurisdiction of the courts located within Orange
-County, California in connection with any entrance of an arbitrator’s judgment
-or decision or any dispute with respect to the arbitration process or procedure
-or Oculus VR’s exercise of its equitable rights or remedies.
+Oculus VR Rift SDK Software License
+
+Oculus VR, LLC Software Development Kit License Agreement
+
+Copyright © 2014 Oculus VR, LLC. All rights reserved.
+
+The text of this may be found at: http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Human-Readable Summary*:
+
+You are Free to:
+
+Use, modify, and distribute the Oculus VR Rift SDK in source and binary
+form with your applications/software.
+
+With the Following Restrictions:
+
+You can only distribute or re-distribute the source code to LibOVR in
+whole, not in part.
+
+Modifications to the Oculus VR Rift SDK in source or binary form must
+be shared with Oculus VR.
+
+If your applications cause health and safety issues, you may lose your
+right to use the Oculus VR Rift SDK, including LibOVR.
+
+The Oculus VR Rift SDK may not be used to interface with unapproved commercial
+virtual reality mobile or non-mobile products or hardware.
+
+* - This human-readable Summary is not a license. It is simply a convenient
+reference for understanding the full Oculus VR Rift SDK License Agreement.
+The Summary is written as a user-friendly interface to the full Oculus VR Rift
+SDK License below. This Summary itself has no legal value, and its contents do
+not appear in the actual license.
+
+Full-length Legal Copy:
+
+1. Subject to the terms and conditions of this License Agreement (the "License"),
+Oculus VR, LLC ("Oculus VR") hereby grants to you a perpetual, worldwide,
+non-exclusive, no-charge, royalty-free, sublicenseable copyright license to use,
+reproduce, redistribute (subject to restrictions below), modify, and improve the
+software contained in this Oculus VR Rift Software Development Kit ("RIFT SDK"),
+including, but not limited to, the samples, headers, LibOVR headers, and LibOVR
+source. This license is subject to the following terms and conditions:
+
+1.1. This license includes the non-exclusive license and right to use (i) the RIFT
+SDK to make applications, content, games and demos (collectively and generally
+referred to as "Developer Content") that run on the Oculus VR approved mobile hardware
+and software products ("Oculus Approved Rift Products") and which may incorporate
+the RIFT SDK in whole or in part in binary or object code; and (ii) to use the
+RIFT SDK to create derivative works of the RIFT SDK itself ("RIFT SDK Derivatives"),
+whether in source, binary, or object form, in whole or in part, including third
+party software unless otherwise noted.
+
+1.2. RIFT SDK Derivatives are further defined as source, binary or object code
+derived exclusively from the RIFT SDK by you; provided, however, that RIFT SDK
+Derivatives do not include the Developer Content (engines, utilities, applications,
+content, games or demos) which may be developed using the RIFT SDK. By way of example
+a mobile application or game or demo that is developed using the RIFT SDK would not
+be a RIFT SDK Derivative , nor would a utility or tool set in a pre-existing game
+engine that is adapted to work with the RIFT SDK be a RIFT SDK Derivative.
+By way of example, but not limitation, a RIFT SDK Derivative is or would be: either (i)
+an adaptation of a utility or piece of code from the RIFT SDK to improve efficiency;
+or (ii) an addition of code or improvement to the RIFT SDK that adds functionality.
+
+1.3 For the sake of clarification when you use the RIFT SDK (including RIFT SDK
+Derivatives) in or with Developer Content, you retain all rights to your Developer
+Content, and you have no obligations to share or license Developer Content (including
+your source and object code) to Oculus VR or any third parties; provided, however,
+Oculus VR retains all rights to the RIFT SDK and the RIFT SDK Derivatives that may
+be incorporated into your Developer Content.
+
+1.4 You agree to and you will use the Flash Screen Warning and the Health and
+Safety Warnings (collectively the "Oculus Warnings") and the Oculus VR health and
+safety protocols found in the Oculus Best Practices Guide ("Oculus H&S Protocols"),
+and your use of the Oculus Warnings and the Oculus end user license agreement
+("Oculus EULA") with your Developer Content as provided for in the Oculus Developer
+Center, all of which can be found at the following link:
+https://developer.oculusvr.com/?action=doc.
+
+2. You, the recipient and user of the RIFT SDK, hereby agree and accept that that
+Oculus VR shall own all right, title and interest to the intellectual property
+rights, including, but limited to copyright, trademark and patent rights, to any
+RIFT SDK Derivatives that you may create, and you hereby assign any and all such
+rights to such RIFT SDK Derivatives to Oculus VR, subject to the following.
+
+2.1 We hereby grant to you the a fully paid up, no-charge, royalty-free,
+world-wide, in perpetuity, non-exclusive right and license back to use these RIFT
+SDK Derivatives solely in conjunction with the RIFT SDK (or any components of the
+RIFT SDK) and/or Developer Content on Oculus Rift Products as set forth herein.
+
+2.2 Furthermore, for the sake of clarification, Oculus VR and its assignees and
+licensees shall be free to use such RIFT SDK Derivatives without any approval
+from you and without compensation or attribution to you.
+
+2.3 You also agree upon Oculus VR's request to provide the source and binary code
+of any RIFT SDK Derivatives to Oculus VR. FAILURE TO COMPLY WITH THIS REQUEST
+IS THE BASIS FOR AUTOMATIC TERMINATION OF THIS LICENSE BY OCULUS VR.
+
+3. Subject to the terms and conditions of this License, your license to redistribute
+and sublicense the RIFT SDK and RIFT SDK Derivatives is also expressly made
+subject to the following conditions:
+
+3.1. You may sublicense and redistribute the source, binary, or object code of
+the RIFT SDK in whole or in part by itself for no charge or as part of a for charge
+piece of Developer Content; provided, however, you may only license, sublicense
+or redistribute the source, binary or object code of LibOVR in whole, and you may
+not license, sublicense or redistribute any portion or element of LibOVR separately
+or in part (in either source, binary or object form). If you license, sublicense
+or redistribute RIFT SDK Derivatives in and of themselves (not as a part of a
+piece of Developer Content) then you may only do that solely with and in conjunction
+with either the RIFT SDK or LibOVR. The RIFT SDK (including, but not limited to
+LibOVR), any RIFT SDK Derivatives, and any Developer Content may only be used
+with Oculus Approved Rift Products and may not be used, licensed, or sublicensed
+to interface with mobile software or hardware or other commercial headsets,
+mobile tablets or phones that are not authorized and approved by Oculus VR;
+
+3.2. You must include with all such redistributed or sublicensed RIFT SDK
+or RIFT SDK Derivatives code the following copyright notice:
+"Copyright © 2014 Oculus VR, LLC. All rights reserved," and include the
+list of conditions contained in this Section 3, including the full text of
+the disclaimer in Section 3.6 below;
+
+3.3. Neither the name of Oculus VR, LLC nor the names of Oculus VR, LLC's
+contributors, licensors, employees, or contractors, may be used to endorse or promote
+products derived from this RIFT SDK without specific prior written permission
+of Oculus VR, LLC;
+
+3.4. You must give any other recipients of the RIFT SDK or any elements thereof,
+including LibOVR or RIFT SDK Derivatives, a copy of this License as such recipients,
+licensees or sublicensees may only use the RIFT SDK or any RIFT SDK Derivatives
+or any elements thereof subject to the terms of this Licence and such recipients,
+licensees or sublicensees agreement and acceptance of this License with Oculus VR
+(which will convey all rights to the recipients’ or licensees’ or sublicensees’
+RIFT SDK Derivatives to Oculus VR), and you must cause any modified files to
+carry prominent notices stating that you changed the files;
+
+3.5. If the RIFT SDK or a specific element thereof such as LibOVR includes a
+"LICENSE" text file as part of its distribution (the "License Notice"), then
+any RIFT SDK Derivatives that you distribute with the RIFT SDK in whole or in
+part must include a readable copy of such attribution notices as are contained
+within the applicable License Notice file (excluding those notices that do not
+pertain to any part of the RIFT SDK Derivatives), in at least one of the following
+places: within a License Notice text file distributed as part of the RIFT SDK
+Derivatives; within the source form or documentation, if provided along with
+the RIFT SDK Derivatives; or, within a display generated by the RIFT SDK Derivatives,
+if and wherever such third-party notices normally appear. You must also include
+in the License Notice file for all RIFT SDK Derivatives a copy of all notices
+(including any product liability or health and safety notices). The contents
+of the License Notice file are for informational purposes only and do not modify
+the License. You may add your own attribution notices within RIFT SDK Derivatives
+that you distribute, alongside or as an addendum to the License Notice text from
+the RIFT SDK or any part thereof, provided that such additional attribution notices
+cannot be construed as modifying the License.
+
+3.6. THIS RIFT SDK AND ANY COMPONENT THEREOF IS PROVIDED BY OCULUS VR AND
+ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OCULUS VR AS THE
+COPYRIGHT OWNER OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS RIFT
+SDK OR THE RIFT SDK DERIVATIVES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+4. This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of Oculus VR, except as required for reasonable
+and customary use in describing the origin of the RIFT SDK, LibOVR, or any
+element thereof, and reproducing the content of the License Notice file.
+Oculus VR reserves all rights not expressly granted to you under this License.
+
+5. In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as
+deliberate and grossly negligent acts) or agreed to in writing, shall Oculus VR
+or any contributor be liable to you or your licensees or sublicensees for
+damages, including any direct, indirect, special, incidental, or consequential
+damages of any character arising as a result of this License or out of the use
+or inability to use the RIFT SDK, LibOVR, any element thereof or any RIFT SDK
+Derivatives (including but not limited to damages for loss of goodwill, work
+stoppage, computer failure or malfunction, or any and all other commercial
+damages or losses), even if you or such contributor has been advised of the
+possibility of such damages.
+
+6. Your acceptance of the terms and conditions of this License in and of
+itself and for all Developer Content created as of March 1, 2014, may be
+evidenced by any of the following: your usage of the RIFT SDK or any element
+thereof, acceptance of the click-through agreement, or opening the packaging
+of the CD-ROM containing the RIFT SDK or any element thereof, including LibOVR.
+As this License is updated for future releases of the RIFT SDK and/or LibOVR,
+you agree to abide by and meet all requirements of future updates of this
+License for those future RIFT SDK releases as evidenced by the same usage of
+the RIFT SDK or any element thereof and the future updates of this License
+will apply for that future Developer Content that may developed for or with
+that future RIFT SDK or any element thereof (i.e., you cannot sidestep out
+of the requirements of future updates of the License by developing against
+an older release of the RIFT SDK or License).
+
+7. Oculus VR reserves the right to terminate this License and all your
+rights hereunder in the event you materially breach this License and fail
+to cure such breach within ten (10) business days after notice of breach
+from Oculus VR.
+
+8. Furthermore, Oculus VR also reserves the right to cancel or terminate
+this License for any of the following reasons upon notice to you, subject
+to the appeal process set forth in Section 14 for a wrongful termination:
+
+ a) Intellectual property infringement by you with Developer Content
+ or RIFT SDK Derivatives created by you that is used with or by the
+ RIFT SDK or any part thereof, or any of the RIFT SDK Derivatives;
+
+ b) Developer Content that violates or infringes upon applicable law;
+
+ c) Health and safety issues associated with your Developer Content;
+
+ d) Failure to comply with or use properly the Oculus Warnings,
+ Oculus H&S Protocols, or Oculus EULA;
+
+ e) Use of the RIFT SDK, RIFT SDK Derivatives or LibOVR with a
+ commercial product other than an Oculus Approved Product; and
+
+ f) Failure to provide required notices or deliver source code
+ and/or binary of RIFT SDK Derivatives as set forth above.
+
+If you believe that you have been wrongfully terminated under this Section 8
+with respect to material breach or with respect to these above conditions,
+you have the right to appeal the termination of this License under Section 14.
+
+9. This License may be amended by Oculus VR on a prospective basis, and your
+usage of the License after such amendments or changes signifies your consent
+to and acceptance of any such amendments or changes on a going forward basis.
+
+10. In the event any provision of this License is determined to be invalid,
+prohibited or unenforceable by a court or other body of competent jurisdiction,
+this License shall be construed as if such invalid, prohibited or unenforceable
+provision has been more narrowly drawn so as not to be invalid, prohibited or
+unenforceable.
+
+11. You may not assign any rights or obligations under this License without
+the advance written consent of Oculus VR, which may be withheld in its sole
+discretion. Oculus VR may assign its rights or obligations under this License
+in its sole discretion.
+
+12. Failure of either party at any time to enforce any of the provisions of
+this License will not be construed as a waiver of such provisions or in any way
+affect the validity of this License or parts thereof.
+
+13. Your remedies under this License shall be limited to the right to collect
+money damages, if any, and you hereby waive your right to injunctive or other
+equitable relief.
+
+14. This License shall be governed by the laws of the State of California,
+without giving effect to choice of law principles. All disputes relating to
+this License shall be resolved by binding non-appearance-based arbitration
+before a neutral arbitrator in Orange County, California. If your License
+has been terminated hereunder by Oculus, you may appeal your termination
+through this arbitration process on an expedited basis with an arbitration
+within thirty days of your giving Oculus VR notice of the appeal. The
+arbitration shall be conducted in accordance with the rules and procedures
+of JAMS then in effect, and the judgment of the arbitrator shall be final
+and capable of entry in any court of competent jurisdiction. You agree
+to submit to the personal jurisdiction of the courts located within Orange
+County, California in connection with any entrance of an arbitrator’s judgment
+or decision or any dispute with respect to the arbitration process or procedure
+or Oculus VR’s exercise of its equitable rights or remedies.
diff --git a/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..4d90561
--- /dev/null
+++ b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj
@@ -0,0 +1,763 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 4683CEBE1970867300285E02 /* CAPI_GL_HSWDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4683CEBC1970867300285E02 /* CAPI_GL_HSWDisplay.cpp */; };
+ 4683CEBF1970867300285E02 /* CAPI_GL_HSWDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = 4683CEBD1970867300285E02 /* CAPI_GL_HSWDisplay.h */; };
+ E8094D0F196FAE8800937940 /* CAPI_HSWDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8094D0D196FAE8800937940 /* CAPI_HSWDisplay.cpp */; };
+ E8094D10196FAE8800937940 /* CAPI_HSWDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = E8094D0E196FAE8800937940 /* CAPI_HSWDisplay.h */; };
+ E85F262C1954204900AA807B /* OVR_SerialFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E85F262A1954204900AA807B /* OVR_SerialFormat.cpp */; };
+ E85F262D1954204900AA807B /* OVR_SerialFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = E85F262B1954204900AA807B /* OVR_SerialFormat.h */; };
+ E8788D1D196CF68000128BE5 /* Tracking_PoseState.h in Headers */ = {isa = PBXBuildFile; fileRef = E8788D1B196CF68000128BE5 /* Tracking_PoseState.h */; };
+ E8788D1E196CF68000128BE5 /* Tracking_SensorState.h in Headers */ = {isa = PBXBuildFile; fileRef = E8788D1C196CF68000128BE5 /* Tracking_SensorState.h */; };
+ E8788D22196CF98000128BE5 /* Util_LatencyTest2Reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8788D1F196CF98000128BE5 /* Util_LatencyTest2Reader.cpp */; };
+ E8788D23196CF98000128BE5 /* Util_LatencyTest2Reader.h in Headers */ = {isa = PBXBuildFile; fileRef = E8788D20196CF98000128BE5 /* Util_LatencyTest2Reader.h */; };
+ E8788D24196CF98000128BE5 /* Util_LatencyTest2State.h in Headers */ = {isa = PBXBuildFile; fileRef = E8788D21196CF98000128BE5 /* Util_LatencyTest2State.h */; };
+ E87DF46E196A1BEF005E383C /* OVR_CRC32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF46A196A1BEF005E383C /* OVR_CRC32.cpp */; };
+ E87DF46F196A1BEF005E383C /* OVR_CRC32.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF46B196A1BEF005E383C /* OVR_CRC32.h */; };
+ E87DF470196A1BEF005E383C /* OVR_SharedMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF46C196A1BEF005E383C /* OVR_SharedMemory.cpp */; };
+ E87DF471196A1BEF005E383C /* OVR_SharedMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF46D196A1BEF005E383C /* OVR_SharedMemory.h */; };
+ E87DF47A196A1CEF005E383C /* OVR_Display.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF474196A1CEF005E383C /* OVR_Display.h */; };
+ E87DF47D196A1CEF005E383C /* OVR_OSX_Display.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF477196A1CEF005E383C /* OVR_OSX_Display.cpp */; };
+ E87DF47E196A1CEF005E383C /* OVR_OSX_Display.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF478196A1CEF005E383C /* OVR_OSX_Display.h */; };
+ E87DF490196A20E9005E383C /* OVR_BitStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF480196A20E9005E383C /* OVR_BitStream.cpp */; };
+ E87DF491196A20E9005E383C /* OVR_BitStream.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF481196A20E9005E383C /* OVR_BitStream.h */; };
+ E87DF492196A20E9005E383C /* OVR_MessageIDTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF482196A20E9005E383C /* OVR_MessageIDTypes.h */; };
+ E87DF493196A20E9005E383C /* OVR_NetworkPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF483196A20E9005E383C /* OVR_NetworkPlugin.cpp */; };
+ E87DF494196A20E9005E383C /* OVR_NetworkPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF484196A20E9005E383C /* OVR_NetworkPlugin.h */; };
+ E87DF495196A20E9005E383C /* OVR_NetworkTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF485196A20E9005E383C /* OVR_NetworkTypes.h */; };
+ E87DF496196A20E9005E383C /* OVR_PacketizedTCPSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF486196A20E9005E383C /* OVR_PacketizedTCPSocket.cpp */; };
+ E87DF497196A20E9005E383C /* OVR_PacketizedTCPSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF487196A20E9005E383C /* OVR_PacketizedTCPSocket.h */; };
+ E87DF498196A20E9005E383C /* OVR_RPC1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF488196A20E9005E383C /* OVR_RPC1.cpp */; };
+ E87DF499196A20E9005E383C /* OVR_RPC1.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF489196A20E9005E383C /* OVR_RPC1.h */; };
+ E87DF49A196A20E9005E383C /* OVR_Session.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF48A196A20E9005E383C /* OVR_Session.cpp */; };
+ E87DF49B196A20E9005E383C /* OVR_Session.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF48B196A20E9005E383C /* OVR_Session.h */; };
+ E87DF49C196A20E9005E383C /* OVR_Socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF48C196A20E9005E383C /* OVR_Socket.cpp */; };
+ E87DF49D196A20E9005E383C /* OVR_Socket.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF48D196A20E9005E383C /* OVR_Socket.h */; };
+ E87DF49E196A20E9005E383C /* OVR_Unix_Socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF48E196A20E9005E383C /* OVR_Unix_Socket.cpp */; };
+ E87DF49F196A20E9005E383C /* OVR_Unix_Socket.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF48F196A20E9005E383C /* OVR_Unix_Socket.h */; };
+ E87DF4AB196A2161005E383C /* Service_NetClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4A3196A2161005E383C /* Service_NetClient.cpp */; };
+ E87DF4AC196A2161005E383C /* Service_NetClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF4A4196A2161005E383C /* Service_NetClient.h */; };
+ E87DF4AF196A2161005E383C /* Service_NetSessionCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4A7196A2161005E383C /* Service_NetSessionCommon.cpp */; };
+ E87DF4B0196A2161005E383C /* Service_NetSessionCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF4A8196A2161005E383C /* Service_NetSessionCommon.h */; };
+ E87DF4D2196A232F005E383C /* OVR_DeviceConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF4B3196A232F005E383C /* OVR_DeviceConstants.h */; };
+ E87DF4F3196A23B4005E383C /* Tracking_SensorStateReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4F1196A23B4005E383C /* Tracking_SensorStateReader.cpp */; };
+ E87DF4F4196A23B4005E383C /* Tracking_SensorStateReader.h in Headers */ = {isa = PBXBuildFile; fileRef = E87DF4F2196A23B4005E383C /* Tracking_SensorStateReader.h */; };
+ E886FE9E190737FA00D5DB45 /* OVR_CAPI_GL.h in Headers */ = {isa = PBXBuildFile; fileRef = E886FE9B190737FA00D5DB45 /* OVR_CAPI_GL.h */; };
+ E886FE9F190737FA00D5DB45 /* OVR_CAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E886FE9C190737FA00D5DB45 /* OVR_CAPI.cpp */; };
+ E886FEA0190737FA00D5DB45 /* OVR_CAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E886FE9D190737FA00D5DB45 /* OVR_CAPI.h */; };
+ E886FEA21907528C00D5DB45 /* CAPI_DistortionRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E886FEA11907528C00D5DB45 /* CAPI_DistortionRenderer.cpp */; };
+ E8AA40D11907221900D5F144 /* OVR_Alg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40A61907221900D5F144 /* OVR_Alg.cpp */; };
+ E8AA40D21907221900D5F144 /* OVR_Alg.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40A71907221900D5F144 /* OVR_Alg.h */; };
+ E8AA40D31907221900D5F144 /* OVR_Allocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40A81907221900D5F144 /* OVR_Allocator.cpp */; };
+ E8AA40D41907221900D5F144 /* OVR_Allocator.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40A91907221900D5F144 /* OVR_Allocator.h */; };
+ E8AA40D51907221900D5F144 /* OVR_Array.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AA1907221900D5F144 /* OVR_Array.h */; };
+ E8AA40D61907221900D5F144 /* OVR_Atomic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40AB1907221900D5F144 /* OVR_Atomic.cpp */; };
+ E8AA40D71907221900D5F144 /* OVR_Atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AC1907221900D5F144 /* OVR_Atomic.h */; };
+ E8AA40D81907221900D5F144 /* OVR_Color.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AD1907221900D5F144 /* OVR_Color.h */; };
+ E8AA40D91907221900D5F144 /* OVR_ContainerAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AE1907221900D5F144 /* OVR_ContainerAllocator.h */; };
+ E8AA40DA1907221900D5F144 /* OVR_Deque.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AF1907221900D5F144 /* OVR_Deque.h */; };
+ E8AA40DB1907221900D5F144 /* OVR_File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B01907221900D5F144 /* OVR_File.cpp */; };
+ E8AA40DC1907221900D5F144 /* OVR_File.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B11907221900D5F144 /* OVR_File.h */; };
+ E8AA40DD1907221900D5F144 /* OVR_FileFILE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B21907221900D5F144 /* OVR_FileFILE.cpp */; };
+ E8AA40DE1907221900D5F144 /* OVR_Hash.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B31907221900D5F144 /* OVR_Hash.h */; };
+ E8AA40DF1907221900D5F144 /* OVR_KeyCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B41907221900D5F144 /* OVR_KeyCodes.h */; };
+ E8AA40E01907221900D5F144 /* OVR_List.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B51907221900D5F144 /* OVR_List.h */; };
+ E8AA40E11907221900D5F144 /* OVR_Lockless.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B61907221900D5F144 /* OVR_Lockless.cpp */; };
+ E8AA40E21907221900D5F144 /* OVR_Lockless.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B71907221900D5F144 /* OVR_Lockless.h */; };
+ E8AA40E31907221900D5F144 /* OVR_Log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B81907221900D5F144 /* OVR_Log.cpp */; };
+ E8AA40E41907221900D5F144 /* OVR_Log.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B91907221900D5F144 /* OVR_Log.h */; };
+ E8AA40E51907221900D5F144 /* OVR_Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40BA1907221900D5F144 /* OVR_Math.cpp */; };
+ E8AA40E61907221900D5F144 /* OVR_Math.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40BB1907221900D5F144 /* OVR_Math.h */; };
+ E8AA40E71907221900D5F144 /* OVR_RefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40BC1907221900D5F144 /* OVR_RefCount.cpp */; };
+ E8AA40E81907221900D5F144 /* OVR_RefCount.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40BD1907221900D5F144 /* OVR_RefCount.h */; };
+ E8AA40E91907221900D5F144 /* OVR_Std.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40BE1907221900D5F144 /* OVR_Std.cpp */; };
+ E8AA40EA1907221900D5F144 /* OVR_Std.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40BF1907221900D5F144 /* OVR_Std.h */; };
+ E8AA40EB1907221900D5F144 /* OVR_String.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C01907221900D5F144 /* OVR_String.cpp */; };
+ E8AA40EC1907221900D5F144 /* OVR_String.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C11907221900D5F144 /* OVR_String.h */; };
+ E8AA40ED1907221900D5F144 /* OVR_String_FormatUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C21907221900D5F144 /* OVR_String_FormatUtil.cpp */; };
+ E8AA40EE1907221900D5F144 /* OVR_String_PathUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C31907221900D5F144 /* OVR_String_PathUtil.cpp */; };
+ E8AA40EF1907221900D5F144 /* OVR_StringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C41907221900D5F144 /* OVR_StringHash.h */; };
+ E8AA40F01907221900D5F144 /* OVR_SysFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C51907221900D5F144 /* OVR_SysFile.cpp */; };
+ E8AA40F11907221900D5F144 /* OVR_SysFile.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C61907221900D5F144 /* OVR_SysFile.h */; };
+ E8AA40F21907221900D5F144 /* OVR_System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C71907221900D5F144 /* OVR_System.cpp */; };
+ E8AA40F31907221900D5F144 /* OVR_System.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C81907221900D5F144 /* OVR_System.h */; };
+ E8AA40F41907221900D5F144 /* OVR_Threads.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C91907221900D5F144 /* OVR_Threads.h */; };
+ E8AA40F51907221900D5F144 /* OVR_ThreadsPthread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40CA1907221900D5F144 /* OVR_ThreadsPthread.cpp */; };
+ E8AA40F71907221900D5F144 /* OVR_Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40CC1907221900D5F144 /* OVR_Timer.cpp */; };
+ E8AA40F81907221900D5F144 /* OVR_Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40CD1907221900D5F144 /* OVR_Timer.h */; };
+ E8AA40F91907221900D5F144 /* OVR_Types.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40CE1907221900D5F144 /* OVR_Types.h */; };
+ E8AA40FA1907221900D5F144 /* OVR_UTF8Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40CF1907221900D5F144 /* OVR_UTF8Util.cpp */; };
+ E8AA40FB1907221900D5F144 /* OVR_UTF8Util.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40D01907221900D5F144 /* OVR_UTF8Util.h */; };
+ E8AA410D1907224700D5F144 /* Util_Interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41011907224700D5F144 /* Util_Interface.cpp */; };
+ E8AA410E1907224700D5F144 /* Util_Interface.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41021907224700D5F144 /* Util_Interface.h */; };
+ E8AA41131907224700D5F144 /* Util_Render_Stereo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41071907224700D5F144 /* Util_Render_Stereo.cpp */; };
+ E8AA41141907224700D5F144 /* Util_Render_Stereo.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41081907224700D5F144 /* Util_Render_Stereo.h */; };
+ E8AA4173190722BB00D5F144 /* OVR_JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA412B190722BB00D5F144 /* OVR_JSON.cpp */; };
+ E8AA4174190722BB00D5F144 /* OVR_JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA412C190722BB00D5F144 /* OVR_JSON.h */; };
+ E8AA4185190722BB00D5F144 /* OVR_Profile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA413D190722BB00D5F144 /* OVR_Profile.cpp */; };
+ E8AA4186190722BB00D5F144 /* OVR_Profile.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA413E190722BB00D5F144 /* OVR_Profile.h */; };
+ E8AA4197190722BB00D5F144 /* OVR_Stereo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA414F190722BB00D5F144 /* OVR_Stereo.cpp */; };
+ E8AA4198190722BB00D5F144 /* OVR_Stereo.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4150190722BB00D5F144 /* OVR_Stereo.h */; };
+ E8AA41E2190724E600D5F144 /* CAPI_DistortionRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41BA190724E600D5F144 /* CAPI_DistortionRenderer.h */; };
+ E8AA41E3190724E600D5F144 /* CAPI_FrameTimeManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41BB190724E600D5F144 /* CAPI_FrameTimeManager.cpp */; };
+ E8AA41E4190724E600D5F144 /* CAPI_FrameTimeManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41BC190724E600D5F144 /* CAPI_FrameTimeManager.h */; };
+ E8AA41E7190724E600D5F144 /* CAPI_HMDRenderState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41BF190724E600D5F144 /* CAPI_HMDRenderState.cpp */; };
+ E8AA41E8190724E600D5F144 /* CAPI_HMDRenderState.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41C0190724E600D5F144 /* CAPI_HMDRenderState.h */; };
+ E8AA41E9190724E600D5F144 /* CAPI_HMDState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41C1190724E600D5F144 /* CAPI_HMDState.cpp */; };
+ E8AA41EA190724E600D5F144 /* CAPI_HMDState.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41C2190724E600D5F144 /* CAPI_HMDState.h */; };
+ E8AA41F6190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41D0190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp */; };
+ E8AA41F7190724E600D5F144 /* CAPI_GL_DistortionRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41D1190724E600D5F144 /* CAPI_GL_DistortionRenderer.h */; };
+ E8AA41F8190724E600D5F144 /* CAPI_GL_Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41D2190724E600D5F144 /* CAPI_GL_Util.cpp */; };
+ E8AA41F9190724E600D5F144 /* CAPI_GL_Util.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41D3190724E600D5F144 /* CAPI_GL_Util.h */; };
+ E8B18323196D376800555C29 /* OVR_ThreadCommandQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8B18321196D376800555C29 /* OVR_ThreadCommandQueue.cpp */; };
+ E8B18324196D376800555C29 /* OVR_ThreadCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = E8B18322196D376800555C29 /* OVR_ThreadCommandQueue.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 4683CEBC1970867300285E02 /* CAPI_GL_HSWDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CAPI_GL_HSWDisplay.cpp; path = GL/CAPI_GL_HSWDisplay.cpp; sourceTree = "<group>"; };
+ 4683CEBD1970867300285E02 /* CAPI_GL_HSWDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CAPI_GL_HSWDisplay.h; path = GL/CAPI_GL_HSWDisplay.h; sourceTree = "<group>"; };
+ E8094D0D196FAE8800937940 /* CAPI_HSWDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_HSWDisplay.cpp; sourceTree = "<group>"; };
+ E8094D0E196FAE8800937940 /* CAPI_HSWDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_HSWDisplay.h; sourceTree = "<group>"; };
+ E82D4CD31906FE640070CB3F /* libovr.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libovr.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ E85F262A1954204900AA807B /* OVR_SerialFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_SerialFormat.cpp; path = ../../../Src/OVR_SerialFormat.cpp; sourceTree = "<group>"; };
+ E85F262B1954204900AA807B /* OVR_SerialFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SerialFormat.h; path = ../../../Src/OVR_SerialFormat.h; sourceTree = "<group>"; };
+ E8788D1B196CF68000128BE5 /* Tracking_PoseState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tracking_PoseState.h; path = ../../../Src/Tracking/Tracking_PoseState.h; sourceTree = "<group>"; };
+ E8788D1C196CF68000128BE5 /* Tracking_SensorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tracking_SensorState.h; path = ../../../Src/Tracking/Tracking_SensorState.h; sourceTree = "<group>"; };
+ E8788D1F196CF98000128BE5 /* Util_LatencyTest2Reader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util_LatencyTest2Reader.cpp; sourceTree = "<group>"; };
+ E8788D20196CF98000128BE5 /* Util_LatencyTest2Reader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_LatencyTest2Reader.h; sourceTree = "<group>"; };
+ E8788D21196CF98000128BE5 /* Util_LatencyTest2State.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_LatencyTest2State.h; sourceTree = "<group>"; };
+ E87DF46A196A1BEF005E383C /* OVR_CRC32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_CRC32.cpp; sourceTree = "<group>"; };
+ E87DF46B196A1BEF005E383C /* OVR_CRC32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_CRC32.h; sourceTree = "<group>"; };
+ E87DF46C196A1BEF005E383C /* OVR_SharedMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_SharedMemory.cpp; sourceTree = "<group>"; };
+ E87DF46D196A1BEF005E383C /* OVR_SharedMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_SharedMemory.h; sourceTree = "<group>"; };
+ E87DF474196A1CEF005E383C /* OVR_Display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Display.h; path = ../../../Src/Displays/OVR_Display.h; sourceTree = "<group>"; };
+ E87DF477196A1CEF005E383C /* OVR_OSX_Display.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_OSX_Display.cpp; path = ../../../Src/Displays/OVR_OSX_Display.cpp; sourceTree = "<group>"; };
+ E87DF478196A1CEF005E383C /* OVR_OSX_Display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_OSX_Display.h; path = ../../../Src/Displays/OVR_OSX_Display.h; sourceTree = "<group>"; };
+ E87DF480196A20E9005E383C /* OVR_BitStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_BitStream.cpp; path = ../../../Src/Net/OVR_BitStream.cpp; sourceTree = "<group>"; };
+ E87DF481196A20E9005E383C /* OVR_BitStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_BitStream.h; path = ../../../Src/Net/OVR_BitStream.h; sourceTree = "<group>"; };
+ E87DF482196A20E9005E383C /* OVR_MessageIDTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_MessageIDTypes.h; path = ../../../Src/Net/OVR_MessageIDTypes.h; sourceTree = "<group>"; };
+ E87DF483196A20E9005E383C /* OVR_NetworkPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_NetworkPlugin.cpp; path = ../../../Src/Net/OVR_NetworkPlugin.cpp; sourceTree = "<group>"; };
+ E87DF484196A20E9005E383C /* OVR_NetworkPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_NetworkPlugin.h; path = ../../../Src/Net/OVR_NetworkPlugin.h; sourceTree = "<group>"; };
+ E87DF485196A20E9005E383C /* OVR_NetworkTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_NetworkTypes.h; path = ../../../Src/Net/OVR_NetworkTypes.h; sourceTree = "<group>"; };
+ E87DF486196A20E9005E383C /* OVR_PacketizedTCPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_PacketizedTCPSocket.cpp; path = ../../../Src/Net/OVR_PacketizedTCPSocket.cpp; sourceTree = "<group>"; };
+ E87DF487196A20E9005E383C /* OVR_PacketizedTCPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_PacketizedTCPSocket.h; path = ../../../Src/Net/OVR_PacketizedTCPSocket.h; sourceTree = "<group>"; };
+ E87DF488196A20E9005E383C /* OVR_RPC1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_RPC1.cpp; path = ../../../Src/Net/OVR_RPC1.cpp; sourceTree = "<group>"; };
+ E87DF489196A20E9005E383C /* OVR_RPC1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_RPC1.h; path = ../../../Src/Net/OVR_RPC1.h; sourceTree = "<group>"; };
+ E87DF48A196A20E9005E383C /* OVR_Session.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Session.cpp; path = ../../../Src/Net/OVR_Session.cpp; sourceTree = "<group>"; };
+ E87DF48B196A20E9005E383C /* OVR_Session.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Session.h; path = ../../../Src/Net/OVR_Session.h; sourceTree = "<group>"; };
+ E87DF48C196A20E9005E383C /* OVR_Socket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Socket.cpp; path = ../../../Src/Net/OVR_Socket.cpp; sourceTree = "<group>"; };
+ E87DF48D196A20E9005E383C /* OVR_Socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Socket.h; path = ../../../Src/Net/OVR_Socket.h; sourceTree = "<group>"; };
+ E87DF48E196A20E9005E383C /* OVR_Unix_Socket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Unix_Socket.cpp; path = ../../../Src/Net/OVR_Unix_Socket.cpp; sourceTree = "<group>"; };
+ E87DF48F196A20E9005E383C /* OVR_Unix_Socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Unix_Socket.h; path = ../../../Src/Net/OVR_Unix_Socket.h; sourceTree = "<group>"; };
+ E87DF4A3196A2161005E383C /* Service_NetClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Service_NetClient.cpp; path = ../../../Src/Service/Service_NetClient.cpp; sourceTree = "<group>"; };
+ E87DF4A4196A2161005E383C /* Service_NetClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Service_NetClient.h; path = ../../../Src/Service/Service_NetClient.h; sourceTree = "<group>"; };
+ E87DF4A7196A2161005E383C /* Service_NetSessionCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Service_NetSessionCommon.cpp; path = ../../../Src/Service/Service_NetSessionCommon.cpp; sourceTree = "<group>"; };
+ E87DF4A8196A2161005E383C /* Service_NetSessionCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Service_NetSessionCommon.h; path = ../../../Src/Service/Service_NetSessionCommon.h; sourceTree = "<group>"; };
+ E87DF4B3196A232F005E383C /* OVR_DeviceConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_DeviceConstants.h; path = ../../../Src/Sensors/OVR_DeviceConstants.h; sourceTree = "<group>"; };
+ E87DF4F1196A23B4005E383C /* Tracking_SensorStateReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tracking_SensorStateReader.cpp; path = ../../../Src/Tracking/Tracking_SensorStateReader.cpp; sourceTree = "<group>"; };
+ E87DF4F2196A23B4005E383C /* Tracking_SensorStateReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tracking_SensorStateReader.h; path = ../../../Src/Tracking/Tracking_SensorStateReader.h; sourceTree = "<group>"; };
+ E886FE9B190737FA00D5DB45 /* OVR_CAPI_GL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_CAPI_GL.h; path = ../../../Src/OVR_CAPI_GL.h; sourceTree = "<group>"; };
+ E886FE9C190737FA00D5DB45 /* OVR_CAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_CAPI.cpp; path = ../../../Src/OVR_CAPI.cpp; sourceTree = "<group>"; };
+ E886FE9D190737FA00D5DB45 /* OVR_CAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_CAPI.h; path = ../../../Src/OVR_CAPI.h; sourceTree = "<group>"; };
+ E886FEA11907528C00D5DB45 /* CAPI_DistortionRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_DistortionRenderer.cpp; sourceTree = "<group>"; };
+ E8AA40A61907221900D5F144 /* OVR_Alg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Alg.cpp; sourceTree = "<group>"; };
+ E8AA40A71907221900D5F144 /* OVR_Alg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Alg.h; sourceTree = "<group>"; };
+ E8AA40A81907221900D5F144 /* OVR_Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Allocator.cpp; sourceTree = "<group>"; };
+ E8AA40A91907221900D5F144 /* OVR_Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Allocator.h; sourceTree = "<group>"; };
+ E8AA40AA1907221900D5F144 /* OVR_Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Array.h; sourceTree = "<group>"; };
+ E8AA40AB1907221900D5F144 /* OVR_Atomic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Atomic.cpp; sourceTree = "<group>"; };
+ E8AA40AC1907221900D5F144 /* OVR_Atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Atomic.h; sourceTree = "<group>"; };
+ E8AA40AD1907221900D5F144 /* OVR_Color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Color.h; sourceTree = "<group>"; };
+ E8AA40AE1907221900D5F144 /* OVR_ContainerAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_ContainerAllocator.h; sourceTree = "<group>"; };
+ E8AA40AF1907221900D5F144 /* OVR_Deque.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Deque.h; sourceTree = "<group>"; };
+ E8AA40B01907221900D5F144 /* OVR_File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_File.cpp; sourceTree = "<group>"; };
+ E8AA40B11907221900D5F144 /* OVR_File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_File.h; sourceTree = "<group>"; };
+ E8AA40B21907221900D5F144 /* OVR_FileFILE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_FileFILE.cpp; sourceTree = "<group>"; };
+ E8AA40B31907221900D5F144 /* OVR_Hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Hash.h; sourceTree = "<group>"; };
+ E8AA40B41907221900D5F144 /* OVR_KeyCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_KeyCodes.h; sourceTree = "<group>"; };
+ E8AA40B51907221900D5F144 /* OVR_List.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_List.h; sourceTree = "<group>"; };
+ E8AA40B61907221900D5F144 /* OVR_Lockless.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Lockless.cpp; sourceTree = "<group>"; };
+ E8AA40B71907221900D5F144 /* OVR_Lockless.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Lockless.h; sourceTree = "<group>"; };
+ E8AA40B81907221900D5F144 /* OVR_Log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Log.cpp; sourceTree = "<group>"; };
+ E8AA40B91907221900D5F144 /* OVR_Log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Log.h; sourceTree = "<group>"; };
+ E8AA40BA1907221900D5F144 /* OVR_Math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Math.cpp; sourceTree = "<group>"; };
+ E8AA40BB1907221900D5F144 /* OVR_Math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Math.h; sourceTree = "<group>"; };
+ E8AA40BC1907221900D5F144 /* OVR_RefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_RefCount.cpp; sourceTree = "<group>"; };
+ E8AA40BD1907221900D5F144 /* OVR_RefCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_RefCount.h; sourceTree = "<group>"; };
+ E8AA40BE1907221900D5F144 /* OVR_Std.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Std.cpp; sourceTree = "<group>"; };
+ E8AA40BF1907221900D5F144 /* OVR_Std.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Std.h; sourceTree = "<group>"; };
+ E8AA40C01907221900D5F144 /* OVR_String.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_String.cpp; sourceTree = "<group>"; };
+ E8AA40C11907221900D5F144 /* OVR_String.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_String.h; sourceTree = "<group>"; };
+ E8AA40C21907221900D5F144 /* OVR_String_FormatUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_String_FormatUtil.cpp; sourceTree = "<group>"; };
+ E8AA40C31907221900D5F144 /* OVR_String_PathUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_String_PathUtil.cpp; sourceTree = "<group>"; };
+ E8AA40C41907221900D5F144 /* OVR_StringHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_StringHash.h; sourceTree = "<group>"; };
+ E8AA40C51907221900D5F144 /* OVR_SysFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_SysFile.cpp; sourceTree = "<group>"; };
+ E8AA40C61907221900D5F144 /* OVR_SysFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_SysFile.h; sourceTree = "<group>"; };
+ E8AA40C71907221900D5F144 /* OVR_System.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_System.cpp; sourceTree = "<group>"; };
+ E8AA40C81907221900D5F144 /* OVR_System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_System.h; sourceTree = "<group>"; };
+ E8AA40C91907221900D5F144 /* OVR_Threads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Threads.h; sourceTree = "<group>"; };
+ E8AA40CA1907221900D5F144 /* OVR_ThreadsPthread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_ThreadsPthread.cpp; sourceTree = "<group>"; };
+ E8AA40CC1907221900D5F144 /* OVR_Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Timer.cpp; sourceTree = "<group>"; };
+ E8AA40CD1907221900D5F144 /* OVR_Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Timer.h; sourceTree = "<group>"; };
+ E8AA40CE1907221900D5F144 /* OVR_Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Types.h; sourceTree = "<group>"; };
+ E8AA40CF1907221900D5F144 /* OVR_UTF8Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_UTF8Util.cpp; sourceTree = "<group>"; };
+ E8AA40D01907221900D5F144 /* OVR_UTF8Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_UTF8Util.h; sourceTree = "<group>"; };
+ E8AA41011907224700D5F144 /* Util_Interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util_Interface.cpp; sourceTree = "<group>"; };
+ E8AA41021907224700D5F144 /* Util_Interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_Interface.h; sourceTree = "<group>"; };
+ E8AA41071907224700D5F144 /* Util_Render_Stereo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util_Render_Stereo.cpp; sourceTree = "<group>"; };
+ E8AA41081907224700D5F144 /* Util_Render_Stereo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_Render_Stereo.h; sourceTree = "<group>"; };
+ E8AA412B190722BB00D5F144 /* OVR_JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_JSON.cpp; path = ../../../Src/OVR_JSON.cpp; sourceTree = "<group>"; };
+ E8AA412C190722BB00D5F144 /* OVR_JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_JSON.h; path = ../../../Src/OVR_JSON.h; sourceTree = "<group>"; };
+ E8AA413D190722BB00D5F144 /* OVR_Profile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Profile.cpp; path = ../../../Src/OVR_Profile.cpp; sourceTree = "<group>"; };
+ E8AA413E190722BB00D5F144 /* OVR_Profile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Profile.h; path = ../../../Src/OVR_Profile.h; sourceTree = "<group>"; };
+ E8AA414F190722BB00D5F144 /* OVR_Stereo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Stereo.cpp; path = ../../../Src/OVR_Stereo.cpp; sourceTree = "<group>"; };
+ E8AA4150190722BB00D5F144 /* OVR_Stereo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Stereo.h; path = ../../../Src/OVR_Stereo.h; sourceTree = "<group>"; };
+ E8AA41BA190724E600D5F144 /* CAPI_DistortionRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_DistortionRenderer.h; sourceTree = "<group>"; };
+ E8AA41BB190724E600D5F144 /* CAPI_FrameTimeManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_FrameTimeManager.cpp; sourceTree = "<group>"; };
+ E8AA41BC190724E600D5F144 /* CAPI_FrameTimeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_FrameTimeManager.h; sourceTree = "<group>"; };
+ E8AA41BF190724E600D5F144 /* CAPI_HMDRenderState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_HMDRenderState.cpp; sourceTree = "<group>"; };
+ E8AA41C0190724E600D5F144 /* CAPI_HMDRenderState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_HMDRenderState.h; sourceTree = "<group>"; };
+ E8AA41C1190724E600D5F144 /* CAPI_HMDState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_HMDState.cpp; sourceTree = "<group>"; };
+ E8AA41C2190724E600D5F144 /* CAPI_HMDState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_HMDState.h; sourceTree = "<group>"; };
+ E8AA41D0190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_GL_DistortionRenderer.cpp; sourceTree = "<group>"; };
+ E8AA41D1190724E600D5F144 /* CAPI_GL_DistortionRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_GL_DistortionRenderer.h; sourceTree = "<group>"; };
+ E8AA41D2190724E600D5F144 /* CAPI_GL_Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_GL_Util.cpp; sourceTree = "<group>"; };
+ E8AA41D3190724E600D5F144 /* CAPI_GL_Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_GL_Util.h; sourceTree = "<group>"; };
+ E8B18321196D376800555C29 /* OVR_ThreadCommandQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_ThreadCommandQueue.cpp; sourceTree = "<group>"; };
+ E8B18322196D376800555C29 /* OVR_ThreadCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_ThreadCommandQueue.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ E82D4CD01906FE640070CB3F /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ E82D4CCA1906FE640070CB3F = {
+ isa = PBXGroup;
+ children = (
+ E87DF472196A1C03005E383C /* Displays */,
+ E8AA41B8190724E600D5F144 /* CAPI */,
+ E87DF4F0196A23A2005E383C /* Tracking */,
+ E87DF4B1196A21DC005E383C /* Sensors */,
+ E87DF4A0196A2151005E383C /* Service */,
+ E87DF47F196A20CF005E383C /* Net */,
+ E8AA40A51907221900D5F144 /* Kernel */,
+ E8AA40FC1907224700D5F144 /* Util */,
+ E886FE9B190737FA00D5DB45 /* OVR_CAPI_GL.h */,
+ E886FE9C190737FA00D5DB45 /* OVR_CAPI.cpp */,
+ E886FE9D190737FA00D5DB45 /* OVR_CAPI.h */,
+ E85F262A1954204900AA807B /* OVR_SerialFormat.cpp */,
+ E85F262B1954204900AA807B /* OVR_SerialFormat.h */,
+ E8AA412B190722BB00D5F144 /* OVR_JSON.cpp */,
+ E8AA412C190722BB00D5F144 /* OVR_JSON.h */,
+ E8AA413D190722BB00D5F144 /* OVR_Profile.cpp */,
+ E8AA413E190722BB00D5F144 /* OVR_Profile.h */,
+ E8AA414F190722BB00D5F144 /* OVR_Stereo.cpp */,
+ E8AA4150190722BB00D5F144 /* OVR_Stereo.h */,
+ E82D4CD41906FE640070CB3F /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ E82D4CD41906FE640070CB3F /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ E82D4CD31906FE640070CB3F /* libovr.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ E87DF472196A1C03005E383C /* Displays */ = {
+ isa = PBXGroup;
+ children = (
+ E87DF474196A1CEF005E383C /* OVR_Display.h */,
+ E87DF477196A1CEF005E383C /* OVR_OSX_Display.cpp */,
+ E87DF478196A1CEF005E383C /* OVR_OSX_Display.h */,
+ );
+ name = Displays;
+ sourceTree = "<group>";
+ };
+ E87DF47F196A20CF005E383C /* Net */ = {
+ isa = PBXGroup;
+ children = (
+ E87DF480196A20E9005E383C /* OVR_BitStream.cpp */,
+ E87DF481196A20E9005E383C /* OVR_BitStream.h */,
+ E87DF482196A20E9005E383C /* OVR_MessageIDTypes.h */,
+ E87DF483196A20E9005E383C /* OVR_NetworkPlugin.cpp */,
+ E87DF484196A20E9005E383C /* OVR_NetworkPlugin.h */,
+ E87DF485196A20E9005E383C /* OVR_NetworkTypes.h */,
+ E87DF486196A20E9005E383C /* OVR_PacketizedTCPSocket.cpp */,
+ E87DF487196A20E9005E383C /* OVR_PacketizedTCPSocket.h */,
+ E87DF488196A20E9005E383C /* OVR_RPC1.cpp */,
+ E87DF489196A20E9005E383C /* OVR_RPC1.h */,
+ E87DF48A196A20E9005E383C /* OVR_Session.cpp */,
+ E87DF48B196A20E9005E383C /* OVR_Session.h */,
+ E87DF48C196A20E9005E383C /* OVR_Socket.cpp */,
+ E87DF48D196A20E9005E383C /* OVR_Socket.h */,
+ E87DF48E196A20E9005E383C /* OVR_Unix_Socket.cpp */,
+ E87DF48F196A20E9005E383C /* OVR_Unix_Socket.h */,
+ );
+ name = Net;
+ sourceTree = "<group>";
+ };
+ E87DF4A0196A2151005E383C /* Service */ = {
+ isa = PBXGroup;
+ children = (
+ E87DF4A3196A2161005E383C /* Service_NetClient.cpp */,
+ E87DF4A4196A2161005E383C /* Service_NetClient.h */,
+ E87DF4A7196A2161005E383C /* Service_NetSessionCommon.cpp */,
+ E87DF4A8196A2161005E383C /* Service_NetSessionCommon.h */,
+ );
+ name = Service;
+ sourceTree = "<group>";
+ };
+ E87DF4B1196A21DC005E383C /* Sensors */ = {
+ isa = PBXGroup;
+ children = (
+ E87DF4B3196A232F005E383C /* OVR_DeviceConstants.h */,
+ );
+ name = Sensors;
+ sourceTree = "<group>";
+ };
+ E87DF4F0196A23A2005E383C /* Tracking */ = {
+ isa = PBXGroup;
+ children = (
+ E8788D1B196CF68000128BE5 /* Tracking_PoseState.h */,
+ E8788D1C196CF68000128BE5 /* Tracking_SensorState.h */,
+ E87DF4F1196A23B4005E383C /* Tracking_SensorStateReader.cpp */,
+ E87DF4F2196A23B4005E383C /* Tracking_SensorStateReader.h */,
+ );
+ name = Tracking;
+ sourceTree = "<group>";
+ };
+ E8AA40A51907221900D5F144 /* Kernel */ = {
+ isa = PBXGroup;
+ children = (
+ E87DF46A196A1BEF005E383C /* OVR_CRC32.cpp */,
+ E87DF46B196A1BEF005E383C /* OVR_CRC32.h */,
+ E87DF46C196A1BEF005E383C /* OVR_SharedMemory.cpp */,
+ E87DF46D196A1BEF005E383C /* OVR_SharedMemory.h */,
+ E8B18321196D376800555C29 /* OVR_ThreadCommandQueue.cpp */,
+ E8B18322196D376800555C29 /* OVR_ThreadCommandQueue.h */,
+ E8AA40A61907221900D5F144 /* OVR_Alg.cpp */,
+ E8AA40A71907221900D5F144 /* OVR_Alg.h */,
+ E8AA40A81907221900D5F144 /* OVR_Allocator.cpp */,
+ E8AA40A91907221900D5F144 /* OVR_Allocator.h */,
+ E8AA40AA1907221900D5F144 /* OVR_Array.h */,
+ E8AA40AB1907221900D5F144 /* OVR_Atomic.cpp */,
+ E8AA40AC1907221900D5F144 /* OVR_Atomic.h */,
+ E8AA40AD1907221900D5F144 /* OVR_Color.h */,
+ E8AA40AE1907221900D5F144 /* OVR_ContainerAllocator.h */,
+ E8AA40AF1907221900D5F144 /* OVR_Deque.h */,
+ E8AA40B01907221900D5F144 /* OVR_File.cpp */,
+ E8AA40B11907221900D5F144 /* OVR_File.h */,
+ E8AA40B21907221900D5F144 /* OVR_FileFILE.cpp */,
+ E8AA40B31907221900D5F144 /* OVR_Hash.h */,
+ E8AA40B41907221900D5F144 /* OVR_KeyCodes.h */,
+ E8AA40B51907221900D5F144 /* OVR_List.h */,
+ E8AA40B61907221900D5F144 /* OVR_Lockless.cpp */,
+ E8AA40B71907221900D5F144 /* OVR_Lockless.h */,
+ E8AA40B81907221900D5F144 /* OVR_Log.cpp */,
+ E8AA40B91907221900D5F144 /* OVR_Log.h */,
+ E8AA40BA1907221900D5F144 /* OVR_Math.cpp */,
+ E8AA40BB1907221900D5F144 /* OVR_Math.h */,
+ E8AA40BC1907221900D5F144 /* OVR_RefCount.cpp */,
+ E8AA40BD1907221900D5F144 /* OVR_RefCount.h */,
+ E8AA40BE1907221900D5F144 /* OVR_Std.cpp */,
+ E8AA40BF1907221900D5F144 /* OVR_Std.h */,
+ E8AA40C01907221900D5F144 /* OVR_String.cpp */,
+ E8AA40C11907221900D5F144 /* OVR_String.h */,
+ E8AA40C21907221900D5F144 /* OVR_String_FormatUtil.cpp */,
+ E8AA40C31907221900D5F144 /* OVR_String_PathUtil.cpp */,
+ E8AA40C41907221900D5F144 /* OVR_StringHash.h */,
+ E8AA40C51907221900D5F144 /* OVR_SysFile.cpp */,
+ E8AA40C61907221900D5F144 /* OVR_SysFile.h */,
+ E8AA40C71907221900D5F144 /* OVR_System.cpp */,
+ E8AA40C81907221900D5F144 /* OVR_System.h */,
+ E8AA40C91907221900D5F144 /* OVR_Threads.h */,
+ E8AA40CA1907221900D5F144 /* OVR_ThreadsPthread.cpp */,
+ E8AA40CC1907221900D5F144 /* OVR_Timer.cpp */,
+ E8AA40CD1907221900D5F144 /* OVR_Timer.h */,
+ E8AA40CE1907221900D5F144 /* OVR_Types.h */,
+ E8AA40CF1907221900D5F144 /* OVR_UTF8Util.cpp */,
+ E8AA40D01907221900D5F144 /* OVR_UTF8Util.h */,
+ );
+ name = Kernel;
+ path = ../../../Src/Kernel;
+ sourceTree = "<group>";
+ };
+ E8AA40FC1907224700D5F144 /* Util */ = {
+ isa = PBXGroup;
+ children = (
+ E8788D1F196CF98000128BE5 /* Util_LatencyTest2Reader.cpp */,
+ E8788D20196CF98000128BE5 /* Util_LatencyTest2Reader.h */,
+ E8788D21196CF98000128BE5 /* Util_LatencyTest2State.h */,
+ E8AA41011907224700D5F144 /* Util_Interface.cpp */,
+ E8AA41021907224700D5F144 /* Util_Interface.h */,
+ E8AA41071907224700D5F144 /* Util_Render_Stereo.cpp */,
+ E8AA41081907224700D5F144 /* Util_Render_Stereo.h */,
+ );
+ name = Util;
+ path = ../../../Src/Util;
+ sourceTree = "<group>";
+ };
+ E8AA41B8190724E600D5F144 /* CAPI */ = {
+ isa = PBXGroup;
+ children = (
+ 4683CEBC1970867300285E02 /* CAPI_GL_HSWDisplay.cpp */,
+ 4683CEBD1970867300285E02 /* CAPI_GL_HSWDisplay.h */,
+ E886FEA11907528C00D5DB45 /* CAPI_DistortionRenderer.cpp */,
+ E8AA41BA190724E600D5F144 /* CAPI_DistortionRenderer.h */,
+ E8AA41BB190724E600D5F144 /* CAPI_FrameTimeManager.cpp */,
+ E8AA41BC190724E600D5F144 /* CAPI_FrameTimeManager.h */,
+ E8094D0D196FAE8800937940 /* CAPI_HSWDisplay.cpp */,
+ E8094D0E196FAE8800937940 /* CAPI_HSWDisplay.h */,
+ E8AA41BF190724E600D5F144 /* CAPI_HMDRenderState.cpp */,
+ E8AA41C0190724E600D5F144 /* CAPI_HMDRenderState.h */,
+ E8AA41C1190724E600D5F144 /* CAPI_HMDState.cpp */,
+ E8AA41C2190724E600D5F144 /* CAPI_HMDState.h */,
+ E8AA41CF190724E600D5F144 /* GL */,
+ );
+ name = CAPI;
+ path = ../../../Src/CAPI;
+ sourceTree = "<group>";
+ };
+ E8AA41CF190724E600D5F144 /* GL */ = {
+ isa = PBXGroup;
+ children = (
+ E8AA41D0190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp */,
+ E8AA41D1190724E600D5F144 /* CAPI_GL_DistortionRenderer.h */,
+ E8AA41D2190724E600D5F144 /* CAPI_GL_Util.cpp */,
+ E8AA41D3190724E600D5F144 /* CAPI_GL_Util.h */,
+ );
+ path = GL;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ E82D4CD11906FE640070CB3F /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E8AA4198190722BB00D5F144 /* OVR_Stereo.h in Headers */,
+ E8B18324196D376800555C29 /* OVR_ThreadCommandQueue.h in Headers */,
+ E8788D23196CF98000128BE5 /* Util_LatencyTest2Reader.h in Headers */,
+ E8AA41E2190724E600D5F144 /* CAPI_DistortionRenderer.h in Headers */,
+ E8094D10196FAE8800937940 /* CAPI_HSWDisplay.h in Headers */,
+ 4683CEBF1970867300285E02 /* CAPI_GL_HSWDisplay.h in Headers */,
+ E87DF471196A1BEF005E383C /* OVR_SharedMemory.h in Headers */,
+ E87DF4D2196A232F005E383C /* OVR_DeviceConstants.h in Headers */,
+ E8AA40DF1907221900D5F144 /* OVR_KeyCodes.h in Headers */,
+ E8AA40D51907221900D5F144 /* OVR_Array.h in Headers */,
+ E8788D24196CF98000128BE5 /* Util_LatencyTest2State.h in Headers */,
+ E8AA41F7190724E600D5F144 /* CAPI_GL_DistortionRenderer.h in Headers */,
+ E87DF47A196A1CEF005E383C /* OVR_Display.h in Headers */,
+ E87DF46F196A1BEF005E383C /* OVR_CRC32.h in Headers */,
+ E85F262D1954204900AA807B /* OVR_SerialFormat.h in Headers */,
+ E8AA40DC1907221900D5F144 /* OVR_File.h in Headers */,
+ E8AA40D41907221900D5F144 /* OVR_Allocator.h in Headers */,
+ E8788D1D196CF68000128BE5 /* Tracking_PoseState.h in Headers */,
+ E8AA410E1907224700D5F144 /* Util_Interface.h in Headers */,
+ E886FEA0190737FA00D5DB45 /* OVR_CAPI.h in Headers */,
+ E8AA41F9190724E600D5F144 /* CAPI_GL_Util.h in Headers */,
+ E8AA40E21907221900D5F144 /* OVR_Lockless.h in Headers */,
+ E8AA40F31907221900D5F144 /* OVR_System.h in Headers */,
+ E8AA41E8190724E600D5F144 /* CAPI_HMDRenderState.h in Headers */,
+ E8AA41141907224700D5F144 /* Util_Render_Stereo.h in Headers */,
+ E8788D1E196CF68000128BE5 /* Tracking_SensorState.h in Headers */,
+ E8AA40E61907221900D5F144 /* OVR_Math.h in Headers */,
+ E87DF4B0196A2161005E383C /* Service_NetSessionCommon.h in Headers */,
+ E8AA40F91907221900D5F144 /* OVR_Types.h in Headers */,
+ E8AA40D91907221900D5F144 /* OVR_ContainerAllocator.h in Headers */,
+ E87DF49B196A20E9005E383C /* OVR_Session.h in Headers */,
+ E87DF497196A20E9005E383C /* OVR_PacketizedTCPSocket.h in Headers */,
+ E87DF492196A20E9005E383C /* OVR_MessageIDTypes.h in Headers */,
+ E8AA40D71907221900D5F144 /* OVR_Atomic.h in Headers */,
+ E8AA41E4190724E600D5F144 /* CAPI_FrameTimeManager.h in Headers */,
+ E8AA40D21907221900D5F144 /* OVR_Alg.h in Headers */,
+ E87DF494196A20E9005E383C /* OVR_NetworkPlugin.h in Headers */,
+ E87DF495196A20E9005E383C /* OVR_NetworkTypes.h in Headers */,
+ E8AA40E01907221900D5F144 /* OVR_List.h in Headers */,
+ E8AA40EF1907221900D5F144 /* OVR_StringHash.h in Headers */,
+ E886FE9E190737FA00D5DB45 /* OVR_CAPI_GL.h in Headers */,
+ E87DF4F4196A23B4005E383C /* Tracking_SensorStateReader.h in Headers */,
+ E8AA41EA190724E600D5F144 /* CAPI_HMDState.h in Headers */,
+ E8AA40D81907221900D5F144 /* OVR_Color.h in Headers */,
+ E8AA4174190722BB00D5F144 /* OVR_JSON.h in Headers */,
+ E87DF49F196A20E9005E383C /* OVR_Unix_Socket.h in Headers */,
+ E87DF491196A20E9005E383C /* OVR_BitStream.h in Headers */,
+ E8AA40F11907221900D5F144 /* OVR_SysFile.h in Headers */,
+ E8AA40DE1907221900D5F144 /* OVR_Hash.h in Headers */,
+ E87DF4AC196A2161005E383C /* Service_NetClient.h in Headers */,
+ E87DF49D196A20E9005E383C /* OVR_Socket.h in Headers */,
+ E8AA40EC1907221900D5F144 /* OVR_String.h in Headers */,
+ E8AA4186190722BB00D5F144 /* OVR_Profile.h in Headers */,
+ E8AA40EA1907221900D5F144 /* OVR_Std.h in Headers */,
+ E87DF499196A20E9005E383C /* OVR_RPC1.h in Headers */,
+ E8AA40E81907221900D5F144 /* OVR_RefCount.h in Headers */,
+ E8AA40DA1907221900D5F144 /* OVR_Deque.h in Headers */,
+ E8AA40FB1907221900D5F144 /* OVR_UTF8Util.h in Headers */,
+ E87DF47E196A1CEF005E383C /* OVR_OSX_Display.h in Headers */,
+ E8AA40F41907221900D5F144 /* OVR_Threads.h in Headers */,
+ E8AA40F81907221900D5F144 /* OVR_Timer.h in Headers */,
+ E8AA40E41907221900D5F144 /* OVR_Log.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ E82D4CD21906FE640070CB3F /* LibOVR */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = E82D4CD71906FE640070CB3F /* Build configuration list for PBXNativeTarget "LibOVR" */;
+ buildPhases = (
+ E82D4CCF1906FE640070CB3F /* Sources */,
+ E82D4CD01906FE640070CB3F /* Frameworks */,
+ E82D4CD11906FE640070CB3F /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = LibOVR;
+ productName = LibOVR;
+ productReference = E82D4CD31906FE640070CB3F /* libovr.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ E82D4CCB1906FE640070CB3F /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0510;
+ ORGANIZATIONNAME = "Oculus VR Inc.";
+ };
+ buildConfigurationList = E82D4CCE1906FE640070CB3F /* Build configuration list for PBXProject "LibOVR" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = E82D4CCA1906FE640070CB3F;
+ productRefGroup = E82D4CD41906FE640070CB3F /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ E82D4CD21906FE640070CB3F /* LibOVR */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ E82D4CCF1906FE640070CB3F /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E8AA41E3190724E600D5F144 /* CAPI_FrameTimeManager.cpp in Sources */,
+ E8AA41131907224700D5F144 /* Util_Render_Stereo.cpp in Sources */,
+ E8AA4185190722BB00D5F144 /* OVR_Profile.cpp in Sources */,
+ E8094D0F196FAE8800937940 /* CAPI_HSWDisplay.cpp in Sources */,
+ E8AA40F01907221900D5F144 /* OVR_SysFile.cpp in Sources */,
+ E8AA40DB1907221900D5F144 /* OVR_File.cpp in Sources */,
+ E8788D22196CF98000128BE5 /* Util_LatencyTest2Reader.cpp in Sources */,
+ E8AA40ED1907221900D5F144 /* OVR_String_FormatUtil.cpp in Sources */,
+ E8AA4173190722BB00D5F144 /* OVR_JSON.cpp in Sources */,
+ E8AA40D61907221900D5F144 /* OVR_Atomic.cpp in Sources */,
+ E8AA40E31907221900D5F144 /* OVR_Log.cpp in Sources */,
+ E87DF4AF196A2161005E383C /* Service_NetSessionCommon.cpp in Sources */,
+ E87DF4F3196A23B4005E383C /* Tracking_SensorStateReader.cpp in Sources */,
+ E87DF4AB196A2161005E383C /* Service_NetClient.cpp in Sources */,
+ E8AA40E91907221900D5F144 /* OVR_Std.cpp in Sources */,
+ E8AA41F6190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp in Sources */,
+ E8AA40DD1907221900D5F144 /* OVR_FileFILE.cpp in Sources */,
+ E8AA40E51907221900D5F144 /* OVR_Math.cpp in Sources */,
+ E8AA40D31907221900D5F144 /* OVR_Allocator.cpp in Sources */,
+ E8AA41E9190724E600D5F144 /* CAPI_HMDState.cpp in Sources */,
+ E8AA40FA1907221900D5F144 /* OVR_UTF8Util.cpp in Sources */,
+ E8AA410D1907224700D5F144 /* Util_Interface.cpp in Sources */,
+ E8AA40F71907221900D5F144 /* OVR_Timer.cpp in Sources */,
+ E87DF49A196A20E9005E383C /* OVR_Session.cpp in Sources */,
+ E8AA40D11907221900D5F144 /* OVR_Alg.cpp in Sources */,
+ 4683CEBE1970867300285E02 /* CAPI_GL_HSWDisplay.cpp in Sources */,
+ E8AA4197190722BB00D5F144 /* OVR_Stereo.cpp in Sources */,
+ E87DF493196A20E9005E383C /* OVR_NetworkPlugin.cpp in Sources */,
+ E8AA40F21907221900D5F144 /* OVR_System.cpp in Sources */,
+ E8B18323196D376800555C29 /* OVR_ThreadCommandQueue.cpp in Sources */,
+ E8AA40EB1907221900D5F144 /* OVR_String.cpp in Sources */,
+ E87DF490196A20E9005E383C /* OVR_BitStream.cpp in Sources */,
+ E886FE9F190737FA00D5DB45 /* OVR_CAPI.cpp in Sources */,
+ E8AA40E71907221900D5F144 /* OVR_RefCount.cpp in Sources */,
+ E85F262C1954204900AA807B /* OVR_SerialFormat.cpp in Sources */,
+ E87DF496196A20E9005E383C /* OVR_PacketizedTCPSocket.cpp in Sources */,
+ E87DF46E196A1BEF005E383C /* OVR_CRC32.cpp in Sources */,
+ E8AA40E11907221900D5F144 /* OVR_Lockless.cpp in Sources */,
+ E8AA41E7190724E600D5F144 /* CAPI_HMDRenderState.cpp in Sources */,
+ E8AA41F8190724E600D5F144 /* CAPI_GL_Util.cpp in Sources */,
+ E8AA40EE1907221900D5F144 /* OVR_String_PathUtil.cpp in Sources */,
+ E87DF47D196A1CEF005E383C /* OVR_OSX_Display.cpp in Sources */,
+ E87DF49C196A20E9005E383C /* OVR_Socket.cpp in Sources */,
+ E886FEA21907528C00D5DB45 /* CAPI_DistortionRenderer.cpp in Sources */,
+ E87DF49E196A20E9005E383C /* OVR_Unix_Socket.cpp in Sources */,
+ E87DF498196A20E9005E383C /* OVR_RPC1.cpp in Sources */,
+ E8AA40F51907221900D5F144 /* OVR_ThreadsPthread.cpp in Sources */,
+ E87DF470196A1BEF005E383C /* OVR_SharedMemory.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ E82D4CD51906FE640070CB3F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ };
+ name = Debug;
+ };
+ E82D4CD61906FE640070CB3F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ SDKROOT = macosx;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ };
+ name = Release;
+ };
+ E82D4CD81906FE640070CB3F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ EXECUTABLE_PREFIX = "";
+ GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ OVR_BUILD_DEBUG,
+ "$(inherited)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_NAME = libovr;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ };
+ name = Debug;
+ };
+ E82D4CD91906FE640070CB3F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ EXECUTABLE_PREFIX = "";
+ GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_NAME = libovr;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/$(CONFIGURATION)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ E82D4CCE1906FE640070CB3F /* Build configuration list for PBXProject "LibOVR" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E82D4CD51906FE640070CB3F /* Debug */,
+ E82D4CD61906FE640070CB3F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ E82D4CD71906FE640070CB3F /* Build configuration list for PBXNativeTarget "LibOVR" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E82D4CD81906FE640070CB3F /* Debug */,
+ E82D4CD91906FE640070CB3F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = E82D4CCB1906FE640070CB3F /* Project object */;
+}
diff --git a/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..6e21728
--- /dev/null
+++ b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:LibOVR.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/LibOVR/Src/Displays/OVR_OSX_Display.cpp b/LibOVR/Src/Displays/OVR_OSX_Display.cpp
new file mode 100644
index 0000000..c49daa5
--- /dev/null
+++ b/LibOVR/Src/Displays/OVR_OSX_Display.cpp
@@ -0,0 +1,368 @@
+/************************************************************************************
+
+Filename : OVR_OSX_Display.cpp
+Content : OSX-specific Display declarations
+Created : July 2, 2014
+Authors : James Hughes
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#include "OVR_OSX_Display.h"
+#include "../Kernel/OVR_Log.h"
+
+#include <ApplicationServices/ApplicationServices.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreFoundation/CFString.h>
+#include <IOKit/graphics/IOGraphicsLib.h>
+
+//-------------------------------------------------------------------------------------
+// ***** Display enumeration Helpers
+
+namespace OVR {
+
+// FIXME Code duplication with windows.
+#define EDID_LENGTH 0x80
+
+#define EDID_HEADER 0x00
+#define EDID_HEADER_END 0x07
+
+#define ID_MANUFACTURER_NAME 0x08
+#define ID_MANUFACTURER_NAME_END 0x09
+
+#define EDID_STRUCT_VERSION 0x12
+#define EDID_STRUCT_REVISION 0x13
+
+#define ESTABLISHED_TIMING_1 0x23
+#define ESTABLISHED_TIMING_2 0x24
+#define MANUFACTURERS_TIMINGS 0x25
+
+#define DETAILED_TIMING_DESCRIPTIONS_START 0x36
+#define DETAILED_TIMING_DESCRIPTION_SIZE 18
+#define NO_DETAILED_TIMING_DESCRIPTIONS 4
+
+#define DETAILED_TIMING_DESCRIPTION_1 0x36
+#define DETAILED_TIMING_DESCRIPTION_2 0x48
+#define DETAILED_TIMING_DESCRIPTION_3 0x5a
+#define DETAILED_TIMING_DESCRIPTION_4 0x6c
+
+#define MONITOR_NAME 0xfc
+#define MONITOR_LIMITS 0xfd
+#define MONITOR_SERIAL 0xff
+
+#define UNKNOWN_DESCRIPTOR -1
+#define DETAILED_TIMING_BLOCK -2
+
+#define DESCRIPTOR_DATA 5
+
+const UByte edid_v1_header[] = { 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x00 };
+
+const UByte edid_v1_descriptor_flag[] = { 0x00, 0x00 };
+
+// FIXME Code duplication with windows. Refactor.
+static int blockType( UByte* block )
+{
+ if ( !strncmp( (const char*)edid_v1_descriptor_flag, (const char*)block, 2 ) )
+ {
+ // descriptor
+ if ( block[ 2 ] != 0 )
+ return UNKNOWN_DESCRIPTOR;
+ return block[ 3 ];
+ }
+ else
+ {
+ return DETAILED_TIMING_BLOCK;
+ }
+}
+
+static char* getMonitorName( UByte const* block )
+{
+ static char name[ 13 ];
+ unsigned i;
+ UByte const* ptr = block + DESCRIPTOR_DATA;
+
+ for( i = 0; i < 13; i++, ptr++ )
+ {
+ if ( *ptr == 0xa )
+ {
+ name[ i ] = 0;
+ return name;
+ }
+
+ name[ i ] = *ptr;
+ }
+
+ return name;
+}
+
+// FIXME Code duplication with windows. Refactor.
+static bool parseEdid( UByte* edid, OVR::OSX::DisplayEDID& edidResult )
+{
+ unsigned i;
+ UByte* block;
+ const char* monitor_name = "Unknown";
+ UByte checksum = 0;
+
+ for( i = 0; i < EDID_LENGTH; i++ )
+ checksum += edid[ i ];
+
+ // Bad checksum, fail EDID
+ if ( checksum != 0 )
+ return false;
+
+ if ( strncmp( (const char*)edid+EDID_HEADER, (const char*)edid_v1_header, EDID_HEADER_END+1 ) )
+ {
+ // First bytes don't match EDID version 1 header
+ return false;
+ }
+
+
+ // OVR_DEBUG_LOG_TEXT(( "\n# EDID version %d revision %d\n",
+ // (int)edid[EDID_STRUCT_VERSION],(int)edid[EDID_STRUCT_REVISION] ));
+
+ // Monitor name and timings
+
+ char serialNumber[14];
+ memset( serialNumber, 0, 14 );
+
+ block = edid + DETAILED_TIMING_DESCRIPTIONS_START;
+
+ for( i = 0; i < NO_DETAILED_TIMING_DESCRIPTIONS; i++,
+ block += DETAILED_TIMING_DESCRIPTION_SIZE )
+ {
+
+ if ( blockType( block ) == MONITOR_NAME )
+ {
+ monitor_name = getMonitorName( block );
+ }
+
+ if( blockType( block ) == MONITOR_SERIAL )
+ {
+ memcpy( serialNumber, block + 5, 13 );
+ break;
+ }
+ }
+
+ UByte vendorString[4] = {0};
+
+ vendorString[0] = (edid[8] >> 2 & 31) + 64;
+ vendorString[1] = ((edid[8] & 3) << 3) | (edid[9] >> 5) + 64;
+ vendorString[2] = (edid[9] & 31) + 64;
+
+ edidResult.ModelNumber = *(UInt16*)&edid[10];
+ edidResult.MonitorName = OVR::String(monitor_name);
+ edidResult.VendorName = OVR::String((const char*)vendorString);
+ edidResult.SerialNumber = OVR::String(serialNumber);
+
+ // printf( "\tIdentifier \"%s\"\n", monitor_name );
+ // printf( "\tVendorName \"%s\"\n", vendorString );
+ // printf( "\tModelName \"%s\"\n", monitor_name );
+ // printf( "\tModelNumber %d\n", edidResult.ModelNumber );
+ // printf( "\tSerialNumber \"%s\"\n", edidResult.SerialNumber.ToCStr() );
+
+ // FIXME: Get timings as well, though they aren't very useful here
+ // except for the vertical refresh rate, presumably
+
+ return true;
+}
+
+static int discoverExtendedRifts(OVR::OSX::DisplayDesc* descriptorArray, int inputArraySize, bool edidInfo)
+{
+ OVR_UNUSED(edidInfo);
+ int result = 0;
+
+ static bool reportDiscovery = true;
+ OVR_UNUSED(reportDiscovery);
+
+ CGDirectDisplayID Displays[32];
+ uint32_t NDisplays = 0;
+ CGGetOnlineDisplayList(32, Displays, &NDisplays);
+
+ for (unsigned int i = 0; i < NDisplays; i++)
+ {
+ io_service_t port = CGDisplayIOServicePort(Displays[i]);
+ CFDictionaryRef DispInfo = IODisplayCreateInfoDictionary(port, kNilOptions);
+
+ // Display[i]
+
+ uint32_t vendor = CGDisplayVendorNumber(Displays[i]);
+ uint32_t product = CGDisplayModelNumber(Displays[i]);
+
+ CGRect desktop = CGDisplayBounds(Displays[i]);
+ Vector2i desktopOffset(desktop.origin.x, desktop.origin.y);
+
+ if (vendor == 16082 && ( (product == 1)||(product == 2)||(product == 3) ) ) // 7" or HD
+ {
+ if( result >= inputArraySize ) { return result; }
+
+ Sizei monitorResolution(1280, 800);
+
+ // Obtain and parse EDID data.
+ CFDataRef data =
+ (CFDataRef)CFDictionaryGetValue(DispInfo, CFSTR(kIODisplayEDIDKey));
+ if (!data)
+ {
+ CFRelease(DispInfo);
+ OVR::LogError("[OSX Display] Unable to obtain EDID for Oculus product %d", product);
+ continue;
+ }
+ UByte* edid = (UByte*)CFDataGetBytePtr(data);
+ OSX::DisplayEDID edidResult;
+ parseEdid( edid, edidResult );
+
+ OVR::OSX::DisplayDesc& desc = descriptorArray[result++];
+ desc.DisplayID = Displays[i];
+ desc.ModelName = edidResult.MonitorName; // User friendly string.
+ desc.EdidSerialNumber = edidResult.SerialNumber;
+ desc.LogicalResolutionInPixels = monitorResolution;
+ desc.DesktopDisplayOffset = desktopOffset;
+
+ switch (product)
+ {
+ case 3: desc.DeviceTypeGuess = HmdType_DK2; break;
+ case 2: desc.DeviceTypeGuess = HmdType_DKHDProto; break;
+ case 1: desc.DeviceTypeGuess = HmdType_DK1; break;
+
+ default:
+ case 0: desc.DeviceTypeGuess = HmdType_Unknown; break;
+ }
+
+ // Hard-coded defaults in case the device doesn't have the data itself.
+ // DK2 prototypes (0003) or DK HD Prototypes (0002)
+ if (product == 3 || product == 2)
+ {
+ desc.LogicalResolutionInPixels = Sizei(1920, 1080);
+ desc.NativeResolutionInPixels = Sizei(1080, 1920);
+ }
+ else
+ {
+ desc.LogicalResolutionInPixels = monitorResolution;
+ desc.NativeResolutionInPixels = monitorResolution;
+ }
+
+ //OVR_DEBUG_LOG_TEXT(("Display Found %x:%x\n", vendor, product));
+ }
+ CFRelease(DispInfo);
+ }
+
+ return result;
+}
+
+
+//-------------------------------------------------------------------------------------
+// ***** Display
+
+bool Display::Initialize()
+{
+ // Nothing to initialize. OS X only supports compatibility mode.
+ return true;
+}
+
+
+bool Display::GetDriverMode(bool& driverInstalled, bool& compatMode, bool& hideDK1Mode)
+{
+ driverInstalled = false;
+ compatMode = true;
+ hideDK1Mode = false;
+ return true;
+}
+
+bool Display::SetDriverMode(bool compatMode, bool hideDK1Mode)
+{
+ return false;
+}
+
+DisplaySearchHandle* Display::GetDisplaySearchHandle()
+{
+ return new OSX::OSXDisplaySearchHandle();
+}
+
+bool Display::InCompatibilityMode( bool displaySearch )
+{
+ OVR_UNUSED( displaySearch );
+ return true;
+}
+
+int Display::GetDisplayCount( DisplaySearchHandle* handle, bool extended, bool applicationOnly, bool edidInfo )
+{
+ OVR_UNUSED(applicationOnly);
+
+ static int extendedCount = -1;
+
+ OSX::OSXDisplaySearchHandle* localHandle = (OSX::OSXDisplaySearchHandle*)handle;
+ if (localHandle == NULL)
+ {
+ OVR::LogError("[OSX Display] No search handle passed into GetDisplayCount. Return 0 rifts.");
+ return 0;
+ }
+
+ if (extendedCount == -1 || extended)
+ {
+ extendedCount = discoverExtendedRifts(localHandle->cachedDescriptorArray, OSX::OSXDisplaySearchHandle::DescArraySize, edidInfo);
+ }
+
+ localHandle->extended = true;
+ localHandle->extendedDisplayCount = extendedCount;
+ int totalCount = extendedCount;
+
+ /// FIXME: Implement application mode for OS X.
+ localHandle->application = false;
+ localHandle->applicationDisplayCount = 0;
+
+ localHandle->displayCount = totalCount;
+
+ return totalCount;
+}
+
+Ptr<Display> Display::GetDisplay( int index, DisplaySearchHandle* handle )
+{
+ Ptr<Display> result = NULL;
+
+ if (index < 0)
+ {
+ OVR::LogError("[OSX Display] Invalid index given to GetDisplay.");
+ return NULL;
+ }
+
+ OSX::OSXDisplaySearchHandle* localHandle = (OSX::OSXDisplaySearchHandle*)handle;
+ if (localHandle == NULL)
+ {
+ OVR::LogError("[OSX Display] No search handle passed into GetDisplay. Return 0 rifts.");
+ return NULL;
+ }
+
+ if (localHandle->extended)
+ {
+ if (index >= 0 && index < (int)localHandle->extendedDisplayCount)
+ {
+ return *new OSX::OSXDisplayGeneric(localHandle->cachedDescriptorArray[index]);
+ }
+
+ index -= localHandle->extendedDisplayCount;
+ }
+
+ if (localHandle->application)
+ {
+ OVR::LogError("[OSX Display] Mac does not support application displays.");
+ }
+
+ return result;
+}
+} // namespace OVR
diff --git a/LibOVR/Src/Displays/OVR_OSX_Display.h b/LibOVR/Src/Displays/OVR_OSX_Display.h
new file mode 100644
index 0000000..1401121
--- /dev/null
+++ b/LibOVR/Src/Displays/OVR_OSX_Display.h
@@ -0,0 +1,139 @@
+/************************************************************************************
+
+Filename : OVR_OSX_Display.h
+Content : OSX-specific Display declarations
+Created : July 2, 2014
+Authors : James Hughes
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#ifndef OVR_OSX_Display_h
+#define OVR_OSX_Display_h
+
+#include "OVR_Display.h"
+
+namespace OVR { namespace OSX {
+
+
+//-------------------------------------------------------------------------------------
+// DisplayDesc
+
+// Display information enumerable through OS .
+// TBD: Should we just move this to public header, so it's a const member of Display?
+struct DisplayDesc
+{
+ DisplayDesc() :
+ DeviceTypeGuess(HmdType_None),
+ DisplayID(0),
+ LogicalResolutionInPixels(0),
+ NativeResolutionInPixels(0)
+ {}
+
+ HmdTypeEnum DeviceTypeGuess;
+ uint32_t DisplayID; // This is the device identifier string from MONITORINFO (for app usage)
+ String ModelName; // This is a "DK2" type string
+ String EdidSerialNumber;
+ Sizei LogicalResolutionInPixels;
+ Sizei NativeResolutionInPixels;
+ Vector2i DesktopDisplayOffset;
+};
+
+
+//-------------------------------------------------------------------------------------
+// DisplayEDID
+
+// Describes EDID information as reported from our display driver.
+struct DisplayEDID
+{
+ DisplayEDID() :
+ ModelNumber(0)
+ {}
+
+ String MonitorName;
+ UInt16 ModelNumber;
+ String VendorName;
+ String SerialNumber;
+};
+
+//-------------------------------------------------------------------------------------
+// OSX Display Search Handle
+class OSXDisplaySearchHandle : public DisplaySearchHandle
+{
+public:
+ OSXDisplaySearchHandle() :
+ extended(false),
+ application(false),
+ extendedDisplayCount(0),
+ applicationDisplayCount(0),
+ displayCount(0)
+ {}
+ virtual ~OSXDisplaySearchHandle() {}
+
+ static const int DescArraySize = 16;
+
+ OSX::DisplayDesc cachedDescriptorArray[DescArraySize];
+ bool extended;
+ bool application;
+ int extendedDisplayCount;
+ int applicationDisplayCount;
+ int displayCount;
+};
+
+//-------------------------------------------------------------------------------------
+// OSXDisplayGeneric
+
+// Describes OSX display in Compatibility mode, containing basic data
+class OSXDisplayGeneric : public Display
+{
+public:
+ OSXDisplayGeneric( const DisplayDesc& dd ) :
+ Display(dd.DeviceTypeGuess,
+ dd.DisplayID,
+ dd.ModelName,
+ dd.EdidSerialNumber,
+ dd.LogicalResolutionInPixels,
+ dd.NativeResolutionInPixels,
+ dd.DesktopDisplayOffset,
+ 0,
+ 0,
+ false)
+ {
+ }
+
+ virtual ~OSXDisplayGeneric()
+ {
+ }
+
+ virtual bool InCompatibilityMode() const
+ {
+ return true;
+ }
+
+ // Generic displays are not capable of mirroring
+ virtual MirrorMode SetMirrorMode( MirrorMode newMode )
+ {
+ OVR_UNUSED( newMode );
+ return MirrorDisabled;
+ }
+};
+
+}} // namespace OVR::OSX
+
+#endif // OVR_OSX_Display_h
diff --git a/LibOVR/Src/Displays/OVR_OSX_FocusObserver.h b/LibOVR/Src/Displays/OVR_OSX_FocusObserver.h
new file mode 100644
index 0000000..66ed12f
--- /dev/null
+++ b/LibOVR/Src/Displays/OVR_OSX_FocusObserver.h
@@ -0,0 +1,47 @@
+#ifndef OVR_OSX_FocusObserver_h
+#define OVR_OSX_FocusObserver_h
+
+#include "../Kernel/OVR_Threads.h"
+#include "../Kernel/OVR_System.h"
+#include "../Kernel/OVR_Lockless.h"
+
+#include "../Service/Service_NetServer.h"
+
+namespace OVR { namespace OSX{
+
+ struct FocusReaderImpl;
+
+class AppFocusObserver : public SystemSingletonBase<AppFocusObserver>
+{
+ OVR_DECLARE_SINGLETON(AppFocusObserver);
+
+public:
+ Lock ListLock;
+ Array<pid_t> AppList;
+ Service::NetServerListener *listener;
+ FocusReaderImpl* impl;
+
+ void OnProcessFocus(pid_t pid);
+ void SetListener(Service::NetServerListener *_listener);
+
+ pid_t LastProcessId;
+ pid_t ActiveProcessId;
+ void AddProcess(pid_t pid);
+ void nextProcess();
+ void RemoveProcess(pid_t pid);
+
+
+protected:
+ void onAppFocus(pid_t pid);
+
+ pid_t LastAppFocus;
+
+};
+
+
+
+}} // namespace OVR, OSX
+
+
+#endif /* defined(__OVR_OSX_FocusReader__OVR_OSX_FocusObserver__) */
+
diff --git a/LibOVR/Src/Displays/OVR_OSX_FocusReader.h b/LibOVR/Src/Displays/OVR_OSX_FocusReader.h
new file mode 100644
index 0000000..74858c5
--- /dev/null
+++ b/LibOVR/Src/Displays/OVR_OSX_FocusReader.h
@@ -0,0 +1,17 @@
+#ifndef OVR_OSX_FocusReader_h
+#define OVR_OSX_FocusReader_h
+
+#import <Cocoa/Cocoa.h>
+
+@interface FocusReader : NSObject <NSApplicationDelegate>{
+ NSWindow *window;
+}
+
+- (void)start;
+
+@property (assign) IBOutlet NSWindow *window;
+
+@end
+
+#endif
+
diff --git a/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp b/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp
new file mode 100644
index 0000000..f375ddd
--- /dev/null
+++ b/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp
@@ -0,0 +1,842 @@
+/************************************************************************************
+
+Filename : OVR_ThreadsPthread.cpp
+Content :
+Created :
+Notes :
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#include "OVR_Threads.h"
+#include "OVR_Hash.h"
+
+#ifdef OVR_ENABLE_THREADS
+
+#include "OVR_Timer.h"
+#include "OVR_Log.h"
+
+#include <pthread.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <errno.h>
+
+
+namespace OVR {
+
+// ***** Mutex implementation
+
+
+// *** Internal Mutex implementation structure
+
+class MutexImpl : public NewOverrideBase
+{
+ // System mutex or semaphore
+ pthread_mutex_t SMutex;
+ bool Recursive;
+ unsigned LockCount;
+ pthread_t LockedBy;
+
+ friend class WaitConditionImpl;
+
+public:
+ // Constructor/destructor
+ MutexImpl(Mutex* pmutex, bool recursive = 1);
+ ~MutexImpl();
+
+ // Locking functions
+ void DoLock();
+ bool TryLock();
+ void Unlock(Mutex* pmutex);
+ // Returns 1 if the mutes is currently locked
+ bool IsLockedByAnotherThread(Mutex* pmutex);
+ bool IsSignaled() const;
+};
+
+pthread_mutexattr_t Lock::RecursiveAttr;
+bool Lock::RecursiveAttrInit = 0;
+
+// *** Constructor/destructor
+MutexImpl::MutexImpl(Mutex* pmutex, bool recursive)
+{
+ OVR_UNUSED(pmutex);
+ Recursive = recursive;
+ LockCount = 0;
+
+ if (Recursive)
+ {
+ if (!Lock::RecursiveAttrInit)
+ {
+ pthread_mutexattr_init(&Lock::RecursiveAttr);
+ pthread_mutexattr_settype(&Lock::RecursiveAttr, PTHREAD_MUTEX_RECURSIVE);
+ Lock::RecursiveAttrInit = 1;
+ }
+
+ pthread_mutex_init(&SMutex, &Lock::RecursiveAttr);
+ }
+ else
+ pthread_mutex_init(&SMutex, 0);
+}
+
+MutexImpl::~MutexImpl()
+{
+ pthread_mutex_destroy(&SMutex);
+}
+
+
+// Lock and try lock
+void MutexImpl::DoLock()
+{
+ while (pthread_mutex_lock(&SMutex))
+ ;
+ LockCount++;
+ LockedBy = pthread_self();
+}
+
+bool MutexImpl::TryLock()
+{
+ if (!pthread_mutex_trylock(&SMutex))
+ {
+ LockCount++;
+ LockedBy = pthread_self();
+ return 1;
+ }
+
+ return 0;
+}
+
+void MutexImpl::Unlock(Mutex* pmutex)
+{
+ OVR_UNUSED(pmutex);
+ OVR_ASSERT(pthread_self() == LockedBy && LockCount > 0);
+
+ //unsigned lockCount;
+ LockCount--;
+ //lockCount = LockCount;
+
+ pthread_mutex_unlock(&SMutex);
+}
+
+bool MutexImpl::IsLockedByAnotherThread(Mutex* pmutex)
+{
+ OVR_UNUSED(pmutex);
+ // There could be multiple interpretations of IsLocked with respect to current thread
+ if (LockCount == 0)
+ return 0;
+ if (pthread_self() != LockedBy)
+ return 1;
+ return 0;
+}
+
+bool MutexImpl::IsSignaled() const
+{
+ // An mutex is signaled if it is not locked ANYWHERE
+ // Note that this is different from IsLockedByAnotherThread function,
+ // that takes current thread into account
+ return LockCount == 0;
+}
+
+
+// *** Actual Mutex class implementation
+
+Mutex::Mutex(bool recursive)
+{
+ // NOTE: RefCount mode already thread-safe for all waitables.
+ pImpl = new MutexImpl(this, recursive);
+}
+
+Mutex::~Mutex()
+{
+ delete pImpl;
+}
+
+// Lock and try lock
+void Mutex::DoLock()
+{
+ pImpl->DoLock();
+}
+bool Mutex::TryLock()
+{
+ return pImpl->TryLock();
+}
+void Mutex::Unlock()
+{
+ pImpl->Unlock(this);
+}
+bool Mutex::IsLockedByAnotherThread()
+{
+ return pImpl->IsLockedByAnotherThread(this);
+}
+
+
+
+//-----------------------------------------------------------------------------------
+// ***** Event
+
+bool Event::Wait(unsigned delay)
+{
+ Mutex::Locker lock(&StateMutex);
+
+ // Do the correct amount of waiting
+ if (delay == OVR_WAIT_INFINITE)
+ {
+ while(!State)
+ StateWaitCondition.Wait(&StateMutex);
+ }
+ else if (delay)
+ {
+ if (!State)
+ StateWaitCondition.Wait(&StateMutex, delay);
+ }
+
+ bool state = State;
+ // Take care of temporary 'pulsing' of a state
+ if (Temporary)
+ {
+ Temporary = false;
+ State = false;
+ }
+ return state;
+}
+
+void Event::updateState(bool newState, bool newTemp, bool mustNotify)
+{
+ Mutex::Locker lock(&StateMutex);
+ State = newState;
+ Temporary = newTemp;
+ if (mustNotify)
+ StateWaitCondition.NotifyAll();
+}
+
+
+
+// ***** Wait Condition Implementation
+
+// Internal implementation class
+class WaitConditionImpl : public NewOverrideBase
+{
+ pthread_mutex_t SMutex;
+ pthread_cond_t Condv;
+
+public:
+
+ // Constructor/destructor
+ WaitConditionImpl();
+ ~WaitConditionImpl();
+
+ // Release mutex and wait for condition. The mutex is re-aqured after the wait.
+ bool Wait(Mutex *pmutex, unsigned delay = OVR_WAIT_INFINITE);
+
+ // Notify a condition, releasing at one object waiting
+ void Notify();
+ // Notify a condition, releasing all objects waiting
+ void NotifyAll();
+};
+
+
+WaitConditionImpl::WaitConditionImpl()
+{
+ pthread_mutex_init(&SMutex, 0);
+ pthread_cond_init(&Condv, 0);
+}
+
+WaitConditionImpl::~WaitConditionImpl()
+{
+ pthread_mutex_destroy(&SMutex);
+ pthread_cond_destroy(&Condv);
+}
+
+bool WaitConditionImpl::Wait(Mutex *pmutex, unsigned delay)
+{
+ bool result = 1;
+ unsigned lockCount = pmutex->pImpl->LockCount;
+
+ // Mutex must have been locked
+ if (lockCount == 0)
+ return 0;
+
+ pthread_mutex_lock(&SMutex);
+
+ // Finally, release a mutex or semaphore
+ if (pmutex->pImpl->Recursive)
+ {
+ // Release the recursive mutex N times
+ pmutex->pImpl->LockCount = 0;
+ for(unsigned i=0; i<lockCount; i++)
+ pthread_mutex_unlock(&pmutex->pImpl->SMutex);
+ }
+ else
+ {
+ pmutex->pImpl->LockCount = 0;
+ pthread_mutex_unlock(&pmutex->pImpl->SMutex);
+ }
+
+ // Note that there is a gap here between mutex.Unlock() and Wait().
+ // The other mutex protects this gap.
+
+ if (delay == OVR_WAIT_INFINITE)
+ pthread_cond_wait(&Condv,&SMutex);
+ else
+ {
+ timespec ts;
+
+ struct timeval tv;
+ gettimeofday(&tv, 0);
+
+ ts.tv_sec = tv.tv_sec + (delay / 1000);
+ ts.tv_nsec = (tv.tv_usec + (delay % 1000) * 1000) * 1000;
+
+ if (ts.tv_nsec > 999999999)
+ {
+ ts.tv_sec++;
+ ts.tv_nsec -= 1000000000;
+ }
+ int r = pthread_cond_timedwait(&Condv,&SMutex, &ts);
+ OVR_ASSERT(r == 0 || r == ETIMEDOUT);
+ if (r)
+ result = 0;
+ }
+
+ pthread_mutex_unlock(&SMutex);
+
+ // Re-aquire the mutex
+ for(unsigned i=0; i<lockCount; i++)
+ pmutex->DoLock();
+
+ // Return the result
+ return result;
+}
+
+// Notify a condition, releasing the least object in a queue
+void WaitConditionImpl::Notify()
+{
+ pthread_mutex_lock(&SMutex);
+ pthread_cond_signal(&Condv);
+ pthread_mutex_unlock(&SMutex);
+}
+
+// Notify a condition, releasing all objects waiting
+void WaitConditionImpl::NotifyAll()
+{
+ pthread_mutex_lock(&SMutex);
+ pthread_cond_broadcast(&Condv);
+ pthread_mutex_unlock(&SMutex);
+}
+
+
+
+// *** Actual implementation of WaitCondition
+
+WaitCondition::WaitCondition()
+{
+ pImpl = new WaitConditionImpl;
+}
+WaitCondition::~WaitCondition()
+{
+ delete pImpl;
+}
+
+bool WaitCondition::Wait(Mutex *pmutex, unsigned delay)
+{
+ return pImpl->Wait(pmutex, delay);
+}
+// Notification
+void WaitCondition::Notify()
+{
+ pImpl->Notify();
+}
+void WaitCondition::NotifyAll()
+{
+ pImpl->NotifyAll();
+}
+
+
+// ***** Current thread
+
+// Per-thread variable
+/*
+static __thread Thread* pCurrentThread = 0;
+
+// Static function to return a pointer to the current thread
+void Thread::InitCurrentThread(Thread *pthread)
+{
+ pCurrentThread = pthread;
+}
+
+// Static function to return a pointer to the current thread
+Thread* Thread::GetThread()
+{
+ return pCurrentThread;
+}
+*/
+
+
+// *** Thread constructors.
+
+Thread::Thread(UPInt stackSize, int processor)
+{
+ // NOTE: RefCount mode already thread-safe for all Waitable objects.
+ CreateParams params;
+ params.stackSize = stackSize;
+ params.processor = processor;
+ Init(params);
+}
+
+Thread::Thread(Thread::ThreadFn threadFunction, void* userHandle, UPInt stackSize,
+ int processor, Thread::ThreadState initialState)
+{
+ CreateParams params(threadFunction, userHandle, stackSize, processor, initialState);
+ Init(params);
+}
+
+Thread::Thread(const CreateParams& params)
+{
+ Init(params);
+}
+
+void Thread::Init(const CreateParams& params)
+{
+ // Clear the variables
+ ThreadFlags = 0;
+ ThreadHandle = 0;
+ ExitCode = 0;
+ SuspendCount = 0;
+ StackSize = params.stackSize;
+ Processor = params.processor;
+ Priority = params.priority;
+
+ // Clear Function pointers
+ ThreadFunction = params.threadFunction;
+ UserHandle = params.userHandle;
+ if (params.initialState != NotRunning)
+ Start(params.initialState);
+}
+
+Thread::~Thread()
+{
+ // Thread should not running while object is being destroyed,
+ // this would indicate ref-counting issue.
+ //OVR_ASSERT(IsRunning() == 0);
+
+ // Clean up thread.
+ ThreadHandle = 0;
+}
+
+
+
+// *** Overridable User functions.
+
+// Default Run implementation
+int Thread::Run()
+{
+ // Call pointer to function, if available.
+ return (ThreadFunction) ? ThreadFunction(this, UserHandle) : 0;
+}
+void Thread::OnExit()
+{
+}
+
+
+// Finishes the thread and releases internal reference to it.
+void Thread::FinishAndRelease()
+{
+ // Note: thread must be US.
+ ThreadFlags &= (UInt32)~(OVR_THREAD_STARTED);
+ ThreadFlags |= OVR_THREAD_FINISHED;
+
+ // Release our reference; this is equivalent to 'delete this'
+ // from the point of view of our thread.
+ Release();
+}
+
+
+
+// *** ThreadList - used to track all created threads
+
+class ThreadList : public NewOverrideBase
+{
+ //------------------------------------------------------------------------
+ struct ThreadHashOp
+ {
+ size_t operator()(const Thread* ptr)
+ {
+ return (((size_t)ptr) >> 6) ^ (size_t)ptr;
+ }
+ };
+
+ HashSet<Thread*, ThreadHashOp> ThreadSet;
+ Mutex ThreadMutex;
+ WaitCondition ThreadsEmpty;
+ // Track the root thread that created us.
+ pthread_t RootThreadId;
+
+ static ThreadList* volatile pRunningThreads;
+
+ void addThread(Thread *pthread)
+ {
+ Mutex::Locker lock(&ThreadMutex);
+ ThreadSet.Add(pthread);
+ }
+
+ void removeThread(Thread *pthread)
+ {
+ Mutex::Locker lock(&ThreadMutex);
+ ThreadSet.Remove(pthread);
+ if (ThreadSet.GetSize() == 0)
+ ThreadsEmpty.Notify();
+ }
+
+ void finishAllThreads()
+ {
+ // Only original root thread can call this.
+ OVR_ASSERT(pthread_self() == RootThreadId);
+
+ Mutex::Locker lock(&ThreadMutex);
+ while (ThreadSet.GetSize() != 0)
+ ThreadsEmpty.Wait(&ThreadMutex);
+ }
+
+public:
+
+ ThreadList()
+ {
+ RootThreadId = pthread_self();
+ }
+ ~ThreadList() { }
+
+
+ static void AddRunningThread(Thread *pthread)
+ {
+ // Non-atomic creation ok since only the root thread
+ if (!pRunningThreads)
+ {
+ pRunningThreads = new ThreadList;
+ OVR_ASSERT(pRunningThreads);
+ }
+ pRunningThreads->addThread(pthread);
+ }
+
+ // NOTE: 'pthread' might be a dead pointer when this is
+ // called so it should not be accessed; it is only used
+ // for removal.
+ static void RemoveRunningThread(Thread *pthread)
+ {
+ OVR_ASSERT(pRunningThreads);
+ pRunningThreads->removeThread(pthread);
+ }
+
+ static void FinishAllThreads()
+ {
+ // This is ok because only root thread can wait for other thread finish.
+ if (pRunningThreads)
+ {
+ pRunningThreads->finishAllThreads();
+ delete pRunningThreads;
+ pRunningThreads = 0;
+ }
+ }
+};
+
+// By default, we have no thread list.
+ThreadList* volatile ThreadList::pRunningThreads = 0;
+
+
+// FinishAllThreads - exposed publicly in Thread.
+void Thread::FinishAllThreads()
+{
+ ThreadList::FinishAllThreads();
+}
+
+// *** Run override
+
+int Thread::PRun()
+{
+ // Suspend us on start, if requested
+ if (ThreadFlags & OVR_THREAD_START_SUSPENDED)
+ {
+ Suspend();
+ ThreadFlags &= (UInt32)~OVR_THREAD_START_SUSPENDED;
+ }
+
+ // Call the virtual run function
+ ExitCode = Run();
+ return ExitCode;
+}
+
+
+
+
+// *** User overridables
+
+bool Thread::GetExitFlag() const
+{
+ return (ThreadFlags & OVR_THREAD_EXIT) != 0;
+}
+
+void Thread::SetExitFlag(bool exitFlag)
+{
+ // The below is atomic since ThreadFlags is AtomicInt.
+ if (exitFlag)
+ ThreadFlags |= OVR_THREAD_EXIT;
+ else
+ ThreadFlags &= (UInt32) ~OVR_THREAD_EXIT;
+}
+
+
+// Determines whether the thread was running and is now finished
+bool Thread::IsFinished() const
+{
+ return (ThreadFlags & OVR_THREAD_FINISHED) != 0;
+}
+// Determines whether the thread is suspended
+bool Thread::IsSuspended() const
+{
+ return SuspendCount > 0;
+}
+// Returns current thread state
+Thread::ThreadState Thread::GetThreadState() const
+{
+ if (IsSuspended())
+ return Suspended;
+ if (ThreadFlags & OVR_THREAD_STARTED)
+ return Running;
+ return NotRunning;
+}
+
+// Join thread
+bool Thread::Join(int maxWaitMs) const
+{
+ // If polling,
+ if (maxWaitMs == 0)
+ {
+ // Just return if finished
+ return IsFinished();
+ }
+ // If waiting forever,
+ else if (maxWaitMs > 0)
+ {
+ UInt32 t0 = Timer::GetTicksMs();
+
+ while (!IsFinished())
+ {
+ UInt32 t1 = Timer::GetTicksMs();
+
+ // If the wait has expired,
+ int delta = (int)(t1 - t0);
+ if (delta >= maxWaitMs)
+ {
+ return false;
+ }
+
+ Thread::MSleep(10);
+ }
+
+ return true;
+ }
+ else
+ {
+ while (!IsFinished())
+ {
+ pthread_join(ThreadHandle, NULL);
+ }
+ }
+
+ return true;
+}
+
+/*
+static const char* mapsched_policy(int policy)
+{
+ switch(policy)
+ {
+ case SCHED_OTHER:
+ return "SCHED_OTHER";
+ case SCHED_RR:
+ return "SCHED_RR";
+ case SCHED_FIFO:
+ return "SCHED_FIFO";
+
+ }
+ return "UNKNOWN";
+}
+ int policy;
+ sched_param sparam;
+ pthread_getschedparam(pthread_self(), &policy, &sparam);
+ int max_prior = sched_get_priority_max(policy);
+ int min_prior = sched_get_priority_min(policy);
+ printf(" !!!! policy: %s, priority: %d, max priority: %d, min priority: %d\n", mapsched_policy(policy), sparam.sched_priority, max_prior, min_prior);
+#include <stdio.h>
+*/
+// ***** Thread management
+
+// The actual first function called on thread start
+void* Thread_PthreadStartFn(void* phandle)
+{
+ Thread* pthread = (Thread*)phandle;
+ int result = pthread->PRun();
+ // Signal the thread as done and release it atomically.
+ pthread->FinishAndRelease();
+ // At this point Thread object might be dead; however we can still pass
+ // it to RemoveRunningThread since it is only used as a key there.
+ ThreadList::RemoveRunningThread(pthread);
+ return reinterpret_cast<void*>(result);
+}
+
+int Thread::InitAttr = 0;
+pthread_attr_t Thread::Attr;
+
+/* static */
+int Thread::GetOSPriority(ThreadPriority p)
+//static inline int MapToSystemPrority(Thread::ThreadPriority p)
+{
+ OVR_UNUSED(p);
+ return -1;
+}
+
+bool Thread::Start(ThreadState initialState)
+{
+ if (initialState == NotRunning)
+ return 0;
+ if (GetThreadState() != NotRunning)
+ {
+ OVR_DEBUG_LOG(("Thread::Start failed - thread %p already running", this));
+ return 0;
+ }
+
+ if (!InitAttr)
+ {
+ pthread_attr_init(&Attr);
+ pthread_attr_setdetachstate(&Attr, PTHREAD_CREATE_DETACHED);
+ pthread_attr_setstacksize(&Attr, 128 * 1024);
+ sched_param sparam;
+ sparam.sched_priority = Thread::GetOSPriority(NormalPriority);
+ pthread_attr_setschedparam(&Attr, &sparam);
+ InitAttr = 1;
+ }
+
+ ExitCode = 0;
+ SuspendCount = 0;
+ ThreadFlags = (initialState == Running) ? 0 : OVR_THREAD_START_SUSPENDED;
+
+ // AddRef to us until the thread is finished
+ AddRef();
+ ThreadList::AddRunningThread(this);
+
+ int result;
+ if (StackSize != 128 * 1024 || Priority != NormalPriority)
+ {
+ pthread_attr_t attr;
+
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ pthread_attr_setstacksize(&attr, StackSize);
+ sched_param sparam;
+ sparam.sched_priority = Thread::GetOSPriority(Priority);
+ pthread_attr_setschedparam(&attr, &sparam);
+ result = pthread_create(&ThreadHandle, &attr, Thread_PthreadStartFn, this);
+ pthread_attr_destroy(&attr);
+ }
+ else
+ result = pthread_create(&ThreadHandle, &Attr, Thread_PthreadStartFn, this);
+
+ if (result)
+ {
+ ThreadFlags = 0;
+ Release();
+ ThreadList::RemoveRunningThread(this);
+ return 0;
+ }
+ return 1;
+}
+
+
+// Suspend the thread until resumed
+bool Thread::Suspend()
+{
+ OVR_DEBUG_LOG(("Thread::Suspend - cannot suspend threads on this system"));
+ return 0;
+}
+
+// Resumes currently suspended thread
+bool Thread::Resume()
+{
+ return 0;
+}
+
+
+// Quits with an exit code
+void Thread::Exit(int exitCode)
+{
+ // Can only exist the current thread
+ // if (GetThread() != this)
+ // return;
+
+ // Call the virtual OnExit function
+ OnExit();
+
+ // Signal this thread object as done and release it's references.
+ FinishAndRelease();
+ ThreadList::RemoveRunningThread(this);
+
+ pthread_exit(reinterpret_cast<void*>(exitCode));
+}
+
+ThreadId GetCurrentThreadId()
+{
+ return (void*)pthread_self();
+}
+
+// *** Sleep functions
+
+/* static */
+bool Thread::Sleep(unsigned secs)
+{
+ sleep(secs);
+ return 1;
+}
+/* static */
+bool Thread::MSleep(unsigned msecs)
+{
+ usleep(msecs*1000);
+ return 1;
+}
+
+/* static */
+int Thread::GetCPUCount()
+{
+ return 1;
+}
+
+
+#if defined (OVR_OS_MAC)
+void Thread::SetThreadName( const char* name )
+{
+ pthread_setname_np( name );
+}
+#else
+void Thread::SetThreadName( const char* name )
+{
+ pthread_setname_np( pthread_self(), name );
+}
+#endif
+
+}
+
+#endif // OVR_ENABLE_THREADS
diff --git a/LibOVR/Src/Net/OVR_Unix_Socket.cpp b/LibOVR/Src/Net/OVR_Unix_Socket.cpp
new file mode 100644
index 0000000..6370671
--- /dev/null
+++ b/LibOVR/Src/Net/OVR_Unix_Socket.cpp
@@ -0,0 +1,596 @@
+/************************************************************************************
+
+Filename : OVR_Unix_Socket.cpp
+Content : Berkley sockets networking implementation
+Created : July 1, 2014
+Authors : Kevin Jenkins
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#include "OVR_Unix_Socket.h"
+#include "../Kernel/OVR_Std.h"
+#include "../Kernel/OVR_Allocator.h"
+#include "../Kernel/OVR_Threads.h" // Thread::MSleep
+#include "../Kernel/OVR_Log.h"
+
+#include <errno.h>
+
+namespace OVR { namespace Net {
+
+//-----------------------------------------------------------------------------
+// BerkleySocket
+
+void BerkleySocket::Close()
+{
+ if (TheSocket != INVALID_SOCKET)
+ {
+ close(TheSocket);
+ TheSocket = INVALID_SOCKET;
+ }
+}
+
+SInt32 BerkleySocket::GetSockname(SockAddr *pSockAddrOut)
+{
+ struct sockaddr_in6 sa;
+ memset(&sa,0,sizeof(sa));
+ socklen_t size = sizeof(sa);
+ SInt32 i = getsockname(TheSocket, (sockaddr*)&sa, &size);
+ if (i>=0)
+ {
+ pSockAddrOut->Set(&sa);
+ }
+ return i;
+}
+
+
+//-----------------------------------------------------------------------------
+// BitStream overloads for SockAddr
+
+BitStream& operator<<(BitStream& out, SockAddr& in)
+{
+ out.WriteBits((const unsigned char*) &in.Addr6, sizeof(in.Addr6)*8, true);
+ return out;
+}
+
+BitStream& operator>>(BitStream& in, SockAddr& out)
+{
+ bool success = in.ReadBits((unsigned char*) &out.Addr6, sizeof(out.Addr6)*8, true);
+ OVR_ASSERT(success);
+ OVR_UNUSED(success);
+ return in;
+}
+
+
+//-----------------------------------------------------------------------------
+// SockAddr
+
+SockAddr::SockAddr()
+{
+}
+
+SockAddr::SockAddr(SockAddr* address)
+{
+ Set(&address->Addr6);
+}
+
+SockAddr::SockAddr(sockaddr_storage* storage)
+{
+ Set(storage);
+}
+
+SockAddr::SockAddr(sockaddr_in6* address)
+{
+ Set(address);
+}
+
+SockAddr::SockAddr(const char* hostAddress, UInt16 port, int sockType)
+{
+ Set(hostAddress, port, sockType);
+}
+
+void SockAddr::Set(const sockaddr_storage* storage)
+{
+ memcpy(&Addr6, storage, sizeof(Addr6));
+}
+
+void SockAddr::Set(const sockaddr_in6* address)
+{
+ memcpy(&Addr6, address, sizeof(Addr6));
+}
+
+void SockAddr::Set(const char* hostAddress, UInt16 port, int sockType)
+{
+ memset(&Addr6, 0, sizeof(Addr6));
+
+ struct addrinfo* servinfo = 0; // will point to the results
+ struct addrinfo hints;
+
+ // make sure the struct is empty
+ memset(&hints, 0, sizeof (addrinfo));
+
+ hints.ai_socktype = sockType; // SOCK_DGRAM or SOCK_STREAM
+ hints.ai_flags = AI_PASSIVE; // fill in my IP for me
+ hints.ai_family = AF_UNSPEC ;
+
+ if (SOCK_DGRAM == sockType)
+ {
+ hints.ai_protocol = IPPROTO_UDP;
+ }
+ else if (SOCK_STREAM == sockType)
+ {
+ hints.ai_protocol = IPPROTO_TCP;
+ }
+
+ char portStr[32];
+ OVR_itoa(port, portStr, sizeof(portStr), 10);
+ int errcode = getaddrinfo(hostAddress, portStr, &hints, &servinfo);
+
+ if (0 != errcode)
+ {
+ OVR::LogError("getaddrinfo error: %s", gai_strerror(errcode));
+ }
+
+ OVR_ASSERT(0 != servinfo);
+
+ memcpy(&Addr6, servinfo->ai_addr, sizeof(Addr6));
+
+ freeaddrinfo(servinfo);
+}
+
+UInt16 SockAddr::GetPort()
+{
+ return htons(Addr6.sin6_port);
+}
+
+String SockAddr::ToString(bool writePort, char portDelineator) const
+{
+ char dest[INET6_ADDRSTRLEN + 1];
+
+ int ret = getnameinfo((struct sockaddr*)&Addr6,
+ sizeof(struct sockaddr_in6),
+ dest,
+ INET6_ADDRSTRLEN,
+ NULL,
+ 0,
+ NI_NUMERICHOST);
+ if (ret != 0)
+ {
+ dest[0] = '\0';
+ }
+
+ if (writePort)
+ {
+ unsigned char ch[2];
+ ch[0]=portDelineator;
+ ch[1]=0;
+ OVR_strcat(dest, 16, (const char*) ch);
+ OVR_itoa(ntohs(Addr6.sin6_port), dest+strlen(dest), 16, 10);
+ }
+
+ return String(dest);
+}
+bool SockAddr::IsLocalhost() const
+{
+ static const unsigned char localhost_bytes[] =
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
+
+ return memcmp(Addr6.sin6_addr.s6_addr, localhost_bytes, 16) == 0;
+}
+bool SockAddr::operator==( const SockAddr& right ) const
+{
+ return memcmp(&Addr6, &right.Addr6, sizeof(Addr6)) == 0;
+}
+
+bool SockAddr::operator!=( const SockAddr& right ) const
+{
+ return !(*this == right);
+}
+
+bool SockAddr::operator>( const SockAddr& right ) const
+{
+ return memcmp(&Addr6, &right.Addr6, sizeof(Addr6)) > 0;
+}
+
+bool SockAddr::operator<( const SockAddr& right ) const
+{
+ return memcmp(&Addr6, &right.Addr6, sizeof(Addr6)) < 0;
+}
+
+
+// Returns true on success
+static bool SetSocketOptions(SocketHandle sock)
+{
+ bool failed = false;
+ int sock_opt;
+ int sockError = 0;
+
+ // This doubles the max throughput rate
+ sock_opt=1024*256;
+ sockError = setsockopt(sock, SOL_SOCKET, SO_RCVBUF, ( char * ) & sock_opt, sizeof ( sock_opt ) );
+ if (sockError != 0)
+ {
+ int errsv = errno;
+ OVR::LogError("[Socket] Failed SO_RCVBUF setsockopt, errno: %d", errsv);
+ failed = true;
+ }
+
+ // This doesn't make much difference: 10% maybe
+ // Not supported on console 2
+ sock_opt=1024*16;
+ sockError = setsockopt(sock, SOL_SOCKET, SO_SNDBUF, ( char * ) & sock_opt, sizeof ( sock_opt ) );
+ if (sockError != 0)
+ {
+ int errsv = errno;
+ OVR::LogError("[Socket] Failed SO_SNDBUF setsockopt, errno: %d", errsv);
+ failed = true;
+ }
+
+ // NOTE: This should be OVR_OS_BSD, not Mac.
+#ifdef OVR_OS_MAC
+ int value = 1;
+ sockError = setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, &value, sizeof(value));
+ if (sockError != 0)
+ {
+ int errsv = errno;
+ OVR::LogError("[Socket] Failed SO_NOSIGPIPE setsockopt, errno: %d", errsv);
+ failed = true;
+ }
+#endif
+
+ // Reuse address is only needed for posix platforms, as it is the default
+ // on Windows platforms.
+ int optval = 1;
+ sockError = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(int));
+ if (sockError != 0)
+ {
+ int errsv = errno;
+ OVR::LogError("[Socket] Failed SO_REUSEADDR setsockopt, errno: %d", errsv);
+ failed = true;
+ }
+
+ return !failed;
+}
+
+void _Ioctlsocket(SocketHandle sock, unsigned long nonblocking)
+{
+ int flags = fcntl(sock, F_GETFL, 0);
+ if (flags < 0) return; // return false
+ if (nonblocking == 0) { flags &= ~O_NONBLOCK; }
+ else { flags |= O_NONBLOCK; }
+ fcntl(sock, F_SETFL, flags);
+}
+
+static SocketHandle BindShared(int ai_family, int ai_socktype, BerkleyBindParameters *pBindParameters)
+{
+ SocketHandle sock;
+
+ struct addrinfo hints;
+ memset(&hints, 0, sizeof (addrinfo)); // make sure the struct is empty
+ hints.ai_family = ai_family;
+ hints.ai_socktype = ai_socktype;
+ hints.ai_flags = AI_PASSIVE; // fill in my IP for me
+ struct addrinfo *servinfo=0, *aip; // will point to the results
+ char portStr[32];
+ OVR_itoa(pBindParameters->Port, portStr, sizeof(portStr), 10);
+
+ int errcode = 0;
+ if (!pBindParameters->Address.IsEmpty())
+ errcode = getaddrinfo(pBindParameters->Address.ToCStr(), portStr, &hints, &servinfo);
+ else
+ errcode = getaddrinfo(0, portStr, &hints, &servinfo);
+
+ if (0 != errcode)
+ {
+ OVR::LogError("getaddrinfo error: %s", gai_strerror(errcode));
+ }
+
+ for (aip = servinfo; aip != NULL; aip = aip->ai_next)
+ {
+ // Open socket. The address type depends on what
+ // getaddrinfo() gave us.
+ sock = socket(aip->ai_family, aip->ai_socktype, aip->ai_protocol);
+ if (sock != 0)
+ {
+ SetSocketOptions(sock);
+ int ret = bind( sock, aip->ai_addr, (int) aip->ai_addrlen );
+ if (ret>=0)
+ {
+ // The actual socket is always non-blocking
+ // I control blocking or not using WSAEventSelect
+ _Ioctlsocket(sock, 1);
+ freeaddrinfo(servinfo);
+ return sock;
+ }
+ else
+ {
+ close(sock);
+ }
+ }
+ }
+
+ if (servinfo) { freeaddrinfo(servinfo); }
+ return INVALID_SOCKET;
+}
+
+
+//-----------------------------------------------------------------------------
+// UDPSocket
+
+UDPSocket::UDPSocket()
+{
+ RecvBuf = new UByte[RecvBufSize];
+}
+
+UDPSocket::~UDPSocket()
+{
+ delete[] RecvBuf;
+}
+
+SocketHandle UDPSocket::Bind(BerkleyBindParameters *pBindParameters)
+{
+ SocketHandle s = BindShared(AF_INET6, SOCK_DGRAM, pBindParameters);
+ if (s < 0)
+ return s;
+
+ Close();
+ TheSocket = s;
+
+ return TheSocket;
+}
+
+void UDPSocket::OnRecv(SocketEvent_UDP* eventHandler, UByte* pData, int bytesRead, SockAddr* address)
+{
+ eventHandler->UDP_OnRecv(this, pData, bytesRead, address);
+}
+
+int UDPSocket::Send(const void* pData, int bytes, SockAddr* address)
+{
+ // NOTE: This should be OVR_OS_BSD
+#ifdef OVR_OS_MAC
+ int flags = 0;
+#else
+ int flags = MSG_NOSIGNAL;
+#endif
+
+ return (int)sendto(TheSocket, (const char*)pData, bytes, flags, (const sockaddr*)&address->Addr6, sizeof(address->Addr6));
+}
+
+void UDPSocket::Poll(SocketEvent_UDP *eventHandler)
+{
+ struct sockaddr_storage win32_addr;
+ socklen_t fromlen;
+ int bytesRead;
+
+ // FIXME: Implement blocking poll wait for UDP
+
+ // While some bytes are read,
+ while (fromlen = sizeof(win32_addr), // Must set fromlen each time
+ bytesRead = (int)recvfrom(TheSocket, (char*)RecvBuf, RecvBufSize, 0, (sockaddr*)&win32_addr, &fromlen),
+ bytesRead > 0)
+ {
+ SockAddr address(&win32_addr); // Wrap address
+
+ OnRecv(eventHandler, RecvBuf, bytesRead, &address);
+ }
+}
+
+
+//-----------------------------------------------------------------------------
+// TCPSocket
+
+TCPSocket::TCPSocket()
+{
+ IsConnecting = false;
+ IsListenSocket = false;
+}
+TCPSocket::TCPSocket(SocketHandle boundHandle, bool isListenSocket)
+{
+ TheSocket = boundHandle;
+ IsListenSocket = isListenSocket;
+ IsConnecting = false;
+ SetSocketOptions(TheSocket);
+
+ // The actual socket is always non-blocking
+ _Ioctlsocket(TheSocket, 1);
+}
+
+TCPSocket::~TCPSocket()
+{
+}
+
+void TCPSocket::OnRecv(SocketEvent_TCP* eventHandler, UByte* pData, int bytesRead)
+{
+ eventHandler->TCP_OnRecv(this, pData, bytesRead);
+}
+
+SocketHandle TCPSocket::Bind(BerkleyBindParameters* pBindParameters)
+{
+ SocketHandle s = BindShared(AF_INET6, SOCK_STREAM, pBindParameters);
+ if (s < 0)
+ return s;
+
+ Close();
+
+ SetBlockingTimeout(pBindParameters->blockingTimeout);
+ TheSocket = s;
+
+ return TheSocket;
+}
+
+int TCPSocket::Listen()
+{
+ if (IsListenSocket)
+ {
+ return 0;
+ }
+
+ int i = listen(TheSocket, SOMAXCONN);
+ if (i >= 0)
+ {
+ IsListenSocket = true;
+ }
+
+ return i;
+}
+
+int TCPSocket::Connect(SockAddr* address)
+{
+ int retval;
+
+ retval = connect(TheSocket, (struct sockaddr *) &address->Addr6, sizeof(address->Addr6));
+ if (retval < 0)
+ {
+ int errsv = errno;
+ // EINPROGRESS should not be checked on windows but should
+ // be checked on POSIX platforms.
+ if (errsv == EWOULDBLOCK || errsv == EINPROGRESS)
+ {
+ IsConnecting = true;
+ return 0;
+ }
+
+ OVR::LogText( "TCPSocket::Connect failed:Error code - %d\n", errsv );
+ }
+
+ return retval;
+}
+
+int TCPSocket::Send(const void* pData, int bytes)
+{
+ if (bytes <= 0)
+ {
+ return 0;
+ }
+ else
+ {
+ return (int)send(TheSocket, (const char*)pData, bytes, 0);
+ }
+}
+
+
+//// TCPSocketPollState
+
+TCPSocketPollState::TCPSocketPollState()
+{
+ FD_ZERO(&readFD);
+ FD_ZERO(&exceptionFD);
+ FD_ZERO(&writeFD);
+ largestDescriptor = INVALID_SOCKET;
+}
+
+bool TCPSocketPollState::IsValid() const
+{
+ return largestDescriptor != INVALID_SOCKET;
+}
+
+void TCPSocketPollState::Add(TCPSocket* tcpSocket)
+{
+ if (!tcpSocket)
+ {
+ return;
+ }
+
+ SocketHandle handle = tcpSocket->GetSocketHandle();
+
+ if (handle == INVALID_SOCKET)
+ {
+ return;
+ }
+
+ if (largestDescriptor == INVALID_SOCKET ||
+ largestDescriptor < handle)
+ {
+ largestDescriptor = handle;
+ }
+
+ FD_SET(handle, &readFD);
+ FD_SET(handle, &exceptionFD);
+
+ if (tcpSocket->IsConnecting)
+ {
+ FD_SET(handle, &writeFD);
+ }
+}
+
+bool TCPSocketPollState::Poll(long usec, long seconds)
+{
+ timeval tv;
+ tv.tv_sec = seconds;
+ tv.tv_usec = (int)usec;
+
+ return select(largestDescriptor + 1, &readFD, &writeFD, &exceptionFD, &tv) > 0;
+}
+
+void TCPSocketPollState::HandleEvent(TCPSocket* tcpSocket, SocketEvent_TCP* eventHandler)
+{
+ if (!tcpSocket || !eventHandler)
+ {
+ return;
+ }
+
+ SocketHandle handle = tcpSocket->GetSocketHandle();
+
+ if (tcpSocket->IsConnecting && FD_ISSET(handle, &writeFD))
+ {
+ tcpSocket->IsConnecting = false;
+ eventHandler->TCP_OnConnected(tcpSocket);
+ }
+
+ if (FD_ISSET(handle, &readFD))
+ {
+ if (!tcpSocket->IsListenSocket)
+ {
+ static const int BUFF_SIZE = 8096;
+ char data[BUFF_SIZE];
+
+ int bytesRead = (int)recv(handle, data, BUFF_SIZE, 0);
+ if (bytesRead > 0)
+ {
+ tcpSocket->OnRecv(eventHandler, (UByte*)data, bytesRead);
+ }
+ else // Disconnection event:
+ {
+ tcpSocket->IsConnecting = false;
+ eventHandler->TCP_OnClosed(tcpSocket);
+ }
+ }
+ else
+ {
+ struct sockaddr_storage sockAddr;
+ socklen_t sockAddrSize = sizeof(sockAddr);
+
+ SocketHandle newSock = accept(handle, (sockaddr*)&sockAddr, (socklen_t*)&sockAddrSize);
+ if (newSock > 0)
+ {
+ SockAddr sa(&sockAddr);
+ eventHandler->TCP_OnAccept(tcpSocket, &sa, newSock);
+ }
+ }
+ }
+
+ if (FD_ISSET(handle, &exceptionFD))
+ {
+ tcpSocket->IsConnecting = false;
+ eventHandler->TCP_OnClosed(tcpSocket);
+ }
+}
+
+
+}} // namespace OVR::Net
diff --git a/LibOVR/Src/Net/OVR_Unix_Socket.h b/LibOVR/Src/Net/OVR_Unix_Socket.h
new file mode 100644
index 0000000..faec464
--- /dev/null
+++ b/LibOVR/Src/Net/OVR_Unix_Socket.h
@@ -0,0 +1,152 @@
+/************************************************************************************
+
+PublicHeader: n/a
+Filename : OVR_Unix_Socket.h
+Content : Berkley sockets networking implementation
+Created : July 1, 2014
+Authors : Kevin Jenkins
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#ifndef OVR_Unix_Socket_h
+#define OVR_Unix_Socket_h
+
+#include "OVR_Socket.h"
+#include "OVR_BitStream.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <fcntl.h>
+
+namespace OVR { namespace Net {
+
+//-----------------------------------------------------------------------------
+// SockAddr
+
+// Abstraction for IPV6 socket address, with various convenience functions
+class SockAddr
+{
+public:
+ SockAddr();
+ SockAddr(SockAddr* sa);
+ SockAddr(sockaddr_storage* sa);
+ SockAddr(sockaddr_in6* sa);
+ SockAddr(const char* hostAddress, UInt16 port, int sockType);
+
+public:
+ void Set(const sockaddr_storage* sa);
+ void Set(const sockaddr_in6* sa);
+ void Set(const char* hostAddress, UInt16 port, int sockType); // SOCK_DGRAM or SOCK_STREAM
+
+ UInt16 GetPort();
+
+ String ToString(bool writePort, char portDelineator) const;
+
+ bool IsLocalhost() const;
+
+ void Serialize(BitStream* bs);
+ bool Deserialize(BitStream);
+
+ bool operator==( const SockAddr& right ) const;
+ bool operator!=( const SockAddr& right ) const;
+ bool operator >( const SockAddr& right ) const;
+ bool operator <( const SockAddr& right ) const;
+
+public:
+ sockaddr_in6 Addr6;
+};
+
+
+//-----------------------------------------------------------------------------
+// UDP Socket
+
+// Windows version of TCP socket
+class UDPSocket : public UDPSocketBase
+{
+public:
+ UDPSocket();
+ virtual ~UDPSocket();
+
+public:
+ virtual SocketHandle Bind(BerkleyBindParameters* pBindParameters);
+ virtual int Send(const void* pData, int bytes, SockAddr* address);
+ virtual void Poll(SocketEvent_UDP* eventHandler);
+
+protected:
+ static const int RecvBufSize = 1048576;
+ UByte* RecvBuf;
+
+ virtual void OnRecv(SocketEvent_UDP* eventHandler, UByte* pData,
+ int bytesRead, SockAddr* address);
+};
+
+
+//-----------------------------------------------------------------------------
+// TCP Socket
+
+// Windows version of TCP socket
+class TCPSocket : public TCPSocketBase
+{
+ friend class TCPSocketPollState;
+
+public:
+ TCPSocket();
+ TCPSocket(SocketHandle boundHandle, bool isListenSocket);
+ virtual ~TCPSocket();
+
+public:
+ virtual SocketHandle Bind(BerkleyBindParameters* pBindParameters);
+ virtual int Listen();
+ virtual int Connect(SockAddr* address);
+ virtual int Send(const void* pData, int bytes);
+
+protected:
+ virtual void OnRecv(SocketEvent_TCP* eventHandler, UByte* pData,
+ int bytesRead);
+
+public:
+ bool IsConnecting; // Is in the process of connecting?
+};
+
+
+//-----------------------------------------------------------------------------
+// TCPSocketPollState
+
+// Polls multiple blocking TCP sockets at once
+class TCPSocketPollState
+{
+ fd_set readFD, exceptionFD, writeFD;
+ SocketHandle largestDescriptor;
+
+public:
+ TCPSocketPollState();
+ bool IsValid() const;
+ void Add(TCPSocket* tcpSocket);
+ bool Poll(long usec = 30000, long seconds = 0);
+ void HandleEvent(TCPSocket* tcpSocket, SocketEvent_TCP* eventHandler);
+};
+
+
+}} // OVR::Net
+
+#endif
diff --git a/READ_ME_FIRST.txt b/READ_ME_FIRST.txt
index 42e6ea1..897d816 100644
--- a/READ_ME_FIRST.txt
+++ b/READ_ME_FIRST.txt
@@ -1,18 +1,18 @@
-Oculus VR Rift SDK README
-
-Copyright © 2014 Oculus VR, LLC. All rights reserved.
-
-Congratulations on downloading the Oculus VR Rift SDK.
-
-If you have not done so, be sure to download and install the Oculus Rift Runtime from
-the 0.4 tab at http://developer.oculusvr.com/downloads.
-
-The Runtime must be installed before running any apps built using Oculus Rift SDK 0.4 (DK1 or DK2).
-It should be installed to improve the DK1 experience when running apps older than SDK version 0.3.
-
-If you have any questions or comments, please visit http://developer.oculusvr.com/forums.
-
-We hope you enjoy your VR experience!
-
--- The Oculus SDK Team
-
+Oculus VR Rift SDK README
+
+Copyright © 2014 Oculus VR, LLC. All rights reserved.
+
+Congratulations on downloading the Oculus VR Rift SDK.
+
+If you have not done so, be sure to download and install the Oculus Rift Runtime from
+the 0.4 tab at http://developer.oculusvr.com/downloads.
+
+The Runtime must be installed before running any apps built using Oculus Rift SDK 0.4 (DK1 or DK2).
+It should be installed to improve the DK1 experience when running apps older than SDK version 0.3.
+
+If you have any questions or comments, please visit http://developer.oculusvr.com/forums.
+
+We hope you enjoy your VR experience!
+
+-- The Oculus SDK Team
+
diff --git a/Release_Notes.txt b/Release_Notes.txt
index 5a92e04..5a92e04 100644..100755
--- a/Release_Notes.txt
+++ b/Release_Notes.txt
diff --git a/Samples/CommonSrc/Platform/OSX_Gamepad.cpp b/Samples/CommonSrc/Platform/OSX_Gamepad.cpp
new file mode 100644
index 0000000..69acca4
--- /dev/null
+++ b/Samples/CommonSrc/Platform/OSX_Gamepad.cpp
@@ -0,0 +1,430 @@
+/************************************************************************************
+
+Filename : OSX_Gamepad.cpp
+Content : OSX implementation of Gamepad functionality.
+Created : May 6, 2013
+Authors : Lee Cooper
+
+Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#include "OSX_Gamepad.h"
+
+
+static const UInt32 Logitech_F710_VendorID = 0x046D;
+//static const UInt32 Logitech_F710_ProductID = 0xC219;
+
+static const UInt32 Sony_DualShock3_VendorID = 0x054C;
+//static const UInt32 Sony_DualShock3_ProductID = 0x0268;
+
+
+namespace OVR { namespace OvrPlatform { namespace OSX {
+
+
+GamepadManager::GamepadManager()
+ : bStateChanged(false)
+{
+
+ HidManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
+ IOHIDManagerOpen(HidManager, kIOHIDOptionsTypeNone);
+ IOHIDManagerScheduleWithRunLoop(HidManager,
+ CFRunLoopGetCurrent(),
+ kCFRunLoopDefaultMode);
+
+
+ // Setup device matching.
+ CFStringRef keys[] = { CFSTR(kIOHIDDeviceUsagePageKey),
+ CFSTR(kIOHIDDeviceUsageKey)};
+
+ int value;
+ CFNumberRef values[2];
+ CFDictionaryRef dictionaries[2];
+
+ // Match joysticks.
+ value = kHIDPage_GenericDesktop;
+ values[0] = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value);
+
+ value = kHIDUsage_GD_Joystick;
+ values[1] = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value);
+
+ dictionaries[0] = CFDictionaryCreate(kCFAllocatorDefault,
+ (const void **) keys,
+ (const void **) values,
+ 2,
+ &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+ CFRelease(values[0]);
+ CFRelease(values[1]);
+
+ // Match gamepads.
+ value = kHIDPage_GenericDesktop;
+ values[0] = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value);
+
+ value = kHIDUsage_GD_GamePad;
+ values[1] = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value);
+
+ dictionaries[1] = CFDictionaryCreate(kCFAllocatorDefault,
+ (const void **) keys,
+ (const void **) values,
+ 2,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ CFRelease(values[0]);
+ CFRelease(values[1]);
+
+ CFArrayRef array = CFArrayCreate( kCFAllocatorDefault,
+ (const void **) dictionaries,
+ 2,
+ &kCFTypeArrayCallBacks);
+ CFRelease(dictionaries[0]);
+ CFRelease(dictionaries[1]);
+
+ IOHIDManagerSetDeviceMatchingMultiple(HidManager, array);
+
+ CFRelease(array);
+
+
+ IOHIDManagerRegisterDeviceMatchingCallback(HidManager, staticOnDeviceMatched, this);
+ IOHIDManagerRegisterDeviceRemovalCallback(HidManager, staticOnDeviceRemoved, this);
+
+}
+
+GamepadManager::~GamepadManager()
+{
+ CFRelease(HidManager);
+}
+
+UInt32 GamepadManager::GetGamepadCount()
+{
+ return 1;
+}
+
+bool GamepadManager::GetGamepadState(UInt32 index, GamepadState* pState)
+{
+ // For now we just support one gamepad.
+ OVR_UNUSED(index);
+
+ if (!bStateChanged)
+ {
+ return false;
+ }
+
+ bStateChanged = false;
+// State.Debug();
+
+ *pState = State;
+ return true;
+}
+
+int GamepadManager::getIntDeviceProperty(IOHIDDeviceRef device, CFStringRef key)
+{
+ CFTypeRef type = IOHIDDeviceGetProperty(device, key);
+ OVR_ASSERT(type != NULL && CFGetTypeID(type) == CFNumberGetTypeID());
+
+ int value;
+ CFNumberGetValue((CFNumberRef) type, kCFNumberSInt32Type, &value);
+
+ return value;
+}
+
+void GamepadManager::staticOnDeviceMatched(void* context, IOReturn result, void* sender, IOHIDDeviceRef device)
+{
+ OVR_UNUSED(result);
+ OVR_UNUSED(sender);
+ GamepadManager* pManager = (GamepadManager*) context;
+ pManager->onDeviceMatched(device);
+}
+
+void GamepadManager::onDeviceMatched(IOHIDDeviceRef device)
+{
+ IOHIDDeviceRegisterInputValueCallback(device, staticOnDeviceValueChanged, this);
+}
+
+void GamepadManager::staticOnDeviceRemoved(void* context, IOReturn result, void* sender, IOHIDDeviceRef device)
+{
+ OVR_UNUSED(result);
+ OVR_UNUSED(sender);
+ GamepadManager* pManager = (GamepadManager*) context;
+ pManager->onDeviceRemoved(device);
+}
+
+void GamepadManager::onDeviceRemoved(IOHIDDeviceRef device)
+{
+ IOHIDDeviceRegisterInputValueCallback(device, NULL, NULL);
+}
+
+void GamepadManager::staticOnDeviceValueChanged(void* context, IOReturn result, void* sender, IOHIDValueRef value)
+{
+ OVR_UNUSED(result);
+ OVR_UNUSED(sender);
+ GamepadManager* pManager = (GamepadManager*) context;
+ pManager->onDeviceValueChanged(value);
+}
+
+float GamepadManager::mapAnalogAxis(IOHIDValueRef value, IOHIDElementRef element)
+{
+
+ CFIndex val = IOHIDValueGetIntegerValue(value);
+ CFIndex min = IOHIDElementGetLogicalMin(element);
+ CFIndex max = IOHIDElementGetLogicalMax(element);
+
+ float v = (float) (val - min) / (float) (max - min);
+ v = v * 2.0f - 1.0f;
+
+ // Dead zone.
+ if (v < 0.1f && v > -0.1f)
+ {
+ v = 0.0f;
+ }
+
+ return v;
+}
+
+bool GamepadManager::setStateIfDifferent(float& state, float newState)
+{
+ if (state == newState)
+ return false;
+
+ state = newState;
+
+ return true;
+}
+
+void GamepadManager::onDeviceValueChanged(IOHIDValueRef value)
+{
+
+ IOHIDElementRef element = IOHIDValueGetElement(value);
+ IOHIDDeviceRef device = IOHIDElementGetDevice(element);
+
+ unsigned int vendorID = (unsigned int)getIntDeviceProperty(device, CFSTR(kIOHIDVendorIDKey));
+ unsigned int productID = (unsigned int)getIntDeviceProperty(device, CFSTR(kIOHIDProductIDKey));
+ OVR_UNUSED(productID);
+
+ uint32_t usagePage = IOHIDElementGetUsagePage(element);
+ uint32_t usage = IOHIDElementGetUsage(element);
+
+ // The following controller mapping is based on the Logitech F710, however we use it for
+ // all Logitech devices on the assumption that they're likely to share the same mapping.
+ if (vendorID == Logitech_F710_VendorID)
+ {
+ // Logitech F710 mapping.
+ if (usagePage == kHIDPage_Button)
+ {
+ bool buttonState = IOHIDValueGetIntegerValue(value);
+
+ switch(usage)
+ {
+ case kHIDUsage_Button_1:
+ manipulateBitField(State.Buttons, Gamepad_X, buttonState);
+ break;
+ case kHIDUsage_Button_2:
+ manipulateBitField(State.Buttons, Gamepad_A, buttonState);
+ break;
+ case kHIDUsage_Button_3:
+ manipulateBitField(State.Buttons, Gamepad_B, buttonState);
+ break;
+ case kHIDUsage_Button_4:
+ manipulateBitField(State.Buttons, Gamepad_Y, buttonState);
+ break;
+ case 0x05:
+ manipulateBitField(State.Buttons, Gamepad_L1, buttonState);
+ break;
+ case 0x06:
+ manipulateBitField(State.Buttons, Gamepad_R1, buttonState);
+ break;
+ case 0x07:
+ State.LT = buttonState ? 1.0f:0.0f;
+ break;
+ case 0x08:
+ State.RT = buttonState ? 1.0f:0.0f;
+ break;
+ case 0x09:
+ manipulateBitField(State.Buttons, Gamepad_Back, buttonState);
+ break;
+ case 0x0A:
+ manipulateBitField(State.Buttons, Gamepad_Start, buttonState);
+ break;
+ case 0x0B:
+ manipulateBitField(State.Buttons, Gamepad_LStick, buttonState);
+ break;
+ case 0x0C:
+ manipulateBitField(State.Buttons, Gamepad_RStick, buttonState);
+ break;
+ default:
+ return;
+ }
+ }
+ else if (usagePage == kHIDPage_GenericDesktop)
+ {
+ float v;
+ switch(usage)
+ {
+ case kHIDUsage_GD_X:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.LX, v))
+ return;
+ break;
+ case kHIDUsage_GD_Y:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.LY, -v))
+ return;
+ break;
+ case kHIDUsage_GD_Z:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.RX, v))
+ return;
+ break;
+ case kHIDUsage_GD_Rz:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.RY, -v))
+ return;
+ break;
+ case kHIDUsage_GD_Hatswitch:
+ {
+ CFIndex integerValue = IOHIDValueGetIntegerValue(value);
+
+ manipulateBitField(State.Buttons,
+ Gamepad_Up,
+ integerValue == 7 || integerValue == 0 || integerValue == 1);
+ manipulateBitField(State.Buttons,
+ Gamepad_Down,
+ integerValue == 3 || integerValue == 4 || integerValue == 5);
+ manipulateBitField(State.Buttons,
+ Gamepad_Left,
+ integerValue == 5 || integerValue == 6 || integerValue == 7);
+ manipulateBitField(State.Buttons,
+ Gamepad_Right,
+ integerValue == 1 || integerValue == 2 || integerValue == 3);
+ }
+ break;
+ default:
+ return;
+ }
+ }
+ }
+ // The following controller mapping is based on the Sony DualShock3, however we use it for
+ // all Sony devices on the assumption that they're likely to share the same mapping.
+ else if (vendorID == Sony_DualShock3_VendorID)
+ {
+ // PS3 Controller.
+ if (usagePage == kHIDPage_Button)
+ {
+ bool buttonState = IOHIDValueGetIntegerValue(value);
+
+ switch(usage)
+ {
+ case kHIDUsage_Button_1:
+ manipulateBitField(State.Buttons, Gamepad_Back, buttonState);
+ break;
+ case kHIDUsage_Button_2:
+ manipulateBitField(State.Buttons, Gamepad_LStick, buttonState);
+ break;
+ case kHIDUsage_Button_3:
+ manipulateBitField(State.Buttons, Gamepad_RStick, buttonState);
+ break;
+ case kHIDUsage_Button_4:
+ manipulateBitField(State.Buttons, Gamepad_Start, buttonState);
+ break;
+ case 0x05:
+ manipulateBitField(State.Buttons, Gamepad_Up, buttonState);
+ break;
+ case 0x06:
+ manipulateBitField(State.Buttons, Gamepad_Right, buttonState);
+ break;
+ case 0x07:
+ manipulateBitField(State.Buttons, Gamepad_Down, buttonState);
+ break;
+ case 0x08:
+ manipulateBitField(State.Buttons, Gamepad_Left, buttonState);
+ break;
+ case 0x09:
+ State.LT = buttonState ? 1.0f:0.0f;
+ break;
+ case 0x0A:
+ State.RT = buttonState ? 1.0f:0.0f;
+ break;
+ case 0x0B:
+ manipulateBitField(State.Buttons, Gamepad_L1, buttonState);
+ break;
+ case 0x0C:
+ manipulateBitField(State.Buttons, Gamepad_R1, buttonState);
+ break;
+ case 0x0D:
+ // PS3 Triangle.
+ manipulateBitField(State.Buttons, Gamepad_TRIANGLE, buttonState);
+ break;
+ case 0x0E:
+ // PS3 Circle
+ manipulateBitField(State.Buttons, Gamepad_CIRCLE, buttonState);
+ break;
+ case 0x0F:
+ // PS3 Cross
+ manipulateBitField(State.Buttons, Gamepad_CROSS, buttonState);
+ break;
+ case 0x10:
+ // PS3 Square
+ manipulateBitField(State.Buttons, Gamepad_SQUARE, buttonState);
+ break;
+ default:
+ return;
+ }
+ }
+ else if (usagePage == kHIDPage_GenericDesktop)
+ {
+ float v;
+ switch(usage)
+ {
+ case kHIDUsage_GD_X:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.LX, v))
+ return;
+ break;
+ case kHIDUsage_GD_Y:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.LY, -v))
+ return;
+ break;
+ case kHIDUsage_GD_Z:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.RX, v))
+ return;
+ break;
+ case kHIDUsage_GD_Rz:
+ v = mapAnalogAxis(value, element);
+ if (!setStateIfDifferent(State.RY, -v))
+ return;
+ break;
+ default:
+ return;
+ }
+ }
+ }
+
+ bStateChanged = true;
+}
+
+void GamepadManager::manipulateBitField(unsigned int& bitfield, unsigned int mask, bool val)
+{
+ if (val)
+ {
+ bitfield |= mask;
+ }
+ else
+ {
+ bitfield &= ~mask;
+ }
+}
+
+}}} // OVR::OvrPlatform::OSX
diff --git a/Samples/CommonSrc/Platform/OSX_Gamepad.h b/Samples/CommonSrc/Platform/OSX_Gamepad.h
new file mode 100644
index 0000000..5abeb56
--- /dev/null
+++ b/Samples/CommonSrc/Platform/OSX_Gamepad.h
@@ -0,0 +1,66 @@
+/************************************************************************************
+
+Filename : OSX_Gamepad.h
+Content : OSX implementation of Gamepad functionality.
+Created : May 6, 2013
+Authors : Lee Cooper
+
+Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#ifndef OVR_OSX_Gamepad_h
+#define OVR_OSX_Gamepad_h
+
+#include <IOKit/IOKitLib.h>
+#include <IOKit/hid/IOHIDManager.h>
+
+#include "Gamepad.h"
+
+namespace OVR { namespace OvrPlatform { namespace OSX {
+
+
+class GamepadManager : public OvrPlatform::GamepadManager
+{
+public:
+ GamepadManager();
+ ~GamepadManager();
+
+ virtual UInt32 GetGamepadCount();
+ virtual bool GetGamepadState(UInt32 index, GamepadState* pState);
+
+private:
+ static void staticOnDeviceMatched(void* context, IOReturn result, void* sender, IOHIDDeviceRef device);
+ void onDeviceMatched(IOHIDDeviceRef device);
+
+ static void staticOnDeviceRemoved(void* context, IOReturn result, void* sender, IOHIDDeviceRef device);
+ void onDeviceRemoved(IOHIDDeviceRef device);
+
+ static void staticOnDeviceValueChanged(void* context, IOReturn result, void* sender, IOHIDValueRef value);
+ void onDeviceValueChanged(IOHIDValueRef value);
+
+ int getIntDeviceProperty(IOHIDDeviceRef device, CFStringRef key);
+ float mapAnalogAxis(IOHIDValueRef value, IOHIDElementRef element);
+ void manipulateBitField(unsigned int& bitfield, unsigned int mask, bool val);
+ bool setStateIfDifferent(float& state, float newState);
+
+ IOHIDManagerRef HidManager;
+ GamepadState State;
+ bool bStateChanged;
+};
+
+}}}
+
+#endif // OVR_OSX_Gamepad_h
diff --git a/Samples/CommonSrc/Platform/OSX_Platform.h b/Samples/CommonSrc/Platform/OSX_Platform.h
new file mode 100644
index 0000000..6803aab
--- /dev/null
+++ b/Samples/CommonSrc/Platform/OSX_Platform.h
@@ -0,0 +1,113 @@
+/************************************************************************************
+
+Filename : OSX_Platform.h
+Content :
+Created :
+Authors :
+
+Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#include "../Platform/Platform.h"
+#include "../Render/Render_GL_Device.h"
+
+namespace OVR { namespace OvrPlatform { namespace OSX {
+
+class PlatformCore : public OvrPlatform::PlatformCore
+{
+public:
+ void* Win;
+ void* View;
+ void* NsApp;
+ bool Quit;
+ int ExitCode;
+ int Width, Height;
+ MouseMode MMode;
+
+ void RunIdle();
+
+public:
+ PlatformCore(Application* app, void* nsapp);
+ ~PlatformCore();
+
+ void* SetupWindow(int w, int h);
+ void Exit(int exitcode);
+
+ RenderDevice* SetupGraphics(const SetupGraphicsDeviceSet& setupGraphicsDesc,
+ const char* gtype, const Render::RendererParams& rp);
+
+ void SetMouseMode(MouseMode mm);
+ void GetWindowSize(int* w, int* h) const;
+
+ void SetWindowTitle(const char*title);
+
+ void ShowWindow(bool show);
+ void DestroyWindow();
+ bool SetFullscreen(const Render::RendererParams& rp, int fullscreen);
+ int GetDisplayCount();
+ Render::DisplayId GetDisplay(int screen);
+
+ String GetContentDirectory() const;
+};
+
+}}
+namespace Render { namespace GL { namespace OSX {
+
+class RenderDevice : public Render::GL::RenderDevice
+{
+public:
+ void* Context;
+
+ RenderDevice(const Render::RendererParams& p, void* context)
+ : GL::RenderDevice(p), Context(context) {}
+
+ virtual void Shutdown();
+ virtual void Present(bool useVsync);
+
+ virtual bool SetFullscreen(DisplayMode fullscreen);
+
+ virtual ovrRenderAPIConfig Get_ovrRenderAPIConfig() const;
+
+ // oswnd = X11::PlatformCore*
+ static Render::RenderDevice* CreateDevice(const RendererParams& rp, void* oswnd);
+};
+
+}}}}
+
+
+// OVR_PLATFORM_APP_ARGS specifies the Application class to use for startup,
+// providing it with startup arguments.
+#define OVR_PLATFORM_APP_ARGS_WITH_LOG(AppClass, LogClass, args) \
+OVR::OvrPlatform::Application* OVR::OvrPlatform::Application::CreateApplication() \
+{ static LogClass log; OVR::System::Init(&log); \
+return new AppClass args; } \
+void OVR::OvrPlatform::Application::DestroyApplication(OVR::OvrPlatform::Application* app) \
+{ OVR::OvrPlatform::PlatformCore* platform = app->pPlatform; \
+delete app; delete platform; OVR::System::Destroy(); };
+
+#define OVR_PLATFORM_APP_ARGS(AppClass, args) \
+ OVR::OvrPlatform::Application* OVR::OvrPlatform::Application::CreateApplication() \
+{ OVR::System::Init(OVR::Log::ConfigureDefaultLog(OVR::LogMask_All)); \
+ return new AppClass args; } \
+ void OVR::OvrPlatform::Application::DestroyApplication(OVR::OvrPlatform::Application* app) \
+{ OVR::OvrPlatform::PlatformCore* platform = app->pPlatform; \
+ delete app; delete platform; OVR::System::Destroy(); };
+
+// OVR_PLATFORM_APP_ARGS specifies the Application startup class with no args.
+#define OVR_PLATFORM_APP(AppClass) OVR_PLATFORM_APP_ARGS(AppClass, ())
+
+#define OVR_PLATFORM_APP_WITH_LOG(AppClass,LogClass) OVR_PLATFORM_APP_ARGS_WITH_LOG(AppClass,LogClass, ())
+
diff --git a/Samples/CommonSrc/Platform/OSX_Platform.mm b/Samples/CommonSrc/Platform/OSX_Platform.mm
new file mode 100644
index 0000000..dfc29f8
--- /dev/null
+++ b/Samples/CommonSrc/Platform/OSX_Platform.mm
@@ -0,0 +1,553 @@
+/************************************************************************************
+
+Filename : OSX_Platform.mm
+Content :
+Created :
+Authors :
+
+Copyright : Copyright 2012 Oculus, Inc. All Rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#import "../Platform/OSX_PlatformObjc.h"
+
+using namespace OVR;
+using namespace OVR::OvrPlatform;
+
+@implementation OVRApp
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (void)run
+{
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ _running = YES;
+ OVR::OvrPlatform::Application* app;
+ {
+ using namespace OVR;
+ using namespace OVR::OvrPlatform;
+
+ // CreateApplication must be the first call since it does OVR::System::Initialize.
+ app = Application::CreateApplication();
+ OSX::PlatformCore* platform = new OSX::PlatformCore(app, self);
+ // The platform attached to an app will be deleted by DestroyApplication.
+ app->SetPlatformCore(platform);
+
+ [self setApp:app];
+ [self setPlatform:platform];
+
+ const char* argv[] = {"OVRApp"};
+ int exitCode = app->OnStartup(1, argv);
+ if (exitCode)
+ {
+ Application::DestroyApplication(app);
+ exit(exitCode);
+ }
+ }
+ [self finishLaunching];
+ [pool drain];
+
+ while ([self isRunning])
+ {
+ pool = [[NSAutoreleasePool alloc] init];
+ NSEvent* event = [self nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:YES];
+ if (event)
+ {
+ [self sendEvent:event];
+ }
+ _App->OnIdle();
+ [pool drain];
+ }
+ OVR::OvrPlatform::Application::DestroyApplication(app);
+}
+
+@end
+
+static int KeyMap[][2] =
+{
+ { NSDeleteFunctionKey, OVR::Key_Delete },
+ { '\t', OVR::Key_Tab },
+ { '\n', OVR::Key_Return },
+ { NSPauseFunctionKey, OVR::Key_Pause },
+ { 27, OVR::Key_Escape },
+ { 127, OVR::Key_Backspace },
+ { ' ', OVR::Key_Space },
+ { NSPageUpFunctionKey, OVR::Key_PageUp },
+ { NSPageDownFunctionKey, OVR::Key_PageDown },
+ { NSNextFunctionKey, OVR::Key_PageDown },
+ { NSEndFunctionKey, OVR::Key_End },
+ { NSHomeFunctionKey, OVR::Key_Home },
+ { NSLeftArrowFunctionKey, OVR::Key_Left },
+ { NSUpArrowFunctionKey, OVR::Key_Up },
+ { NSRightArrowFunctionKey, OVR::Key_Right },
+ { NSDownArrowFunctionKey, OVR::Key_Down },
+ { NSInsertFunctionKey, OVR::Key_Insert },
+ { NSDeleteFunctionKey, OVR::Key_Delete },
+ { NSHelpFunctionKey, OVR::Key_Insert },
+};
+
+
+static KeyCode MapToKeyCode(wchar_t vk)
+{
+ unsigned key = Key_None;
+
+ if ((vk >= 'a') && (vk <= 'z'))
+ {
+ key = vk - 'a' + Key_A;
+ }
+ else if ((vk >= ' ') && (vk <= '~'))
+ {
+ key = vk;
+ }
+ else if ((vk >= '0') && (vk <= '9'))
+ {
+ key = vk - '0' + Key_Num0;
+ }
+ else if ((vk >= NSF1FunctionKey) && (vk <= NSF15FunctionKey))
+ {
+ key = vk - NSF1FunctionKey + Key_F1;
+ }
+ else
+ {
+ for (unsigned i = 0; i< (sizeof(KeyMap) / sizeof(KeyMap[1])); i++)
+ {
+ if (vk == KeyMap[i][0])
+ {
+ key = KeyMap[i][1];
+ break;
+ }
+ }
+ }
+
+ return (KeyCode)key;
+}
+
+static int MapModifiers(unsigned long xmod)
+{
+ int mod = 0;
+ if (xmod & NSShiftKeyMask)
+ mod |= OVR::OvrPlatform::Mod_Shift;
+ if (xmod & NSCommandKeyMask)
+ mod |= OVR::OvrPlatform::Mod_Control;
+ if (xmod & NSAlternateKeyMask)
+ mod |= OVR::OvrPlatform::Mod_Alt;
+ if (xmod & NSControlKeyMask)
+ mod |= OVR::OvrPlatform::Mod_Meta;
+ return mod;
+}
+
+@implementation OVRView
+
+-(BOOL) acceptsFirstResponder
+{
+ return YES;
+}
+-(BOOL) acceptsFirstMouse:(NSEvent *)ev
+{
+ return YES;
+}
+
++(CGDirectDisplayID) displayFromScreen:(NSScreen *)s
+{
+ NSNumber* didref = (NSNumber*)[[s deviceDescription] objectForKey:@"NSScreenNumber"];
+ CGDirectDisplayID disp = (CGDirectDisplayID)[didref longValue];
+ return disp;
+}
+
+-(void) warpMouseToCenter
+{
+ NSPoint w;
+ w.x = _Platform->Width/2.0f;
+ w.y = _Platform->Height/2.0f;
+ w = [[self window] convertBaseToScreen:w];
+ CGDirectDisplayID disp = [OVRView displayFromScreen:[[self window] screen]];
+ CGPoint p = {w.x, CGDisplayPixelsHigh(disp)-w.y};
+ CGDisplayMoveCursorToPoint(disp, p);
+}
+
+static bool LookupKey(NSEvent* ev, wchar_t& ch, OVR::KeyCode& key, unsigned& mods)
+{
+ NSString* chars = [ev charactersIgnoringModifiers];
+ if ([chars length] == 0)
+ return false;
+ ch = [chars characterAtIndex:0];
+ mods = MapModifiers([ev modifierFlags]);
+
+ // check for Cmd+Latin Letter
+ NSString* modchars = [ev characters];
+ if ([modchars length])
+ {
+ wchar_t modch = [modchars characterAtIndex:0];
+ if (modch >= 'a' && modch <= 'z')
+ ch = modch;
+ }
+ key = MapToKeyCode(ch);
+ return true;
+}
+
+-(void) keyDown:(NSEvent*)ev
+{
+ OVR::KeyCode key;
+ unsigned mods;
+ wchar_t ch;
+ if (!LookupKey(ev, ch, key, mods))
+ return;
+ if (key == Key_Escape && _Platform->MMode == Mouse_Relative)
+ {
+ [self warpMouseToCenter];
+ CGAssociateMouseAndMouseCursorPosition(true);
+ [NSCursor unhide];
+ _Platform->MMode = Mouse_RelativeEscaped;
+ }
+ _App->OnKey(key, ch, true, mods);
+}
+-(void) keyUp:(NSEvent*)ev
+{
+ OVR::KeyCode key;
+ unsigned mods;
+ wchar_t ch;
+ if (LookupKey(ev, ch, key, mods))
+ _App->OnKey(key, ch, false, mods);
+}
+
+static const OVR::KeyCode ModifierKeys[] = {OVR::Key_None, OVR::Key_Shift, OVR::Key_Control, OVR::Key_Alt, OVR::Key_Meta};
+
+-(void)flagsChanged:(NSEvent *)ev
+{
+ unsigned long cmods = [ev modifierFlags];
+ if ((cmods & 0xffff0000) != _Modifiers)
+ {
+ uint32_t mods = MapModifiers(cmods);
+ for (int i = 1; i <= 4; i++)
+ {
+ unsigned long m = (1 << (16+i));
+ if ((cmods & m) != (_Modifiers & m))
+ {
+ if (cmods & m)
+ _App->OnKey(ModifierKeys[i], 0, true, mods);
+ else
+ _App->OnKey(ModifierKeys[i], 0, false, mods);
+ }
+ }
+ _Modifiers = cmods & 0xffff0000;
+ }
+}
+
+-(void)ProcessMouse:(NSEvent*)ev
+{
+ switch ([ev type])
+ {
+ case NSLeftMouseDragged:
+ case NSRightMouseDragged:
+ case NSOtherMouseDragged:
+ case NSMouseMoved:
+ {
+ if (_Platform->MMode == OVR::OvrPlatform::Mouse_Relative)
+ {
+ int dx = [ev deltaX];
+ int dy = [ev deltaY];
+
+ if (dx != 0 || dy != 0)
+ {
+ _App->OnMouseMove(dx, dy, Mod_MouseRelative|MapModifiers([ev modifierFlags]));
+ [self warpMouseToCenter];
+ }
+ }
+ else
+ {
+ NSPoint p = [ev locationInWindow];
+ _App->OnMouseMove(p.x, p.y, MapModifiers([ev modifierFlags]));
+ }
+ }
+ break;
+ case NSLeftMouseDown:
+ case NSRightMouseDown:
+ case NSOtherMouseDown:
+ break;
+ }
+}
+
+-(void) mouseMoved:(NSEvent*)ev
+{
+ [self ProcessMouse:ev];
+}
+-(void) mouseDragged:(NSEvent*)ev
+{
+ [self ProcessMouse:ev];
+}
+-(void) mouseDown:(NSEvent*)ev
+{
+ if (_Platform->MMode == Mouse_RelativeEscaped)
+ {
+ [self warpMouseToCenter];
+ CGAssociateMouseAndMouseCursorPosition(false);
+ [NSCursor hide];
+ _Platform->MMode = Mouse_Relative;
+ }
+}
+
+//-(void)
+
+-(id) initWithFrame:(NSRect)frameRect
+{
+ NSOpenGLPixelFormatAttribute attr[] =
+ {
+// NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
+// NSOpenGLPFAWindow,
+ NSOpenGLPFADoubleBuffer,
+ NSOpenGLPFADepthSize, 24,
+ nil
+ };
+
+ NSOpenGLPixelFormat *pf = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attr] autorelease];
+
+ self = [super initWithFrame:frameRect pixelFormat:pf];
+ GLint swap = 0;
+ [[self openGLContext] setValues:&swap forParameter:NSOpenGLCPSwapInterval];
+ //[self setWantsBestResolutionOpenGLSurface:YES];
+ return self;
+}
+
+-(void) reshape
+{
+ NSRect bounds = [self bounds];
+ _App->OnResize(bounds.size.width, bounds.size.height);
+
+ _Platform->Width = bounds.size.width;
+ _Platform->Height = bounds.size.height;
+
+ if (_Platform->GetRenderer())
+ _Platform->GetRenderer()->SetWindowSize(bounds.size.width, bounds.size.height);
+}
+
+-(BOOL)windowShouldClose:(id)sender
+{
+ if (_Platform)
+ _Platform->Exit(0);
+ else
+ exit(0);
+ return 1;
+}
+
+@end
+
+namespace OVR { namespace OvrPlatform { namespace OSX {
+
+PlatformCore::PlatformCore(Application* app, void* nsapp)
+ : OvrPlatform::PlatformCore(app), NsApp(nsapp), Win(NULL), View(NULL), Quit(0), MMode(Mouse_Normal)
+{
+ pGamepadManager = *new OSX::GamepadManager();
+}
+PlatformCore::~PlatformCore()
+{
+}
+
+void PlatformCore::Exit(int exitcode)
+{
+ OVRApp* nsApp = (OVRApp*)NsApp;
+ [nsApp stop:nil];
+}
+
+String PlatformCore::GetContentDirectory() const
+{
+ NSBundle* bundle = [NSBundle mainBundle];
+ if (bundle)
+ return String([[bundle bundlePath] UTF8String]) + "/Contents/Resources";
+ else
+ return ".";
+}
+
+
+void PlatformCore::SetMouseMode(MouseMode mm)
+{
+ if (mm == MMode)
+ return;
+
+ if (Win)
+ {
+ if (mm == Mouse_Relative)
+ {
+ [NSCursor hide];
+ [(OVRView*)View warpMouseToCenter];
+ CGAssociateMouseAndMouseCursorPosition(false);
+ }
+ else
+ {
+ if (MMode == Mouse_Relative)
+ {
+ CGAssociateMouseAndMouseCursorPosition(true);
+ [NSCursor unhide];
+ [(OVRView*)View warpMouseToCenter];
+ }
+ }
+ }
+ MMode = mm;
+}
+
+
+void PlatformCore::GetWindowSize(int* w, int* h) const
+{
+ *w = Width;
+ *h = Height;
+}
+
+void* PlatformCore::SetupWindow(int w, int h)
+{
+ NSRect winrect;
+ winrect.origin.x = 0;
+ winrect.origin.y = 1000;
+ winrect.size.width = w;
+ winrect.size.height = h;
+ NSWindow* win = [[NSWindow alloc] initWithContentRect:winrect styleMask:NSTitledWindowMask|NSClosableWindowMask backing:NSBackingStoreBuffered defer:NO];
+
+ OVRView* view = [[OVRView alloc] initWithFrame:winrect];
+ [view setPlatform:this];
+ [win setContentView:view];
+ [win setAcceptsMouseMovedEvents:YES];
+ [win setDelegate:view];
+ [view setApp:pApp];
+ Win = win;
+ View = view;
+ return (void*)[win windowNumber];
+}
+
+void PlatformCore::SetWindowTitle(const char* title)
+{
+ [((NSWindow*)Win) setTitle:[[NSString alloc] initWithBytes:title length:strlen(title) encoding:NSUTF8StringEncoding]];
+}
+
+void PlatformCore::ShowWindow(bool show)
+{
+ if (show)
+ [((NSWindow*)Win) makeKeyAndOrderFront:nil];
+ else
+ [((NSWindow*)Win) orderOut:nil];
+}
+
+void PlatformCore::DestroyWindow()
+{
+ [((NSWindow*)Win) close];
+ Win = NULL;
+}
+
+RenderDevice* PlatformCore::SetupGraphics(const SetupGraphicsDeviceSet& setupGraphicsDesc,
+ const char* type, const Render::RendererParams& rp)
+{
+ const SetupGraphicsDeviceSet* setupDesc = setupGraphicsDesc.PickSetupDevice(type);
+ OVR_ASSERT(setupDesc);
+
+ pRender = *setupDesc->pCreateDevice(rp, this);
+ if (pRender)
+ pRender->SetWindowSize(Width, Height);
+
+ return pRender.GetPtr();
+}
+
+int PlatformCore::GetDisplayCount()
+{
+ return (int)[[NSScreen screens] count];
+}
+
+Render::DisplayId PlatformCore::GetDisplay(int i)
+{
+ NSScreen* s = (NSScreen*)[[NSScreen screens] objectAtIndex:i];
+ return Render::DisplayId([OVRView displayFromScreen:s]);
+}
+
+bool PlatformCore::SetFullscreen(const Render::RendererParams& rp, int fullscreen)
+{
+ if (fullscreen == Render::Display_Window)
+ [(OVRView*)View exitFullScreenModeWithOptions:nil];
+ else
+ {
+ NSScreen* usescreen = [NSScreen mainScreen];
+ NSArray* screens = [NSScreen screens];
+ for (int i = 0; i < [screens count]; i++)
+ {
+ NSScreen* s = (NSScreen*)[screens objectAtIndex:i];
+ CGDirectDisplayID disp = [OVRView displayFromScreen:s];
+
+ if (disp == rp.Display.CgDisplayId)
+ usescreen = s;
+ }
+
+ [(OVRView*)View enterFullScreenMode:usescreen withOptions:nil];
+ [(NSWindow*)Win setInitialFirstResponder:(OVRView*)View];
+ [(NSWindow*)Win makeFirstResponder:(OVRView*)View];
+ }
+
+ if (pRender)
+ pRender->SetFullscreen((Render::DisplayMode)fullscreen);
+ return 1;
+}
+
+}}
+// GL
+namespace Render { namespace GL { namespace OSX {
+
+ovrRenderAPIConfig RenderDevice::Get_ovrRenderAPIConfig() const
+{
+ ovrRenderAPIConfig result = ovrRenderAPIConfig();
+ result.Header.API = ovrRenderAPI_OpenGL;
+ result.Header.RTSize = Sizei(WindowWidth, WindowHeight);
+ result.Header.Multisample = Params.Multisample;
+ return result;
+}
+
+Render::RenderDevice* RenderDevice::CreateDevice(const RendererParams& rp, void* oswnd)
+{
+ OvrPlatform::OSX::PlatformCore* PC = (OvrPlatform::OSX::PlatformCore*)oswnd;
+
+ OVRView* view = (OVRView*)PC->View;
+ NSOpenGLContext *context = [view openGLContext];
+ if (!context)
+ return NULL;
+
+ [context makeCurrentContext];
+ [((NSWindow*)PC->Win) makeKeyAndOrderFront:nil];
+
+ return new Render::GL::OSX::RenderDevice(rp, context);
+}
+
+void RenderDevice::Present(bool useVsync)
+{
+ NSOpenGLContext *context = (NSOpenGLContext*)Context;
+ [context flushBuffer];
+}
+
+void RenderDevice::Shutdown()
+{
+ Context = NULL;
+}
+
+bool RenderDevice::SetFullscreen(DisplayMode fullscreen)
+{
+ Params.Fullscreen = fullscreen;
+ return 1;
+}
+
+}}}}
+
+
+int main(int argc, char *argv[])
+{
+ NSApplication* nsapp = [OVRApp sharedApplication];
+ [nsapp run];
+ return 0;
+}
+
diff --git a/Samples/CommonSrc/Platform/OSX_PlatformObjc.h b/Samples/CommonSrc/Platform/OSX_PlatformObjc.h
new file mode 100644
index 0000000..967b5d9
--- /dev/null
+++ b/Samples/CommonSrc/Platform/OSX_PlatformObjc.h
@@ -0,0 +1,53 @@
+/***********************************************************************
+
+Filename : OSX_PlatformObjc.h
+Content :
+Created :
+Authors :
+
+Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************/
+
+#import <Cocoa/Cocoa.h>
+#import "OSX_Platform.h"
+#import "OSX_Gamepad.h"
+
+#import <CoreGraphics/CoreGraphics.h>
+#import <CoreGraphics/CGDirectDisplay.h>
+
+@interface OVRApp : NSApplication
+
+@property (assign) IBOutlet NSWindow* win;
+@property (assign) OVR::OvrPlatform::OSX::PlatformCore* Platform;
+@property (assign) OVR::OvrPlatform::Application* App;
+
+-(void) run;
+
+@end
+
+@interface OVRView : NSOpenGLView <NSWindowDelegate>
+
+@property (assign) OVR::OvrPlatform::OSX::PlatformCore* Platform;
+@property (assign) OVR::OvrPlatform::Application* App;
+@property unsigned long Modifiers;
+
+-(void)ProcessMouse:(NSEvent*)event;
+-(void)warpMouseToCenter;
+
++(CGDirectDisplayID) displayFromScreen:(NSScreen*)s;
+
+@end
+
diff --git a/Samples/CommonSrc/Platform/OSX_WavPlayer.cpp b/Samples/CommonSrc/Platform/OSX_WavPlayer.cpp
new file mode 100644
index 0000000..8b4c744
--- /dev/null
+++ b/Samples/CommonSrc/Platform/OSX_WavPlayer.cpp
@@ -0,0 +1,250 @@
+/************************************************************************************
+
+Filename : WavPlayer_OSX.cpp
+Content : An Apple OSX audio handler.
+Created : March 5, 2013
+Authors : Robotic Arm Software - Peter Hoff, Dan Goodman, Bryan Croteau
+
+Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#include "OSX_WavPlayer.h"
+
+namespace OVR { namespace OvrPlatform { namespace OSX {
+
+WavPlayer::WavPlayer(const char* fileName)
+{
+ FileName = fileName;
+}
+
+bool WavPlayer::isDataChunk(unsigned char* buffer, int index)
+{
+ unsigned char a = buffer[index];
+ unsigned char b = buffer[index + 1];
+ unsigned char c = buffer[index + 2];
+ unsigned char d = buffer[index + 3];
+ return (a == 'D' || a == 'd') && (b == 'A' || b == 'a') &&
+ (c == 'T' || c == 't') && (d == 'A' || d == 'a');
+}
+
+int WavPlayer::getWord(unsigned char* buffer, int index)
+{
+ unsigned char a = buffer[index];
+ unsigned char b = buffer[index + 1];
+ unsigned char c = buffer[index + 2];
+ unsigned char d = buffer[index + 3];
+ int result = 0;
+ result |= a;
+ result |= b << 8;
+ result |= c << 16;
+ result |= d << 24;
+ return result;
+}
+
+short WavPlayer::getHalf(unsigned char* buffer, int index)
+{
+ unsigned char a = buffer[index];
+ unsigned char b = buffer[index + 1];
+ short result = 0;
+ result |= a;
+ result |= b << 8;
+ return result;
+}
+
+void *WavPlayer::LoadPCM(const char *filename, unsigned long *len)
+{
+ FILE *file;
+ struct stat s;
+ void *pcm;
+
+ if(stat(filename, &s))
+ {
+ return NULL;
+ }
+ *len = s.st_size;
+ pcm = (void *) malloc(s.st_size);
+ if(!pcm)
+ {
+ return NULL;
+ }
+ file = fopen(filename, "rb");
+ if(!file)
+ {
+ free(pcm);
+ return NULL;
+ }
+ fread(pcm, s.st_size, 1, file);
+ fclose(file);
+ return pcm;
+}
+
+int WavPlayer::PlayBuffer(void *pcmbuffer, unsigned long len)
+{
+ AQCallbackStruct aqc;
+ UInt32 err, bufferSize;
+ int i;
+
+ aqc.DataFormat.mSampleRate = SampleRate;
+ aqc.DataFormat.mFormatID = kAudioFormatLinearPCM;
+ if(BitsPerSample == 16)
+ {
+ aqc.DataFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger
+ | kAudioFormatFlagIsPacked;
+ }
+ aqc.DataFormat.mBytesPerPacket = NumChannels * (BitsPerSample / 8);
+ aqc.DataFormat.mFramesPerPacket = 1;
+ aqc.DataFormat.mBytesPerFrame = NumChannels * (BitsPerSample / 8);
+ aqc.DataFormat.mChannelsPerFrame = NumChannels;
+ aqc.DataFormat.mBitsPerChannel = BitsPerSample;
+ aqc.FrameCount = SampleRate / 60;
+ aqc.SampleLen = (UInt32)(len);
+ aqc.PlayPtr = 0;
+ aqc.PCMBuffer = static_cast<unsigned char*>(pcmbuffer);
+
+ err = AudioQueueNewOutput(&aqc.DataFormat,
+ aqBufferCallback,
+ &aqc,
+ NULL,
+ kCFRunLoopCommonModes,
+ 0,
+ &aqc.Queue);
+ if(err)
+ {
+ return err;
+ }
+
+ aqc.FrameCount = SampleRate / 60;
+ bufferSize = aqc.FrameCount * aqc.DataFormat.mBytesPerPacket;
+
+ for(i = 0; i < AUDIO_BUFFERS; i++)
+ {
+ err = AudioQueueAllocateBuffer(aqc.Queue, bufferSize,
+ &aqc.Buffers[i]);
+ if(err)
+ {
+ return err;
+ }
+ aqBufferCallback(&aqc, aqc.Queue, aqc.Buffers[i]);
+ }
+
+ err = AudioQueueStart(aqc.Queue, NULL);
+ if(err)
+ {
+ return err;
+ }
+
+ while(true)
+ {
+ }
+ sleep(1);
+ return 0;
+}
+
+void WavPlayer::aqBufferCallback(void *in, AudioQueueRef inQ, AudioQueueBufferRef outQB)
+{
+ AQCallbackStruct *aqc;
+ unsigned char *coreAudioBuffer;
+
+ aqc = (AQCallbackStruct *) in;
+ coreAudioBuffer = (unsigned char*) outQB->mAudioData;
+
+ printf("Sync: %u / %u\n", aqc->PlayPtr, aqc->SampleLen);
+
+ if(aqc->FrameCount > 0)
+ {
+ outQB->mAudioDataByteSize = aqc->DataFormat.mBytesPerFrame * aqc->FrameCount;
+ for(int i = 0; i < aqc->FrameCount * aqc->DataFormat.mBytesPerFrame; i++)
+ {
+ if(aqc->PlayPtr > aqc->SampleLen)
+ {
+ aqc->PlayPtr = 0;
+ i = 0;
+ }
+ coreAudioBuffer[i] = aqc->PCMBuffer[aqc->PlayPtr];
+ aqc->PlayPtr++;
+ }
+ AudioQueueEnqueueBuffer(inQ, outQB, 0, NULL);
+ }
+}
+
+int WavPlayer::PlayAudio()
+{
+ unsigned long len;
+ void *pcmbuffer;
+ int ret;
+
+ pcmbuffer = LoadPCM(FileName, &len);
+ if(!pcmbuffer)
+ {
+ fprintf(stderr, "%s: %s\n", FileName, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+ unsigned char* bytes = (unsigned char*)pcmbuffer;
+ int index = 0;
+
+ // 'RIFF'
+ getWord(bytes, index);
+ index += 4;
+ // int Length
+ getWord(bytes, index);
+ index += 4;
+ // 'WAVE'
+ getWord(bytes, index);
+ index += 4;
+ // 'fmt '
+ getWord(bytes, index);
+ index += 4;
+
+ // int Format Length
+ int fmtLen = getWord(bytes, index);
+ index += 4;
+ AudioFormat = getHalf(bytes, index);
+ index += 2;
+ NumChannels = getHalf(bytes, index);
+ index += 2;
+ SampleRate = getWord(bytes, index);
+ index += 4;
+ ByteRate = getWord(bytes, index);
+ index += 4;
+ BlockAlign = getHalf(bytes, index);
+ index += 2;
+ BitsPerSample = getHalf(bytes, index);
+ index += 2;
+ index += fmtLen - 16;
+ while(!isDataChunk(bytes, index))
+ {
+ // Any Chunk
+ getWord(bytes, index);
+ index += 4;
+ // Any Chunk Length
+ int anyChunkLen = getWord(bytes, index);
+ index += 4 + anyChunkLen;
+ }
+ // 'data'
+ getWord(bytes, index);
+ index += 4;
+ // int Data Length
+ unsigned long dataLen = getWord(bytes, index);
+ index += 4;
+ unsigned char* target = &bytes[index];
+
+ ret = PlayBuffer((void *)target, dataLen);
+ free(pcmbuffer);
+ return ret;
+}
+
+}}}
diff --git a/Samples/CommonSrc/Platform/OSX_WavPlayer.h b/Samples/CommonSrc/Platform/OSX_WavPlayer.h
new file mode 100644
index 0000000..c6f2571
--- /dev/null
+++ b/Samples/CommonSrc/Platform/OSX_WavPlayer.h
@@ -0,0 +1,72 @@
+/************************************************************************************
+
+Filename : WavPlayer_OSX.h
+Content : An Apple OSX audio handler.
+Created : March 5, 2013
+Authors : Robotic Arm Software - Peter Hoff, Dan Goodman, Bryan Croteau
+
+Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#ifndef OVR_WavPlayer_h
+#define OVR_WavPlayer_h
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <AudioToolbox/AudioQueue.h>
+
+#define AUDIO_BUFFERS 4
+
+namespace OVR { namespace OvrPlatform { namespace OSX {
+
+typedef struct AQCallbackStruct
+{
+ AudioQueueRef Queue;
+ UInt32 FrameCount;
+ AudioQueueBufferRef Buffers[AUDIO_BUFFERS];
+ AudioStreamBasicDescription DataFormat;
+ UInt32 PlayPtr;
+ UInt32 SampleLen;
+ unsigned char* PCMBuffer;
+} AQCallbackStruct;
+
+class WavPlayer
+{
+public:
+ WavPlayer(const char* fileName);
+ int PlayAudio();
+private:
+ bool isDataChunk(unsigned char* buffer, int index);
+ int getWord(unsigned char* buffer, int index);
+ short getHalf(unsigned char* buffer, int index);
+ void *LoadPCM(const char *filename, unsigned long *len);
+ int PlayBuffer(void *pcm, unsigned long len);
+ static void aqBufferCallback(void *in, AudioQueueRef inQ, AudioQueueBufferRef outQB);
+
+ short AudioFormat;
+ short NumChannels;
+ int SampleRate;
+ int ByteRate;
+ short BlockAlign;
+ short BitsPerSample;
+ const char* FileName;
+};
+
+}}}
+
+#endif
diff --git a/Samples/LibOVR_With_Samples.xcworkspace/contents.xcworkspacedata b/Samples/LibOVR_With_Samples.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..76b223a
--- /dev/null
+++ b/Samples/LibOVR_With_Samples.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "group:OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:../LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/LibOVR.xcscheme b/Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/LibOVR.xcscheme
new file mode 100644
index 0000000..c9905f7
--- /dev/null
+++ b/Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/LibOVR.xcscheme
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0510"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "E82D4CD21906FE640070CB3F"
+ BuildableName = "libovr.a"
+ BlueprintName = "LibOVR"
+ ReferencedContainer = "container:../LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/OculusWorldDemo.xcscheme b/Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/OculusWorldDemo.xcscheme
new file mode 100644
index 0000000..f99edef
--- /dev/null
+++ b/Samples/LibOVR_With_Samples.xcworkspace/xcshareddata/xcschemes/OculusWorldDemo.xcscheme
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0510"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "E8CC57C61908266300EEEC84"
+ BuildableName = "OculusWorldDemo.app"
+ BlueprintName = "OculusWorldDemo"
+ ReferencedContainer = "container:OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "E8CC57C61908266300EEEC84"
+ BuildableName = "OculusWorldDemo.app"
+ BlueprintName = "OculusWorldDemo"
+ ReferencedContainer = "container:OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "E8CC57C61908266300EEEC84"
+ BuildableName = "OculusWorldDemo.app"
+ BlueprintName = "OculusWorldDemo"
+ ReferencedContainer = "container:OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "E8CC57C61908266300EEEC84"
+ BuildableName = "OculusWorldDemo.app"
+ BlueprintName = "OculusWorldDemo"
+ ReferencedContainer = "container:OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo-Info.plist b/Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo-Info.plist
new file mode 100644
index 0000000..2501d15
--- /dev/null
+++ b/Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo-Info.plist
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>Oculus</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.oculusvr.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2014 Oculus VR Inc. All rights reserved.</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj/project.pbxproj b/Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..c9d2e6b
--- /dev/null
+++ b/Samples/OculusWorldDemo/Projects/Mac/Xcode/OculusWorldDemo.xcodeproj/project.pbxproj
@@ -0,0 +1,460 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ E83DE6F419197F6A00EC97E1 /* OptionMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E83DE6F019197F6A00EC97E1 /* OptionMenu.cpp */; };
+ E83DE6F519197F6A00EC97E1 /* RenderProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E83DE6F219197F6A00EC97E1 /* RenderProfiler.cpp */; };
+ E879CFE9190866D1008CE996 /* Assets in Resources */ = {isa = PBXBuildFile; fileRef = E879CFE8190866D1008CE996 /* Assets */; };
+ E8859041192DBE2E00D93D73 /* ../../../../Oculus.icns in Resources */ = {isa = PBXBuildFile; fileRef = E8859040192DBE2E00D93D73 /* ../../../../Oculus.icns */; };
+ E8CC57CB1908266300EEEC84 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8CC57CA1908266300EEEC84 /* Cocoa.framework */; };
+ E8E0A56619085ED00077EB8E /* OSX_Gamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A54219085ED00077EB8E /* OSX_Gamepad.cpp */; };
+ E8E0A56719085ED00077EB8E /* OSX_Platform.mm in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A54519085ED00077EB8E /* OSX_Platform.mm */; };
+ E8E0A56819085ED00077EB8E /* OSX_WavPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A54719085ED00077EB8E /* OSX_WavPlayer.cpp */; };
+ E8E0A56919085ED00077EB8E /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A54919085ED00077EB8E /* Platform.cpp */; };
+ E8E0A56F19085ED00077EB8E /* Render_Device.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A55719085ED00077EB8E /* Render_Device.cpp */; };
+ E8E0A57019085ED00077EB8E /* Render_GL_Device.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A55B19085ED00077EB8E /* Render_GL_Device.cpp */; };
+ E8E0A57219085ED00077EB8E /* Render_LoadTextureDDS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A55F19085ED00077EB8E /* Render_LoadTextureDDS.cpp */; };
+ E8E0A57319085ED00077EB8E /* Render_LoadTextureTGA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A56019085ED00077EB8E /* Render_LoadTextureTGA.cpp */; };
+ E8E0A57419085ED00077EB8E /* Render_XmlSceneLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A56119085ED00077EB8E /* Render_XmlSceneLoader.cpp */; };
+ E8E0A57619085FC60077EB8E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8E0A57519085FC60077EB8E /* AudioToolbox.framework */; };
+ E8E0A57819085FE50077EB8E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8E0A57719085FE50077EB8E /* OpenGL.framework */; };
+ E8E0A57A190860110077EB8E /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8E0A579190860110077EB8E /* IOKit.framework */; };
+ E8E0A584190861120077EB8E /* OculusWorldDemo_Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A57B190861110077EB8E /* OculusWorldDemo_Scene.cpp */; };
+ E8E0A585190861120077EB8E /* OculusWorldDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A57C190861110077EB8E /* OculusWorldDemo.cpp */; };
+ E8E0A587190861120077EB8E /* Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A580190861110077EB8E /* Player.cpp */; };
+ E8E0A58B190861220077EB8E /* tinyxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8E0A589190861220077EB8E /* tinyxml2.cpp */; };
+ E8E0A58D1908619A0077EB8E /* libovr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E8E0A58C1908619A0077EB8E /* libovr.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ E83DE6F019197F6A00EC97E1 /* OptionMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionMenu.cpp; path = ../../../../CommonSrc/Util/OptionMenu.cpp; sourceTree = "<group>"; };
+ E83DE6F119197F6A00EC97E1 /* OptionMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionMenu.h; path = ../../../../CommonSrc/Util/OptionMenu.h; sourceTree = "<group>"; };
+ E83DE6F219197F6A00EC97E1 /* RenderProfiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderProfiler.cpp; path = ../../../../CommonSrc/Util/RenderProfiler.cpp; sourceTree = "<group>"; };
+ E83DE6F319197F6A00EC97E1 /* RenderProfiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderProfiler.h; path = ../../../../CommonSrc/Util/RenderProfiler.h; sourceTree = "<group>"; };
+ E879CFE8190866D1008CE996 /* Assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Assets; path = ../../../Assets; sourceTree = "<group>"; };
+ E8859040192DBE2E00D93D73 /* ../../../../Oculus.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = ../../../../Oculus.icns; sourceTree = "<group>"; };
+ E8CC57C71908266300EEEC84 /* OculusWorldDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OculusWorldDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ E8CC57CA1908266300EEEC84 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ E8CC57CD1908266300EEEC84 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ E8CC57CE1908266300EEEC84 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+ E8CC57CF1908266300EEEC84 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ E8E0A53D19085ED00077EB8E /* Gamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Gamepad.h; sourceTree = "<group>"; };
+ E8E0A54219085ED00077EB8E /* OSX_Gamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OSX_Gamepad.cpp; sourceTree = "<group>"; };
+ E8E0A54319085ED00077EB8E /* OSX_Gamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSX_Gamepad.h; sourceTree = "<group>"; };
+ E8E0A54419085ED00077EB8E /* OSX_Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSX_Platform.h; sourceTree = "<group>"; };
+ E8E0A54519085ED00077EB8E /* OSX_Platform.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OSX_Platform.mm; sourceTree = "<group>"; };
+ E8E0A54619085ED00077EB8E /* OSX_PlatformObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSX_PlatformObjc.h; sourceTree = "<group>"; };
+ E8E0A54719085ED00077EB8E /* OSX_WavPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OSX_WavPlayer.cpp; sourceTree = "<group>"; };
+ E8E0A54819085ED00077EB8E /* OSX_WavPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSX_WavPlayer.h; sourceTree = "<group>"; };
+ E8E0A54919085ED00077EB8E /* Platform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Platform.cpp; sourceTree = "<group>"; };
+ E8E0A54A19085ED00077EB8E /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Platform.h; sourceTree = "<group>"; };
+ E8E0A54B19085ED00077EB8E /* Platform_Default.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Platform_Default.h; sourceTree = "<group>"; };
+ E8E0A55719085ED00077EB8E /* Render_Device.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Render_Device.cpp; sourceTree = "<group>"; };
+ E8E0A55819085ED00077EB8E /* Render_Device.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Render_Device.h; sourceTree = "<group>"; };
+ E8E0A55919085ED00077EB8E /* Render_Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Render_Font.h; sourceTree = "<group>"; };
+ E8E0A55A19085ED00077EB8E /* Render_FontEmbed_DejaVu48.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Render_FontEmbed_DejaVu48.h; sourceTree = "<group>"; };
+ E8E0A55B19085ED00077EB8E /* Render_GL_Device.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Render_GL_Device.cpp; sourceTree = "<group>"; };
+ E8E0A55C19085ED00077EB8E /* Render_GL_Device.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Render_GL_Device.h; sourceTree = "<group>"; };
+ E8E0A55F19085ED00077EB8E /* Render_LoadTextureDDS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Render_LoadTextureDDS.cpp; sourceTree = "<group>"; };
+ E8E0A56019085ED00077EB8E /* Render_LoadTextureTGA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Render_LoadTextureTGA.cpp; sourceTree = "<group>"; };
+ E8E0A56119085ED00077EB8E /* Render_XmlSceneLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Render_XmlSceneLoader.cpp; sourceTree = "<group>"; };
+ E8E0A56219085ED00077EB8E /* Render_XmlSceneLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Render_XmlSceneLoader.h; sourceTree = "<group>"; };
+ E8E0A57519085FC60077EB8E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ E8E0A57719085FE50077EB8E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
+ E8E0A579190860110077EB8E /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
+ E8E0A57B190861110077EB8E /* OculusWorldDemo_Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OculusWorldDemo_Scene.cpp; path = ../../../OculusWorldDemo_Scene.cpp; sourceTree = "<group>"; };
+ E8E0A57C190861110077EB8E /* OculusWorldDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OculusWorldDemo.cpp; path = ../../../OculusWorldDemo.cpp; sourceTree = "<group>"; };
+ E8E0A57D190861110077EB8E /* OculusWorldDemo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OculusWorldDemo.h; path = ../../../OculusWorldDemo.h; sourceTree = "<group>"; };
+ E8E0A580190861110077EB8E /* Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../../../Player.cpp; sourceTree = "<group>"; };
+ E8E0A581190861110077EB8E /* Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../../../Player.h; sourceTree = "<group>"; };
+ E8E0A589190861220077EB8E /* tinyxml2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tinyxml2.cpp; path = ../../../../../3rdParty/TinyXml/tinyxml2.cpp; sourceTree = "<group>"; };
+ E8E0A58A190861220077EB8E /* tinyxml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tinyxml2.h; path = ../../../../../3rdParty/TinyXml/tinyxml2.h; sourceTree = "<group>"; };
+ E8E0A58C1908619A0077EB8E /* libovr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libovr.a; path = SRCROOT/../../../Lib/Mac/Xcode/CONFIGURATION/libovr.a; sourceTree = "<absolute>"; };
+ E8E0A58E190865DA0077EB8E /* OculusWorldDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "OculusWorldDemo-Info.plist"; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ E8CC57C41908266300EEEC84 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E8E0A58D1908619A0077EB8E /* libovr.a in Frameworks */,
+ E8E0A57A190860110077EB8E /* IOKit.framework in Frameworks */,
+ E8E0A57819085FE50077EB8E /* OpenGL.framework in Frameworks */,
+ E8E0A57619085FC60077EB8E /* AudioToolbox.framework in Frameworks */,
+ E8CC57CB1908266300EEEC84 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ E83DE6F619197F6F00EC97E1 /* Util */ = {
+ isa = PBXGroup;
+ children = (
+ E83DE6F019197F6A00EC97E1 /* OptionMenu.cpp */,
+ E83DE6F119197F6A00EC97E1 /* OptionMenu.h */,
+ E83DE6F219197F6A00EC97E1 /* RenderProfiler.cpp */,
+ E83DE6F319197F6A00EC97E1 /* RenderProfiler.h */,
+ );
+ name = Util;
+ sourceTree = "<group>";
+ };
+ E8CC57BE1908266300EEEC84 = {
+ isa = PBXGroup;
+ children = (
+ E8E0A589190861220077EB8E /* tinyxml2.cpp */,
+ E8E0A58A190861220077EB8E /* tinyxml2.h */,
+ E8E0A57B190861110077EB8E /* OculusWorldDemo_Scene.cpp */,
+ E8E0A57C190861110077EB8E /* OculusWorldDemo.cpp */,
+ E8E0A57D190861110077EB8E /* OculusWorldDemo.h */,
+ E8E0A580190861110077EB8E /* Player.cpp */,
+ E8E0A581190861110077EB8E /* Player.h */,
+ E8859040192DBE2E00D93D73 /* ../../../../Oculus.icns */,
+ E879CFE8190866D1008CE996 /* Assets */,
+ E8E0A53919085E570077EB8E /* CommonSrc */,
+ E8CC57D11908266300EEEC84 /* Supporting Files */,
+ E8CC57C91908266300EEEC84 /* Frameworks */,
+ E8CC57C81908266300EEEC84 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ E8CC57C81908266300EEEC84 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ E8CC57C71908266300EEEC84 /* OculusWorldDemo.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ E8CC57C91908266300EEEC84 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ E8E0A58C1908619A0077EB8E /* libovr.a */,
+ E8E0A579190860110077EB8E /* IOKit.framework */,
+ E8E0A57719085FE50077EB8E /* OpenGL.framework */,
+ E8E0A57519085FC60077EB8E /* AudioToolbox.framework */,
+ E8CC57CA1908266300EEEC84 /* Cocoa.framework */,
+ E8CC57CC1908266300EEEC84 /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ E8CC57CC1908266300EEEC84 /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ E8CC57CD1908266300EEEC84 /* AppKit.framework */,
+ E8CC57CE1908266300EEEC84 /* CoreData.framework */,
+ E8CC57CF1908266300EEEC84 /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ E8CC57D11908266300EEEC84 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ E8E0A58E190865DA0077EB8E /* OculusWorldDemo-Info.plist */,
+ );
+ name = "Supporting Files";
+ path = OculusWorldDemo;
+ sourceTree = "<group>";
+ };
+ E8E0A53919085E570077EB8E /* CommonSrc */ = {
+ isa = PBXGroup;
+ children = (
+ E83DE6F619197F6F00EC97E1 /* Util */,
+ E8E0A53A19085ED00077EB8E /* Platform */,
+ E8E0A55019085ED00077EB8E /* Render */,
+ );
+ name = CommonSrc;
+ sourceTree = "<group>";
+ };
+ E8E0A53A19085ED00077EB8E /* Platform */ = {
+ isa = PBXGroup;
+ children = (
+ E8E0A53D19085ED00077EB8E /* Gamepad.h */,
+ E8E0A54219085ED00077EB8E /* OSX_Gamepad.cpp */,
+ E8E0A54319085ED00077EB8E /* OSX_Gamepad.h */,
+ E8E0A54419085ED00077EB8E /* OSX_Platform.h */,
+ E8E0A54519085ED00077EB8E /* OSX_Platform.mm */,
+ E8E0A54619085ED00077EB8E /* OSX_PlatformObjc.h */,
+ E8E0A54719085ED00077EB8E /* OSX_WavPlayer.cpp */,
+ E8E0A54819085ED00077EB8E /* OSX_WavPlayer.h */,
+ E8E0A54919085ED00077EB8E /* Platform.cpp */,
+ E8E0A54A19085ED00077EB8E /* Platform.h */,
+ E8E0A54B19085ED00077EB8E /* Platform_Default.h */,
+ );
+ name = Platform;
+ path = ../../../../CommonSrc/Platform;
+ sourceTree = "<group>";
+ };
+ E8E0A55019085ED00077EB8E /* Render */ = {
+ isa = PBXGroup;
+ children = (
+ E8E0A55719085ED00077EB8E /* Render_Device.cpp */,
+ E8E0A55819085ED00077EB8E /* Render_Device.h */,
+ E8E0A55919085ED00077EB8E /* Render_Font.h */,
+ E8E0A55A19085ED00077EB8E /* Render_FontEmbed_DejaVu48.h */,
+ E8E0A55B19085ED00077EB8E /* Render_GL_Device.cpp */,
+ E8E0A55C19085ED00077EB8E /* Render_GL_Device.h */,
+ E8E0A55F19085ED00077EB8E /* Render_LoadTextureDDS.cpp */,
+ E8E0A56019085ED00077EB8E /* Render_LoadTextureTGA.cpp */,
+ E8E0A56119085ED00077EB8E /* Render_XmlSceneLoader.cpp */,
+ E8E0A56219085ED00077EB8E /* Render_XmlSceneLoader.h */,
+ );
+ name = Render;
+ path = ../../../../CommonSrc/Render;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ E8CC57C61908266300EEEC84 /* OculusWorldDemo */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = E8CC57F81908266300EEEC84 /* Build configuration list for PBXNativeTarget "OculusWorldDemo" */;
+ buildPhases = (
+ E8CC57C31908266300EEEC84 /* Sources */,
+ E8CC57C41908266300EEEC84 /* Frameworks */,
+ E8CC57C51908266300EEEC84 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = OculusWorldDemo;
+ productName = OculusWorldDemo;
+ productReference = E8CC57C71908266300EEEC84 /* OculusWorldDemo.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ E8CC57BF1908266300EEEC84 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0510;
+ ORGANIZATIONNAME = "Oculus VR Inc.";
+ };
+ buildConfigurationList = E8CC57C21908266300EEEC84 /* Build configuration list for PBXProject "OculusWorldDemo" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = E8CC57BE1908266300EEEC84;
+ productRefGroup = E8CC57C81908266300EEEC84 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ E8CC57C61908266300EEEC84 /* OculusWorldDemo */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ E8CC57C51908266300EEEC84 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E879CFE9190866D1008CE996 /* Assets in Resources */,
+ E8859041192DBE2E00D93D73 /* ../../../../Oculus.icns in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ E8CC57C31908266300EEEC84 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E8E0A57019085ED00077EB8E /* Render_GL_Device.cpp in Sources */,
+ E8E0A585190861120077EB8E /* OculusWorldDemo.cpp in Sources */,
+ E8E0A584190861120077EB8E /* OculusWorldDemo_Scene.cpp in Sources */,
+ E83DE6F419197F6A00EC97E1 /* OptionMenu.cpp in Sources */,
+ E8E0A56919085ED00077EB8E /* Platform.cpp in Sources */,
+ E8E0A56619085ED00077EB8E /* OSX_Gamepad.cpp in Sources */,
+ E8E0A57419085ED00077EB8E /* Render_XmlSceneLoader.cpp in Sources */,
+ E8E0A57219085ED00077EB8E /* Render_LoadTextureDDS.cpp in Sources */,
+ E8E0A58B190861220077EB8E /* tinyxml2.cpp in Sources */,
+ E8E0A587190861120077EB8E /* Player.cpp in Sources */,
+ E8E0A56819085ED00077EB8E /* OSX_WavPlayer.cpp in Sources */,
+ E8E0A56F19085ED00077EB8E /* Render_Device.cpp in Sources */,
+ E8E0A57319085ED00077EB8E /* Render_LoadTextureTGA.cpp in Sources */,
+ E8E0A56719085ED00077EB8E /* OSX_Platform.mm in Sources */,
+ E83DE6F519197F6A00EC97E1 /* RenderProfiler.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ E8CC57F61908266300EEEC84 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ E8CC57F71908266300EEEC84 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ E8CC57F91908266300EEEC84 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = NO;
+ COMBINE_HIDPI_IMAGES = YES;
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREPROCESSOR_DEFINITIONS = OVR_BUILD_DEBUG;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ "$(SRCROOT)/../../../../../LibOVR/Src/",
+ "$(SRCROOT)/../../../../../LibOVR/Include/",
+ "$(SRCROOT)/../../../../../3rdParty/TinyXml/",
+ );
+ INFOPLIST_FILE = "OculusWorldDemo-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(SRCROOT)/../../../../../LibOVR/Lib/Mac/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ OBJROOT = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_LDFLAGS = "";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SYMROOT = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ E8CC57FA1908266300EEEC84 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = NO;
+ COMBINE_HIDPI_IMAGES = YES;
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ "$(SRCROOT)/../../../../../LibOVR/Src/",
+ "$(SRCROOT)/../../../../../LibOVR/Include/",
+ "$(SRCROOT)/../../../../../3rdParty/TinyXml/",
+ );
+ INFOPLIST_FILE = "OculusWorldDemo-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(SRCROOT)/../../../../../LibOVR/Lib/Mac/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ OBJROOT = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_LDFLAGS = "";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SYMROOT = "$(SRCROOT)/../../../Bin/Mac/$(CONFIGURATION)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ E8CC57C21908266300EEEC84 /* Build configuration list for PBXProject "OculusWorldDemo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E8CC57F61908266300EEEC84 /* Debug */,
+ E8CC57F71908266300EEEC84 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ E8CC57F81908266300EEEC84 /* Build configuration list for PBXNativeTarget "OculusWorldDemo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E8CC57F91908266300EEEC84 /* Debug */,
+ E8CC57FA1908266300EEEC84 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = E8CC57BF1908266300EEEC84 /* Project object */;
+}