diff options
author | Brad Davis <[email protected]> | 2014-01-10 18:02:40 -0800 |
---|---|---|
committer | Brad Davis <[email protected]> | 2014-01-10 18:02:40 -0800 |
commit | f28388ff2af14b56ef2d973b2f4f9da021716d4c (patch) | |
tree | dcfcb263eb87741878b6b323bfa50e1dcdc0ba1b /LibOVR | |
parent | cdc395e194dcc287ec3749908b8e77b2499dd675 (diff) |
Updating to 0.2.5c
Diffstat (limited to 'LibOVR')
94 files changed, 1479 insertions, 324 deletions
diff --git a/LibOVR/Include/OVR.h b/LibOVR/Include/OVR.h index c832338..1efea08 100644 --- a/LibOVR/Include/OVR.h +++ b/LibOVR/Include/OVR.h @@ -4,12 +4,23 @@ Filename : OVR.h Content : This contains references to all OVR-specific headers in Src folder. Should be generated automatically based on PublicHeader tags. -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_h diff --git a/LibOVR/Include/OVRVersion.h b/LibOVR/Include/OVRVersion.h index a1c7ea6..20f2a88 100644 --- a/LibOVR/Include/OVRVersion.h +++ b/LibOVR/Include/OVRVersion.h @@ -3,12 +3,23 @@ Filename : OVRVersion.h Content : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_VERSION_H diff --git a/LibOVR/Src/Kernel/OVR_Alg.cpp b/LibOVR/Src/Kernel/OVR_Alg.cpp index 13b5595..0c564ab 100644 --- a/LibOVR/Src/Kernel/OVR_Alg.cpp +++ b/LibOVR/Src/Kernel/OVR_Alg.cpp @@ -5,12 +5,23 @@ Content : Static lookup tables for Alg functions Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Types.h" diff --git a/LibOVR/Src/Kernel/OVR_Alg.h b/LibOVR/Src/Kernel/OVR_Alg.h index 9e234c5..51261d3 100644 --- a/LibOVR/Src/Kernel/OVR_Alg.h +++ b/LibOVR/Src/Kernel/OVR_Alg.h @@ -6,12 +6,23 @@ Content : Simple general purpose algorithms: Sort, Binary Search, etc. Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Alg_h @@ -640,13 +651,13 @@ inline UByte UpperBit(UPInt val) if (val & 0xFFFF0000) { - return (val & 0xFF000000) ? + return static_cast<UByte>((val & 0xFF000000) ? UpperBitTable[(val >> 24) ] + 24: - UpperBitTable[(val >> 16) & 0xFF] + 16; + UpperBitTable[(val >> 16) & 0xFF] + 16); } - return (val & 0xFF00) ? + return static_cast<UByte>((val & 0xFF00) ? UpperBitTable[(val >> 8) & 0xFF] + 8: - UpperBitTable[(val ) & 0xFF]; + UpperBitTable[(val ) & 0xFF]); #else @@ -685,13 +696,13 @@ inline UByte LowerBit(UPInt val) if (val & 0xFFFF) { - return (val & 0xFF) ? + return static_cast<UByte>( (val & 0xFF) ? LowerBitTable[ val & 0xFF]: - LowerBitTable[(val >> 8) & 0xFF] + 8; + LowerBitTable[(val >> 8) & 0xFF] + 8 ); } - return (val & 0xFF0000) ? + return static_cast<UByte>( (val & 0xFF0000) ? LowerBitTable[(val >> 16) & 0xFF] + 16: - LowerBitTable[(val >> 24) & 0xFF] + 24; + LowerBitTable[(val >> 24) & 0xFF] + 24 ); #else @@ -802,7 +813,7 @@ namespace ByteUtil { // Swap the byte order of primitive types inline UByte SwapOrder(UByte v) { return v; } inline SByte SwapOrder(SByte v) { return v; } - inline UInt16 SwapOrder(UInt16 v) { return UInt16(v>>8)|UInt16(v<<8); } + inline UInt16 SwapOrder(UInt16 v) { return static_cast<UInt16>( UInt16(v>>8)|UInt16(v<<8) ); } inline SInt16 SwapOrder(SInt16 v) { return SInt16((UInt16(v)>>8)|(v<<8)); } inline UInt32 SwapOrder(UInt32 v) { return (v>>24)|((v&0x00FF0000)>>8)|((v&0x0000FF00)<<8)|(v<<24); } inline SInt32 SwapOrder(SInt32 p) { return (SInt32)SwapOrder(UInt32(p)); } diff --git a/LibOVR/Src/Kernel/OVR_Allocator.cpp b/LibOVR/Src/Kernel/OVR_Allocator.cpp index ec9a877..51eebba 100644 --- a/LibOVR/Src/Kernel/OVR_Allocator.cpp +++ b/LibOVR/Src/Kernel/OVR_Allocator.cpp @@ -5,12 +5,23 @@ Content : Installable memory allocator implementation Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Allocator.h" diff --git a/LibOVR/Src/Kernel/OVR_Allocator.h b/LibOVR/Src/Kernel/OVR_Allocator.h index 6625206..b2e0472 100644 --- a/LibOVR/Src/Kernel/OVR_Allocator.h +++ b/LibOVR/Src/Kernel/OVR_Allocator.h @@ -6,12 +6,23 @@ Content : Installable memory allocator Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Allocator_h diff --git a/LibOVR/Src/Kernel/OVR_Array.h b/LibOVR/Src/Kernel/OVR_Array.h index 7877fb9..552ddcc 100644 --- a/LibOVR/Src/Kernel/OVR_Array.h +++ b/LibOVR/Src/Kernel/OVR_Array.h @@ -6,12 +6,23 @@ Content : Template implementation for Array Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Array_h diff --git a/LibOVR/Src/Kernel/OVR_Atomic.cpp b/LibOVR/Src/Kernel/OVR_Atomic.cpp index d882758..1c0efc2 100644 --- a/LibOVR/Src/Kernel/OVR_Atomic.cpp +++ b/LibOVR/Src/Kernel/OVR_Atomic.cpp @@ -7,12 +7,23 @@ Content : Contains atomic operations and inline fastest locking Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Atomic.h" diff --git a/LibOVR/Src/Kernel/OVR_Atomic.h b/LibOVR/Src/Kernel/OVR_Atomic.h index 6e04b0f..b539ccd 100644 --- a/LibOVR/Src/Kernel/OVR_Atomic.h +++ b/LibOVR/Src/Kernel/OVR_Atomic.h @@ -8,12 +8,23 @@ Content : Contains atomic operations and inline fastest locking Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Atomic_h #define OVR_Atomic_h diff --git a/LibOVR/Src/Kernel/OVR_Color.h b/LibOVR/Src/Kernel/OVR_Color.h index e05f301..0881997 100644 --- a/LibOVR/Src/Kernel/OVR_Color.h +++ b/LibOVR/Src/Kernel/OVR_Color.h @@ -8,10 +8,21 @@ Notes : Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Color_h #define OVR_Color_h diff --git a/LibOVR/Src/Kernel/OVR_ContainerAllocator.h b/LibOVR/Src/Kernel/OVR_ContainerAllocator.h index 889bd88..36c22d1 100644 --- a/LibOVR/Src/Kernel/OVR_ContainerAllocator.h +++ b/LibOVR/Src/Kernel/OVR_ContainerAllocator.h @@ -6,12 +6,23 @@ Content : Template allocators and constructors for containers. Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_ContainerAllocator_h diff --git a/LibOVR/Src/Kernel/OVR_File.cpp b/LibOVR/Src/Kernel/OVR_File.cpp index 26e94e8..3f52488 100644 --- a/LibOVR/Src/Kernel/OVR_File.cpp +++ b/LibOVR/Src/Kernel/OVR_File.cpp @@ -6,12 +6,23 @@ Content : File wrapper class implementation (Win32) Created : April 5, 1999 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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. + **************************************************************************/ #define GFILE_CXX diff --git a/LibOVR/Src/Kernel/OVR_File.h b/LibOVR/Src/Kernel/OVR_File.h index 4f7ede2..92c53ab 100644 --- a/LibOVR/Src/Kernel/OVR_File.h +++ b/LibOVR/Src/Kernel/OVR_File.h @@ -11,12 +11,23 @@ Notes : errno may not be preserved across use of BaseFile member functio : Directories cannot be deleted while files opened from them are in use (For the GetFullName function) -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_File_h diff --git a/LibOVR/Src/Kernel/OVR_FileFILE.cpp b/LibOVR/Src/Kernel/OVR_FileFILE.cpp index e140158..fd01118 100644 --- a/LibOVR/Src/Kernel/OVR_FileFILE.cpp +++ b/LibOVR/Src/Kernel/OVR_FileFILE.cpp @@ -6,12 +6,23 @@ Content : File wrapper class implementation (Win32) Created : April 5, 1999 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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. + **************************************************************************/ #define GFILE_CXX diff --git a/LibOVR/Src/Kernel/OVR_Hash.h b/LibOVR/Src/Kernel/OVR_Hash.h index 5fcd6a8..98c206b 100644 --- a/LibOVR/Src/Kernel/OVR_Hash.h +++ b/LibOVR/Src/Kernel/OVR_Hash.h @@ -6,12 +6,23 @@ Content : Template hash-table/set implementation Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Hash_h diff --git a/LibOVR/Src/Kernel/OVR_KeyCodes.h b/LibOVR/Src/Kernel/OVR_KeyCodes.h index 5e0aa5e..42d98ee 100644 --- a/LibOVR/Src/Kernel/OVR_KeyCodes.h +++ b/LibOVR/Src/Kernel/OVR_KeyCodes.h @@ -5,12 +5,23 @@ Filename : OVR_KeyCodes.h Content : Common keyboard constants Created : September 19, 2012 -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_KeyCodes_h diff --git a/LibOVR/Src/Kernel/OVR_List.h b/LibOVR/Src/Kernel/OVR_List.h index 6ad471d..d5e79a3 100644 --- a/LibOVR/Src/Kernel/OVR_List.h +++ b/LibOVR/Src/Kernel/OVR_List.h @@ -6,12 +6,23 @@ Content : Template implementation for doubly-connected linked List Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_List_h diff --git a/LibOVR/Src/Kernel/OVR_Log.cpp b/LibOVR/Src/Kernel/OVR_Log.cpp index 255abcc..76b09ad 100644 --- a/LibOVR/Src/Kernel/OVR_Log.cpp +++ b/LibOVR/Src/Kernel/OVR_Log.cpp @@ -5,12 +5,23 @@ Content : Logging support Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Log.h" diff --git a/LibOVR/Src/Kernel/OVR_Log.h b/LibOVR/Src/Kernel/OVR_Log.h index d49d466..9c6feb6 100644 --- a/LibOVR/Src/Kernel/OVR_Log.h +++ b/LibOVR/Src/Kernel/OVR_Log.h @@ -6,12 +6,23 @@ Content : Logging support Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Log_h diff --git a/LibOVR/Src/Kernel/OVR_Math.cpp b/LibOVR/Src/Kernel/OVR_Math.cpp index d971d65..e5a1f0e 100644 --- a/LibOVR/Src/Kernel/OVR_Math.cpp +++ b/LibOVR/Src/Kernel/OVR_Math.cpp @@ -5,12 +5,23 @@ Content : Implementation of 3D primitives such as vectors, matrices. Created : September 4, 2012 Authors : Andrew Reisse, Michael Antonov, Anna Yershova -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Math.h" diff --git a/LibOVR/Src/Kernel/OVR_Math.h b/LibOVR/Src/Kernel/OVR_Math.h index 108b9d3..cdcce81 100644 --- a/LibOVR/Src/Kernel/OVR_Math.h +++ b/LibOVR/Src/Kernel/OVR_Math.h @@ -6,12 +6,23 @@ Content : Implementation of 3D primitives such as vectors, matrices. Created : September 4, 2012 Authors : Andrew Reisse, Michael Antonov, Steve LaValle, Anna Yershova, Max Katsev -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Math_h diff --git a/LibOVR/Src/Kernel/OVR_RefCount.cpp b/LibOVR/Src/Kernel/OVR_RefCount.cpp index aeff7ba..8bb80ef 100644 --- a/LibOVR/Src/Kernel/OVR_RefCount.cpp +++ b/LibOVR/Src/Kernel/OVR_RefCount.cpp @@ -5,12 +5,23 @@ Content : Reference counting implementation Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_RefCount.h" diff --git a/LibOVR/Src/Kernel/OVR_RefCount.h b/LibOVR/Src/Kernel/OVR_RefCount.h index 3fae210..8f2e3ad 100644 --- a/LibOVR/Src/Kernel/OVR_RefCount.h +++ b/LibOVR/Src/Kernel/OVR_RefCount.h @@ -6,12 +6,23 @@ Content : Reference counting implementation headers Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_RefCount_h diff --git a/LibOVR/Src/Kernel/OVR_Std.cpp b/LibOVR/Src/Kernel/OVR_Std.cpp index d6043ab..4159652 100644 --- a/LibOVR/Src/Kernel/OVR_Std.cpp +++ b/LibOVR/Src/Kernel/OVR_Std.cpp @@ -5,12 +5,23 @@ Content : Standard C function implementation Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Std.h" diff --git a/LibOVR/Src/Kernel/OVR_Std.h b/LibOVR/Src/Kernel/OVR_Std.h index f8d8a3c..4ec8d65 100644 --- a/LibOVR/Src/Kernel/OVR_Std.h +++ b/LibOVR/Src/Kernel/OVR_Std.h @@ -6,12 +6,23 @@ Content : Standard C function interface Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Std_h @@ -218,7 +229,7 @@ inline long OVR_CDECL OVR_strtol(const char* string, char** tailptr, int radix) return strtol(string, tailptr, radix); } -inline long OVR_CDECL OVR_strtoul(const char* string, char** tailptr, int radix) +inline unsigned long OVR_CDECL OVR_strtoul(const char* string, char** tailptr, int radix) { return strtoul(string, tailptr, radix); } @@ -270,7 +281,7 @@ inline UPInt OVR_CDECL OVR_sprintf(char *dest, UPInt destsize, const char* forma { va_list argList; va_start(argList,format); - UPInt ret; + SInt32 ret; #if defined(OVR_CC_MSVC) #if defined(OVR_MSVC_SAFESTRING) ret = _vsnprintf_s(dest, destsize, _TRUNCATE, format, argList); @@ -287,7 +298,7 @@ inline UPInt OVR_CDECL OVR_sprintf(char *dest, UPInt destsize, const char* forma OVR_ASSERT(ret < destsize); #endif va_end(argList); - return ret; + return (UPInt)ret; } inline UPInt OVR_CDECL OVR_vsprintf(char *dest, UPInt destsize, const char * format, va_list argList) diff --git a/LibOVR/Src/Kernel/OVR_String.cpp b/LibOVR/Src/Kernel/OVR_String.cpp index 4e5eb2e..8c72c6d 100644 --- a/LibOVR/Src/Kernel/OVR_String.cpp +++ b/LibOVR/Src/Kernel/OVR_String.cpp @@ -6,12 +6,23 @@ Content : String UTF8 string implementation with copy-on-write semantics Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_String.h" diff --git a/LibOVR/Src/Kernel/OVR_String.h b/LibOVR/Src/Kernel/OVR_String.h index 794990f..6c09178 100644 --- a/LibOVR/Src/Kernel/OVR_String.h +++ b/LibOVR/Src/Kernel/OVR_String.h @@ -7,12 +7,23 @@ Content : String UTF8 string implementation with copy-on-write semantics Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_String_h @@ -225,7 +236,7 @@ public: // String& Insert(const UInt32* substr, UPInt posAt, SPInt size = -1); // Get Byte index of the character at position = index - UPInt GetByteIndex(UPInt index) const { return (UPInt)UTF8Util::GetByteIndex(index, GetData()->Data); } + UPInt GetByteIndex(UPInt index) const { return (UPInt)UTF8Util::GetByteIndex(static_cast<SPInt>(index), GetData()->Data); } // Utility: case-insensitive string compare. stricmp() & strnicmp() are not // ANSI or POSIX, do not seem to appear in Linux. @@ -275,7 +286,7 @@ public: void operator += (const String& src); void operator += (const char* psrc) { AppendString(psrc); } void operator += (const wchar_t* psrc) { AppendString(psrc); } - void operator += (char ch) { AppendChar(ch); } + void operator += (char ch) { AppendChar( static_cast<UInt32>(ch) ); } String operator + (const char* str) const; String operator + (const String& src) const; @@ -465,10 +476,10 @@ public: void operator = (const String& src); // Addition - void operator += (const String& src) { AppendString(src.ToCStr(),src.GetSize()); } + void operator += (const String& src) { AppendString(src.ToCStr(),static_cast<SPInt>(src.GetSize())); } void operator += (const char* psrc) { AppendString(psrc); } void operator += (const wchar_t* psrc) { AppendString(psrc); } - void operator += (char ch) { AppendChar(ch); } + void operator += (char ch) { AppendChar( static_cast<SPInt>(ch) ); } //String operator + (const char* str) const ; //String operator + (const String& src) const ; diff --git a/LibOVR/Src/Kernel/OVR_StringHash.h b/LibOVR/Src/Kernel/OVR_StringHash.h index ae8010c..90679e0 100644 --- a/LibOVR/Src/Kernel/OVR_StringHash.h +++ b/LibOVR/Src/Kernel/OVR_StringHash.h @@ -7,12 +7,23 @@ Content : String hash table used when optional case-insensitive Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_StringHash_h diff --git a/LibOVR/Src/Kernel/OVR_String_FormatUtil.cpp b/LibOVR/Src/Kernel/OVR_String_FormatUtil.cpp index 72e7f7f..e0db5d4 100644 --- a/LibOVR/Src/Kernel/OVR_String_FormatUtil.cpp +++ b/LibOVR/Src/Kernel/OVR_String_FormatUtil.cpp @@ -7,10 +7,21 @@ Notes : Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_String.h" diff --git a/LibOVR/Src/Kernel/OVR_String_PathUtil.cpp b/LibOVR/Src/Kernel/OVR_String_PathUtil.cpp index 698d16e..4a7e87a 100644 --- a/LibOVR/Src/Kernel/OVR_String_PathUtil.cpp +++ b/LibOVR/Src/Kernel/OVR_String_PathUtil.cpp @@ -5,12 +5,23 @@ Content : String filename/url helper function Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_String.h" diff --git a/LibOVR/Src/Kernel/OVR_SysFile.cpp b/LibOVR/Src/Kernel/OVR_SysFile.cpp index 13f0e75..cdbc843 100644 --- a/LibOVR/Src/Kernel/OVR_SysFile.cpp +++ b/LibOVR/Src/Kernel/OVR_SysFile.cpp @@ -6,12 +6,23 @@ Content : File wrapper class implementation (Win32) Created : April 5, 1999 Authors : Michael Antonov -Copyright : Copyright 2011 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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. + **************************************************************************/ #define GFILE_CXX diff --git a/LibOVR/Src/Kernel/OVR_SysFile.h b/LibOVR/Src/Kernel/OVR_SysFile.h index 892d16b..3241e67 100644 --- a/LibOVR/Src/Kernel/OVR_SysFile.h +++ b/LibOVR/Src/Kernel/OVR_SysFile.h @@ -11,12 +11,23 @@ Notes : errno may not be preserved across use of GBaseFile member functi : Directories cannot be deleted while files opened from them are in use (For the GetFullName function) -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_SysFile_h diff --git a/LibOVR/Src/Kernel/OVR_System.cpp b/LibOVR/Src/Kernel/OVR_System.cpp index 410bfe1..e57a663 100644 --- a/LibOVR/Src/Kernel/OVR_System.cpp +++ b/LibOVR/Src/Kernel/OVR_System.cpp @@ -6,12 +6,23 @@ Content : General kernel initialization/cleanup, including that Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_System.h" diff --git a/LibOVR/Src/Kernel/OVR_System.h b/LibOVR/Src/Kernel/OVR_System.h index 10d9b2d..1e4065f 100644 --- a/LibOVR/Src/Kernel/OVR_System.h +++ b/LibOVR/Src/Kernel/OVR_System.h @@ -7,12 +7,23 @@ Content : General kernel initialization/cleanup, including that Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_System_h diff --git a/LibOVR/Src/Kernel/OVR_Threads.h b/LibOVR/Src/Kernel/OVR_Threads.h index 747cba2..0585972 100644 --- a/LibOVR/Src/Kernel/OVR_Threads.h +++ b/LibOVR/Src/Kernel/OVR_Threads.h @@ -6,12 +6,23 @@ Content : Contains thread-related (safe) functionality Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Threads_h #define OVR_Threads_h diff --git a/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp b/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp index e8d6753..bf87f8c 100644 --- a/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp +++ b/LibOVR/Src/Kernel/OVR_ThreadsPthread.cpp @@ -1,3 +1,29 @@ +/************************************************************************************ + +PublicHeader: OVR +Filename : OVR_Threads.h +Content : +Created : +Notes : + +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. + +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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" diff --git a/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp b/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp index 7a75872..8880082 100644 --- a/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp +++ b/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp @@ -6,12 +6,23 @@ Content : Windows specific thread-related (safe) functionality Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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" diff --git a/LibOVR/Src/Kernel/OVR_Timer.cpp b/LibOVR/Src/Kernel/OVR_Timer.cpp index 682d621..84ff4a1 100644 --- a/LibOVR/Src/Kernel/OVR_Timer.cpp +++ b/LibOVR/Src/Kernel/OVR_Timer.cpp @@ -5,18 +5,33 @@ Content : Provides static functions for precise timing Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Timer.h" +#include "OVR_Log.h" #if defined (OVR_OS_WIN32) #include <windows.h> +#elif defined(OVR_OS_ANDROID) +#include <time.h> +#include <android/log.h> #else #include <sys/time.h> @@ -24,8 +39,15 @@ otherwise accompanies this software in either electronic or hard copy form. namespace OVR { -//----------------------------------------------------------------------------------- -// ***** Timer Class + +//------------------------------------------------------------------------ +// *** Timer - Platform Independent functions + +double ovr_GetTimeInSeconds() +{ + return Timer::GetSeconds(); +} + UInt64 Timer::GetProfileTicks() { @@ -37,11 +59,53 @@ double Timer::GetProfileSeconds() return TicksToSeconds(GetProfileTicks()-StartTime); } +#ifndef OVR_OS_ANDROID + +double Timer::GetSeconds() +{ + return (double)Timer::GetRawTicks() / (double) GetRawFrequency(); +} +#endif + + +//------------------------------------------------------------------------ +// *** Android Specific Timer + + +#if defined(OVR_OS_ANDROID) + +// Returns global high-resolution application timer in seconds. +double Timer::GetSeconds() +{ + return double(Timer::GetRawTicks()) * 0.000000001; +} + +UInt64 Timer::GetRawTicks() +{ + // Choreographer vsync timestamp is based on. + struct timespec tp; + const int status = clock_gettime(CLOCK_MONOTONIC, &tp); + + if (status != 0) + { + OVR_DEBUG_LOG(("clock_gettime status=%i", status )); + } + const UInt64 result = (UInt64)tp.tv_sec * (UInt64)(1000 * 1000 * 1000) + UInt64(tp.tv_nsec); + return result; +} + +UInt64 Timer::GetRawFrequency() +{ + return MksPerSecond * 1000; +} + +#endif + //------------------------------------------------------------------------ // *** Win32 Specific Timer -#if (defined (OVR_OS_WIN32)) +#if defined (OVR_OS_WIN32) CRITICAL_SECTION WinAPI_GetTimeCS; volatile UInt32 WinAPI_OldTime = 0; @@ -127,13 +191,16 @@ void Timer::shutdownTimerSystem() { } + +#if !defined(OVR_OS_ANDROID) + UInt64 Timer::GetRawTicks() { // TODO: prefer rdtsc when available? + UInt64 result; // Return microseconds. struct timeval tv; - UInt64 result; gettimeofday(&tv, 0); @@ -148,6 +215,8 @@ UInt64 Timer::GetRawFrequency() return MksPerSecond; } +#endif // !OVR_OS_ANDROID + #endif // !OVR_OS_WIN32 diff --git a/LibOVR/Src/Kernel/OVR_Timer.h b/LibOVR/Src/Kernel/OVR_Timer.h index 34f72c4..937b2cd 100644 --- a/LibOVR/Src/Kernel/OVR_Timer.h +++ b/LibOVR/Src/Kernel/OVR_Timer.h @@ -6,12 +6,23 @@ Content : Provides static functions for precise timing Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Timer_h @@ -51,6 +62,9 @@ public: // is system-specific and may be much lower, such as 1 ms. static UInt64 OVR_STDCALL GetTicks(); + // Returns global high-resolution application timer in seconds. + static double OVR_STDCALL GetSeconds(); + // ***** Profiling APIs. // These functions should be used for profiling, but may have system specific @@ -95,6 +109,11 @@ private: }; -} // Namespace OVR +// Global high-resolution time in seconds. This is intended to replace Timer class in OVR. +double ovr_GetTimeInSeconds(); + + + +} // OVR::Timer #endif diff --git a/LibOVR/Src/Kernel/OVR_Types.h b/LibOVR/Src/Kernel/OVR_Types.h index db024f1..6b2922e 100644 --- a/LibOVR/Src/Kernel/OVR_Types.h +++ b/LibOVR/Src/Kernel/OVR_Types.h @@ -6,12 +6,23 @@ Content : Standard library defines and simple types Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Types_H @@ -148,9 +159,11 @@ otherwise accompanies this software in either electronic or hard copy form. // Disable MSVC warnings #if defined(OVR_CC_MSVC) # pragma warning(disable : 4127) // Inconsistent dll linkage +# pragma warning(disable : 4514) // Unreferenced inline function has been removed # pragma warning(disable : 4530) // Exception handling +# pragma warning(disable : 4711) // function 'x()' selected for automatic inline expansion +# pragma warning(disable : 4820) // 'n' bytes padding added after data member 'item' # if (OVR_CC_MSVC<1300) -# pragma warning(disable : 4514) // Unreferenced inline function has been removed # pragma warning(disable : 4710) // Function not inlined # pragma warning(disable : 4714) // _force_inline not inlined # pragma warning(disable : 4786) // Debug variable name longer than 255 chars diff --git a/LibOVR/Src/Kernel/OVR_UTF8Util.cpp b/LibOVR/Src/Kernel/OVR_UTF8Util.cpp index dd8350f..9d337a7 100644 --- a/LibOVR/Src/Kernel/OVR_UTF8Util.cpp +++ b/LibOVR/Src/Kernel/OVR_UTF8Util.cpp @@ -7,12 +7,23 @@ Notes : Notes : Much useful info at "UTF-8 and Unicode FAQ" http://www.cl.cam.ac.uk/~mgk25/unicode.html -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_UTF8Util.h" diff --git a/LibOVR/Src/Kernel/OVR_UTF8Util.h b/LibOVR/Src/Kernel/OVR_UTF8Util.h index 5448b96..9509629 100644 --- a/LibOVR/Src/Kernel/OVR_UTF8Util.h +++ b/LibOVR/Src/Kernel/OVR_UTF8Util.h @@ -6,12 +6,22 @@ Content : UTF8 Unicode character encoding/decoding support Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_UTF8Util_h diff --git a/LibOVR/Src/OVR_Device.h b/LibOVR/Src/OVR_Device.h index 72a8c5e..d0a39d0 100644 --- a/LibOVR/Src/OVR_Device.h +++ b/LibOVR/Src/OVR_Device.h @@ -6,12 +6,23 @@ Content : Definition of HMD-related Device interfaces Created : September 21, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Device_h diff --git a/LibOVR/Src/OVR_DeviceConstants.h b/LibOVR/Src/OVR_DeviceConstants.h index 37b95cf..d5c2418 100644 --- a/LibOVR/Src/OVR_DeviceConstants.h +++ b/LibOVR/Src/OVR_DeviceConstants.h @@ -8,10 +8,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceConstants_h diff --git a/LibOVR/Src/OVR_DeviceHandle.cpp b/LibOVR/Src/OVR_DeviceHandle.cpp index d1e831e..4a98897 100644 --- a/LibOVR/Src/OVR_DeviceHandle.cpp +++ b/LibOVR/Src/OVR_DeviceHandle.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceHandle.h" diff --git a/LibOVR/Src/OVR_DeviceHandle.h b/LibOVR/Src/OVR_DeviceHandle.h index dc8b267..e811d23 100644 --- a/LibOVR/Src/OVR_DeviceHandle.h +++ b/LibOVR/Src/OVR_DeviceHandle.h @@ -8,10 +8,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceHandle_h diff --git a/LibOVR/Src/OVR_DeviceImpl.cpp b/LibOVR/Src/OVR_DeviceImpl.cpp index 80dc7d2..140598f 100644 --- a/LibOVR/Src/OVR_DeviceImpl.cpp +++ b/LibOVR/Src/OVR_DeviceImpl.cpp @@ -5,12 +5,23 @@ Content : Partial back-end independent implementation of Device interfaces Created : October 10, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceImpl.h" @@ -561,7 +572,7 @@ Ptr<DeviceCreateDesc> DeviceManagerImpl::FindDevice( return NULL; } -Ptr<DeviceCreateDesc> DeviceManagerImpl::FindHIDDevice(const HIDDeviceDesc& hidDevDesc) +Ptr<DeviceCreateDesc> DeviceManagerImpl::FindHIDDevice(const HIDDeviceDesc& hidDevDesc, bool created) { Lock::Locker deviceLock(GetLock()); DeviceCreateDesc* devDesc; @@ -569,8 +580,16 @@ Ptr<DeviceCreateDesc> DeviceManagerImpl::FindHIDDevice(const HIDDeviceDesc& hidD for (devDesc = Devices.GetFirst(); !Devices.IsNull(devDesc); devDesc = devDesc->pNext) { - if (devDesc->MatchHIDDevice(hidDevDesc)) - return devDesc; + if (created) + { // Search for matching device that is created + if (devDesc->MatchHIDDevice(hidDevDesc) && devDesc->pDevice) + return devDesc; + } + else + { // Search for any matching device + if (devDesc->MatchHIDDevice(hidDevDesc)) + return devDesc; + } } return NULL; } diff --git a/LibOVR/Src/OVR_DeviceImpl.h b/LibOVR/Src/OVR_DeviceImpl.h index e61e37b..7f85c78 100644 --- a/LibOVR/Src/OVR_DeviceImpl.h +++ b/LibOVR/Src/OVR_DeviceImpl.h @@ -5,12 +5,23 @@ Content : Partial back-end independent implementation of Device interfaces Created : October 10, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceImpl_h @@ -412,7 +423,7 @@ public: Ptr<DeviceCreateDesc> FindDevice(const String& path, DeviceType = Device_None); // Finds HID device by HIDDeviceDesc. - Ptr<DeviceCreateDesc> FindHIDDevice(const HIDDeviceDesc&); + Ptr<DeviceCreateDesc> FindHIDDevice(const HIDDeviceDesc&, bool created); void DetectHIDDevice(const HIDDeviceDesc&); // Manager Lock-protected list of devices. diff --git a/LibOVR/Src/OVR_DeviceMessages.h b/LibOVR/Src/OVR_DeviceMessages.h index 43f9496..6d525b3 100644 --- a/LibOVR/Src/OVR_DeviceMessages.h +++ b/LibOVR/Src/OVR_DeviceMessages.h @@ -8,10 +8,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceMessages_h diff --git a/LibOVR/Src/OVR_HIDDevice.h b/LibOVR/Src/OVR_HIDDevice.h index 512b96a..7fc6fee 100644 --- a/LibOVR/Src/OVR_HIDDevice.h +++ b/LibOVR/Src/OVR_HIDDevice.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HIDDevice_h diff --git a/LibOVR/Src/OVR_HIDDeviceBase.h b/LibOVR/Src/OVR_HIDDeviceBase.h index 4532b76..9d20dfc 100644 --- a/LibOVR/Src/OVR_HIDDeviceBase.h +++ b/LibOVR/Src/OVR_HIDDeviceBase.h @@ -8,10 +8,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HIDDeviceBase_h diff --git a/LibOVR/Src/OVR_HIDDeviceImpl.h b/LibOVR/Src/OVR_HIDDeviceImpl.h index f9d0922..598adba 100644 --- a/LibOVR/Src/OVR_HIDDeviceImpl.h +++ b/LibOVR/Src/OVR_HIDDeviceImpl.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HIDDeviceImpl_h diff --git a/LibOVR/Src/OVR_JSON.cpp b/LibOVR/Src/OVR_JSON.cpp index eb54b04..0625f6d 100644 --- a/LibOVR/Src/OVR_JSON.cpp +++ b/LibOVR/Src/OVR_JSON.cpp @@ -30,12 +30,23 @@ Notes : THE SOFTWARE. -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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 <string.h> diff --git a/LibOVR/Src/OVR_JSON.h b/LibOVR/Src/OVR_JSON.h index 5e5996f..ece84be 100644 --- a/LibOVR/Src/OVR_JSON.h +++ b/LibOVR/Src/OVR_JSON.h @@ -7,12 +7,23 @@ Created : April 9, 2013 Author : Brant Lewis Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_JSON_H diff --git a/LibOVR/Src/OVR_LatencyTestImpl.cpp b/LibOVR/Src/OVR_LatencyTestImpl.cpp index 4ab28e5..209487c 100644 --- a/LibOVR/Src/OVR_LatencyTestImpl.cpp +++ b/LibOVR/Src/OVR_LatencyTestImpl.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_LatencyTestImpl.h" diff --git a/LibOVR/Src/OVR_LatencyTestImpl.h b/LibOVR/Src/OVR_LatencyTestImpl.h index 727e36e..bab0180 100644 --- a/LibOVR/Src/OVR_LatencyTestImpl.h +++ b/LibOVR/Src/OVR_LatencyTestImpl.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_LatencyTestImpl_h diff --git a/LibOVR/Src/OVR_Linux_DeviceManager.cpp b/LibOVR/Src/OVR_Linux_DeviceManager.cpp index d573455..298534b 100644 --- a/LibOVR/Src/OVR_Linux_DeviceManager.cpp +++ b/LibOVR/Src/OVR_Linux_DeviceManager.cpp @@ -5,12 +5,23 @@ Content : Linux implementation of DeviceManager. Created : Authors : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Linux_DeviceManager.h" diff --git a/LibOVR/Src/OVR_Linux_DeviceManager.h b/LibOVR/Src/OVR_Linux_DeviceManager.h index 69dabc0..101f871 100644 --- a/LibOVR/Src/OVR_Linux_DeviceManager.h +++ b/LibOVR/Src/OVR_Linux_DeviceManager.h @@ -5,12 +5,23 @@ Content : Linux-specific DeviceManager header. Created : Authors : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Linux_DeviceManager_h diff --git a/LibOVR/Src/OVR_Linux_HIDDevice.cpp b/LibOVR/Src/OVR_Linux_HIDDevice.cpp index c07c1ad..ed4db0e 100644 --- a/LibOVR/Src/OVR_Linux_HIDDevice.cpp +++ b/LibOVR/Src/OVR_Linux_HIDDevice.cpp @@ -5,11 +5,22 @@ Created : February 26, 2013 Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. - -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which + +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Linux_HIDDevice.h" @@ -239,7 +250,7 @@ bool HIDDeviceManager::Enumerate(HIDEnumerateVisitor* enumVisitor) getFullDesc(hid, &devDesc); // Look for the device to check if it is already opened. - Ptr<DeviceCreateDesc> existingDevice = DevManager->FindHIDDevice(devDesc); + Ptr<DeviceCreateDesc> existingDevice = DevManager->FindHIDDevice(devDesc, true); // if device exists and it is opened then most likely the device open() // will fail; therefore, we just set Enumerated to 'true' and continue. if (existingDevice && existingDevice->pDevice) diff --git a/LibOVR/Src/OVR_Linux_HIDDevice.h b/LibOVR/Src/OVR_Linux_HIDDevice.h index eae352e..0f4c7f0 100644 --- a/LibOVR/Src/OVR_Linux_HIDDevice.h +++ b/LibOVR/Src/OVR_Linux_HIDDevice.h @@ -6,10 +6,21 @@ Authors : Brant Lewis Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_LINUX_HIDDevice_h diff --git a/LibOVR/Src/OVR_Linux_HMDDevice.cpp b/LibOVR/Src/OVR_Linux_HMDDevice.cpp index dc94851..633e665 100644 --- a/LibOVR/Src/OVR_Linux_HMDDevice.cpp +++ b/LibOVR/Src/OVR_Linux_HMDDevice.cpp @@ -7,10 +7,21 @@ Authors : Brant Lewis Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Linux_HMDDevice.h" @@ -29,11 +40,13 @@ namespace OVR { namespace Linux { HMDDeviceCreateDesc::HMDDeviceCreateDesc(DeviceFactory* factory, const String& displayDeviceName, long dispId) : DeviceCreateDesc(factory, Device_HMD), DisplayDeviceName(displayDeviceName), - DesktopX(0), DesktopY(0), Contents(0), + DesktopX(0), DesktopY(0), Contents(0), EyeToScreenDistance(0), HResolution(0), VResolution(0), HScreenSize(0), VScreenSize(0), DisplayId(dispId) { DeviceId = DisplayDeviceName; + for (int i=0; i<4; i++) + DistortionK[i] = 0; } HMDDeviceCreateDesc::HMDDeviceCreateDesc(const HMDDeviceCreateDesc& other) @@ -42,8 +55,10 @@ HMDDeviceCreateDesc::HMDDeviceCreateDesc(const HMDDeviceCreateDesc& other) DesktopX(other.DesktopX), DesktopY(other.DesktopY), Contents(other.Contents), HResolution(other.HResolution), VResolution(other.VResolution), HScreenSize(other.HScreenSize), VScreenSize(other.VScreenSize), - DisplayId(other.DisplayId) + DisplayId(other.DisplayId), EyeToScreenDistance(other.EyeToScreenDistance) { + for (int i=0; i<4; i++) + DistortionK[i] = other.DistortionK[i]; } HMDDeviceCreateDesc::MatchResult HMDDeviceCreateDesc::MatchDevice(const DeviceCreateDesc& other, @@ -285,6 +300,7 @@ bool HMDDeviceCreateDesc::GetDeviceInfo(DeviceInfo* info) const if (Contents & Contents_Distortion) { memcpy(hmdInfo->DistortionK, DistortionK, sizeof(float)*4); + hmdInfo->EyeToScreenDistance = EyeToScreenDistance; } else { @@ -307,13 +323,13 @@ bool HMDDeviceCreateDesc::GetDeviceInfo(DeviceInfo* info) const else hmdInfo->EyeToScreenDistance = 0.0387f; } - - hmdInfo->ChromaAbCorrection[0] = 0.996f; - hmdInfo->ChromaAbCorrection[1] = -0.004f; - hmdInfo->ChromaAbCorrection[2] = 1.014f; - hmdInfo->ChromaAbCorrection[3] = 0.0f; } + hmdInfo->ChromaAbCorrection[0] = 0.996f; + hmdInfo->ChromaAbCorrection[1] = -0.004f; + hmdInfo->ChromaAbCorrection[2] = 1.014f; + hmdInfo->ChromaAbCorrection[3] = 0.0f; + OVR_strcpy(hmdInfo->DisplayDeviceName, sizeof(hmdInfo->DisplayDeviceName), DisplayDeviceName.ToCStr()); hmdInfo->DisplayId = DisplayId; diff --git a/LibOVR/Src/OVR_Linux_HMDDevice.h b/LibOVR/Src/OVR_Linux_HMDDevice.h index d0585d1..b5c4bf1 100644 --- a/LibOVR/Src/OVR_Linux_HMDDevice.h +++ b/LibOVR/Src/OVR_Linux_HMDDevice.h @@ -7,10 +7,21 @@ Authors : Brant Lewis Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Linux_HMDDevice_h @@ -61,6 +72,7 @@ protected: float HScreenSize, VScreenSize; long DisplayId; float DistortionK[4]; + float EyeToScreenDistance; public: HMDDeviceCreateDesc(DeviceFactory* factory, const String& displayDeviceName, long dispId); @@ -103,8 +115,10 @@ public: VScreenSize = vsize; Contents |= Contents_Screen; } - void SetDistortion(const float* dks) + void SetDistortion(float eye2screen, const float* dks) { + EyeToScreenDistance = eye2screen; + for (int i = 0; i < 4; i++) DistortionK[i] = dks[i]; Contents |= Contents_Distortion; diff --git a/LibOVR/Src/OVR_Linux_SensorDevice.cpp b/LibOVR/Src/OVR_Linux_SensorDevice.cpp index d957ad5..376e4d4 100644 --- a/LibOVR/Src/OVR_Linux_SensorDevice.cpp +++ b/LibOVR/Src/OVR_Linux_SensorDevice.cpp @@ -7,13 +7,24 @@ Authors : Brant Lewis Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HMDDevice.h" +#include "OVR_Linux_HMDDevice.h" #include "OVR_SensorImpl.h" #include "OVR_DeviceImpl.h" @@ -25,22 +36,19 @@ namespace OVR { namespace OSX { void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo( const SensorDisplayInfoImpl& displayInfo, DeviceFactory::EnumerateVisitor& visitor) { -/* - Linux::HMDDeviceCreateDesc hmdCreateDesc(&Linux::HMDDeviceFactory::Instance, 1, 1, "", 0); + + Linux::HMDDeviceCreateDesc hmdCreateDesc(&Linux::HMDDeviceFactory::Instance, "", 0); hmdCreateDesc.SetScreenParameters( 0, 0, displayInfo.HResolution, displayInfo.VResolution, displayInfo.HScreenSize, displayInfo.VScreenSize); - if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion) - hmdCreateDesc.SetDistortion(displayInfo.DistortionK); + if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) & SensorDisplayInfoImpl::Base_Distortion) + hmdCreateDesc.SetDistortion(displayInfo.EyeToScreenDistance[0], displayInfo.DistortionK); if (displayInfo.HScreenSize > 0.14f) hmdCreateDesc.Set7Inch(); visitor.Visit(hmdCreateDesc); - */ - - } } // namespace OVR diff --git a/LibOVR/Src/OVR_OSX_DeviceManager.cpp b/LibOVR/Src/OVR_OSX_DeviceManager.cpp index 90cfbfd..1e1f6d6 100644 --- a/LibOVR/Src/OVR_OSX_DeviceManager.cpp +++ b/LibOVR/Src/OVR_OSX_DeviceManager.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceManager.h" diff --git a/LibOVR/Src/OVR_OSX_DeviceManager.h b/LibOVR/Src/OVR_OSX_DeviceManager.h index f272a35..ff6a577 100644 --- a/LibOVR/Src/OVR_OSX_DeviceManager.h +++ b/LibOVR/Src/OVR_OSX_DeviceManager.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_DeviceManager_h diff --git a/LibOVR/Src/OVR_OSX_HIDDevice.cpp b/LibOVR/Src/OVR_OSX_HIDDevice.cpp index e93cf67..38b1b3e 100644 --- a/LibOVR/Src/OVR_OSX_HIDDevice.cpp +++ b/LibOVR/Src/OVR_OSX_HIDDevice.cpp @@ -5,11 +5,22 @@ Created : February 26, 2013 Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. - -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which + +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HIDDevice.h" @@ -360,7 +371,7 @@ bool HIDDeviceManager::Enumerate(HIDEnumerateVisitor* enumVisitor) initSerialNumber(hidDev, &devDesc); // Look for the device to check if it is already opened. - Ptr<DeviceCreateDesc> existingDevice = DevManager->FindHIDDevice(devDesc); + Ptr<DeviceCreateDesc> existingDevice = DevManager->FindHIDDevice(devDesc, true); // if device exists and it is opened then most likely the CreateHIDFile // will fail; therefore, we just set Enumerated to 'true' and continue. if (existingDevice && existingDevice->pDevice) @@ -368,11 +379,17 @@ bool HIDDeviceManager::Enumerate(HIDEnumerateVisitor* enumVisitor) existingDevice->Enumerated = true; continue; } - - // Construct minimal device that the visitor callback can get feature reports from. - OSX::HIDDevice device(this, hidDev); - - enumVisitor->Visit(device, devDesc); + + // open the device temporarily for startup communication + if (IOHIDDeviceOpen(hidDev, kIOHIDOptionsTypeSeizeDevice) == kIOReturnSuccess) + { + // Construct minimal device that the visitor callback can get feature reports from. + OSX::HIDDevice device(this, hidDev); + + enumVisitor->Visit(device, devDesc); + + IOHIDDeviceClose(hidDev, kIOHIDOptionsTypeSeizeDevice); + } } } @@ -543,7 +560,7 @@ void HIDDevice::deviceAddedCallback(io_iterator_t iterator) { LogText("OVR::OSX::HIDDevice - Reopened device : %s", DevDesc.Path.ToCStr()); - Ptr<DeviceCreateDesc> existingHIDDev = HIDManager->DevManager->FindHIDDevice(DevDesc); + Ptr<DeviceCreateDesc> existingHIDDev = HIDManager->DevManager->FindHIDDevice(DevDesc, true); if (existingHIDDev && existingHIDDev->pDevice) { HIDManager->DevManager->CallOnDeviceAdded(existingHIDDev); @@ -775,7 +792,7 @@ void HIDDevice::deviceRemovedCallback() { Ptr<HIDDevice> _this(this); // prevent from release - Ptr<DeviceCreateDesc> existingHIDDev = HIDManager->DevManager->FindHIDDevice(DevDesc); + Ptr<DeviceCreateDesc> existingHIDDev = HIDManager->DevManager->FindHIDDevice(DevDesc, true); if (existingHIDDev && existingHIDDev->pDevice) { HIDManager->DevManager->CallOnDeviceRemoved(existingHIDDev); diff --git a/LibOVR/Src/OVR_OSX_HIDDevice.h b/LibOVR/Src/OVR_OSX_HIDDevice.h index 564bb60..e2fac31 100644 --- a/LibOVR/Src/OVR_OSX_HIDDevice.h +++ b/LibOVR/Src/OVR_OSX_HIDDevice.h @@ -6,10 +6,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HIDDevice_h diff --git a/LibOVR/Src/OVR_OSX_HMDDevice.cpp b/LibOVR/Src/OVR_OSX_HMDDevice.cpp index 937b30f..214a2e7 100644 --- a/LibOVR/Src/OVR_OSX_HMDDevice.cpp +++ b/LibOVR/Src/OVR_OSX_HMDDevice.cpp @@ -5,12 +5,23 @@ Content : OSX Interface to HMD - detects HMD display Created : September 21, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HMDDevice.h" @@ -28,7 +39,7 @@ HMDDeviceCreateDesc::HMDDeviceCreateDesc(DeviceFactory* factory, UInt32 vend, UInt32 prod, const String& displayDeviceName, long dispId) : DeviceCreateDesc(factory, Device_HMD), DisplayDeviceName(displayDeviceName), - DesktopX(0), DesktopY(0), Contents(0), + DesktopX(0), DesktopY(0), Contents(0), EyeToScreenDistance(0), HResolution(0), VResolution(0), HScreenSize(0), VScreenSize(0), DisplayId(dispId) { @@ -40,6 +51,9 @@ HMDDeviceCreateDesc::HMDDeviceCreateDesc(DeviceFactory* factory, snprintf(idstring+3, 5, "%04d", prod); DeviceId = idstring;*/ DeviceId = DisplayDeviceName; + + for (int i=0; i<4; i++) + DistortionK[i] = 0; } HMDDeviceCreateDesc::HMDDeviceCreateDesc(const HMDDeviceCreateDesc& other) @@ -48,8 +62,10 @@ HMDDeviceCreateDesc::HMDDeviceCreateDesc(const HMDDeviceCreateDesc& other) DesktopX(other.DesktopX), DesktopY(other.DesktopY), Contents(other.Contents), HResolution(other.HResolution), VResolution(other.VResolution), HScreenSize(other.HScreenSize), VScreenSize(other.VScreenSize), - DisplayId(other.DisplayId) + DisplayId(other.DisplayId), EyeToScreenDistance(other.EyeToScreenDistance) { + for (int i=0; i<4; i++) + DistortionK[i] = other.DistortionK[i]; } HMDDeviceCreateDesc::MatchResult HMDDeviceCreateDesc::MatchDevice(const DeviceCreateDesc& other, @@ -292,6 +308,7 @@ bool HMDDeviceCreateDesc::GetDeviceInfo(DeviceInfo* info) const if (Contents & Contents_Distortion) { memcpy(hmdInfo->DistortionK, DistortionK, sizeof(float)*4); + hmdInfo->EyeToScreenDistance = EyeToScreenDistance; } else { @@ -314,13 +331,13 @@ bool HMDDeviceCreateDesc::GetDeviceInfo(DeviceInfo* info) const else hmdInfo->EyeToScreenDistance = 0.0387f; } - - hmdInfo->ChromaAbCorrection[0] = 0.996f; - hmdInfo->ChromaAbCorrection[1] = -0.004f; - hmdInfo->ChromaAbCorrection[2] = 1.014f; - hmdInfo->ChromaAbCorrection[3] = 0.0f; } + hmdInfo->ChromaAbCorrection[0] = 0.996f; + hmdInfo->ChromaAbCorrection[1] = -0.004f; + hmdInfo->ChromaAbCorrection[2] = 1.014f; + hmdInfo->ChromaAbCorrection[3] = 0.0f; + OVR_strcpy(hmdInfo->DisplayDeviceName, sizeof(hmdInfo->DisplayDeviceName), DisplayDeviceName.ToCStr()); hmdInfo->DisplayId = DisplayId; diff --git a/LibOVR/Src/OVR_OSX_HMDDevice.h b/LibOVR/Src/OVR_OSX_HMDDevice.h index 52b8471..d92aa1f 100644 --- a/LibOVR/Src/OVR_OSX_HMDDevice.h +++ b/LibOVR/Src/OVR_OSX_HMDDevice.h @@ -5,12 +5,23 @@ Content : OSX HMDDevice implementation Created : September 21, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HMDDevice_h @@ -96,8 +107,10 @@ public: Contents |= Contents_Screen; } - void SetDistortion(const float* dks) + void SetDistortion(float eye2screen, const float* dks) { + EyeToScreenDistance = eye2screen; + for (int i = 0; i < 4; i++) DistortionK[i] = dks[i]; Contents |= Contents_Distortion; @@ -116,6 +129,7 @@ protected: float HScreenSize, VScreenSize; long DisplayId; float DistortionK[4]; + float EyeToScreenDistance; }; diff --git a/LibOVR/Src/OVR_OSX_SensorDevice.cpp b/LibOVR/Src/OVR_OSX_SensorDevice.cpp index 68e5e52..bee648d 100644 --- a/LibOVR/Src/OVR_OSX_SensorDevice.cpp +++ b/LibOVR/Src/OVR_OSX_SensorDevice.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_HMDDevice.h" @@ -32,8 +43,8 @@ void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo( const SensorDisplayI displayInfo.HResolution, displayInfo.VResolution, displayInfo.HScreenSize, displayInfo.VScreenSize); - if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion) - hmdCreateDesc.SetDistortion(displayInfo.DistortionK); + if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) & SensorDisplayInfoImpl::Base_Distortion) + hmdCreateDesc.SetDistortion(displayInfo.EyeToScreenDistance[0], displayInfo.DistortionK); if (displayInfo.HScreenSize > 0.14f) hmdCreateDesc.Set7Inch(); diff --git a/LibOVR/Src/OVR_Profile.cpp b/LibOVR/Src/OVR_Profile.cpp index 3be43db..fdac5d7 100644 --- a/LibOVR/Src/OVR_Profile.cpp +++ b/LibOVR/Src/OVR_Profile.cpp @@ -14,10 +14,21 @@ Notes : Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Profile.h" @@ -340,7 +351,7 @@ void ProfileManager::SaveCache() json_profile->AddNumberItem("PlayerHeight", profile->PlayerHeight); json_profile->AddNumberItem("IPD", profile->IPD); - char* device_name = NULL; + const char* device_name = NULL; // Create a device-specific subtree for the cached device if (profile->Type == Profile_RiftDK1) { diff --git a/LibOVR/Src/OVR_Profile.h b/LibOVR/Src/OVR_Profile.h index df25fea..9e2f9f3 100644 --- a/LibOVR/Src/OVR_Profile.h +++ b/LibOVR/Src/OVR_Profile.h @@ -13,10 +13,21 @@ Notes : Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Profile_h diff --git a/LibOVR/Src/OVR_SensorFilter.cpp b/LibOVR/Src/OVR_SensorFilter.cpp index 7df84da..38caa5e 100644 --- a/LibOVR/Src/OVR_SensorFilter.cpp +++ b/LibOVR/Src/OVR_SensorFilter.cpp @@ -6,12 +6,23 @@ Content : Basic filtering of sensor data Created : March 7, 2013 Authors : Steve LaValle, Anna Yershova, Max Katsev -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_SensorFilter.h" diff --git a/LibOVR/Src/OVR_SensorFilter.h b/LibOVR/Src/OVR_SensorFilter.h index e6ff01a..5f9481a 100644 --- a/LibOVR/Src/OVR_SensorFilter.h +++ b/LibOVR/Src/OVR_SensorFilter.h @@ -6,12 +6,23 @@ Content : Basic filtering of sensor data Created : March 7, 2013 Authors : Steve LaValle, Anna Yershova, Max Katsev -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_SensorFilter_h diff --git a/LibOVR/Src/OVR_SensorFusion.cpp b/LibOVR/Src/OVR_SensorFusion.cpp index f396775..eac0366 100644 --- a/LibOVR/Src/OVR_SensorFusion.cpp +++ b/LibOVR/Src/OVR_SensorFusion.cpp @@ -5,12 +5,23 @@ Content : Methods that determine head orientation from sensor data over ti Created : October 9, 2012 Authors : Michael Antonov, Steve LaValle, Max Katsev -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_SensorFusion.h" @@ -256,7 +267,9 @@ void SensorFusion::handleMessage(const MessageBodyFrame& msg) } // Update the orientation quaternion based on the corrected angular velocity vector - Q = Q * Quatf(gyroCorrected, gyroCorrected.Length() * DeltaT); + float angle = gyroCorrected.Length() * DeltaT; + if (angle > 0.0f) + Q = Q * Quatf(gyroCorrected, angle); // The quaternion magnitude may slowly drift due to numerical error, // so it is periodically normalized. diff --git a/LibOVR/Src/OVR_SensorFusion.h b/LibOVR/Src/OVR_SensorFusion.h index 5847f54..6f2ee4c 100644 --- a/LibOVR/Src/OVR_SensorFusion.h +++ b/LibOVR/Src/OVR_SensorFusion.h @@ -6,12 +6,23 @@ Content : Methods that determine head orientation from sensor data over ti Created : October 9, 2012 Authors : Michael Antonov, Steve LaValle, Max Katsev -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_SensorFusion_h diff --git a/LibOVR/Src/OVR_SensorImpl.cpp b/LibOVR/Src/OVR_SensorImpl.cpp index c54bccb..1646ee3 100644 --- a/LibOVR/Src/OVR_SensorImpl.cpp +++ b/LibOVR/Src/OVR_SensorImpl.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_SensorImpl.h" diff --git a/LibOVR/Src/OVR_SensorImpl.h b/LibOVR/Src/OVR_SensorImpl.h index 4bdcc4f..8b9eefb 100644 --- a/LibOVR/Src/OVR_SensorImpl.h +++ b/LibOVR/Src/OVR_SensorImpl.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_SensorImpl_h @@ -139,9 +150,9 @@ struct SensorDisplayInfoImpl { Mask_BaseFmt = 0x0f, Mask_OptionFmts = 0xf0, - Base_None = 0, - Base_ScreenOnly = 1, - Base_Distortion = 2, + Base_None = 0x00, + Base_Screen = 0x01, + Base_Distortion = 0x02, }; UInt16 CommandId; diff --git a/LibOVR/Src/OVR_ThreadCommandQueue.cpp b/LibOVR/Src/OVR_ThreadCommandQueue.cpp index 00a5a39..abefffb 100644 --- a/LibOVR/Src/OVR_ThreadCommandQueue.cpp +++ b/LibOVR/Src/OVR_ThreadCommandQueue.cpp @@ -5,12 +5,23 @@ Filename : OVR_ThreadCommandQueue.cpp Content : Command queue for operations executed on a thread Created : October 29, 2012 -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_ThreadCommandQueue.h" diff --git a/LibOVR/Src/OVR_ThreadCommandQueue.h b/LibOVR/Src/OVR_ThreadCommandQueue.h index b760278..cd1770c 100644 --- a/LibOVR/Src/OVR_ThreadCommandQueue.h +++ b/LibOVR/Src/OVR_ThreadCommandQueue.h @@ -6,12 +6,23 @@ Content : Command queue for operations executed on a thread Created : October 29, 2012 Author : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_ThreadCommandQueue_h diff --git a/LibOVR/Src/OVR_Win32_DeviceManager.cpp b/LibOVR/Src/OVR_Win32_DeviceManager.cpp index eebb924..b9dc238 100644 --- a/LibOVR/Src/OVR_Win32_DeviceManager.cpp +++ b/LibOVR/Src/OVR_Win32_DeviceManager.cpp @@ -5,12 +5,23 @@ Content : Win32 implementation of DeviceManager. Created : September 21, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_DeviceManager.h" diff --git a/LibOVR/Src/OVR_Win32_DeviceManager.h b/LibOVR/Src/OVR_Win32_DeviceManager.h index 1b88657..ecf308f 100644 --- a/LibOVR/Src/OVR_Win32_DeviceManager.h +++ b/LibOVR/Src/OVR_Win32_DeviceManager.h @@ -5,12 +5,23 @@ Content : Win32-specific DeviceManager header. Created : September 21, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_DeviceManager_h diff --git a/LibOVR/Src/OVR_Win32_DeviceStatus.cpp b/LibOVR/Src/OVR_Win32_DeviceStatus.cpp index 89e2601..96655a5 100644 --- a/LibOVR/Src/OVR_Win32_DeviceStatus.cpp +++ b/LibOVR/Src/OVR_Win32_DeviceStatus.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_DeviceStatus.h" diff --git a/LibOVR/Src/OVR_Win32_DeviceStatus.h b/LibOVR/Src/OVR_Win32_DeviceStatus.h index 669a12e..31df4d5 100644 --- a/LibOVR/Src/OVR_Win32_DeviceStatus.h +++ b/LibOVR/Src/OVR_Win32_DeviceStatus.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_DeviceStatus_h diff --git a/LibOVR/Src/OVR_Win32_HIDDevice.cpp b/LibOVR/Src/OVR_Win32_HIDDevice.cpp index 28a47f0..8643041 100644 --- a/LibOVR/Src/OVR_Win32_HIDDevice.cpp +++ b/LibOVR/Src/OVR_Win32_HIDDevice.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_HIDDevice.h" diff --git a/LibOVR/Src/OVR_Win32_HIDDevice.h b/LibOVR/Src/OVR_Win32_HIDDevice.h index 85a72e8..b8e3c9f 100644 --- a/LibOVR/Src/OVR_Win32_HIDDevice.h +++ b/LibOVR/Src/OVR_Win32_HIDDevice.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_HIDDevice_h diff --git a/LibOVR/Src/OVR_Win32_HMDDevice.cpp b/LibOVR/Src/OVR_Win32_HMDDevice.cpp index 09bddbf..e213691 100644 --- a/LibOVR/Src/OVR_Win32_HMDDevice.cpp +++ b/LibOVR/Src/OVR_Win32_HMDDevice.cpp @@ -5,12 +5,23 @@ Content : Win32 Interface to HMD - detects HMD display Created : September 21, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_HMDDevice.h" @@ -27,17 +38,22 @@ HMDDeviceCreateDesc::HMDDeviceCreateDesc(DeviceFactory* factory, const String& deviceId, const String& displayDeviceName) : DeviceCreateDesc(factory, Device_HMD), DeviceId(deviceId), DisplayDeviceName(displayDeviceName), - DesktopX(0), DesktopY(0), Contents(0), + DesktopX(0), DesktopY(0), Contents(0), EyeToScreenDistance(0), HResolution(0), VResolution(0), HScreenSize(0), VScreenSize(0) { + for (int i=0; i<4; i++) + DistortionK[i] = 0; } HMDDeviceCreateDesc::HMDDeviceCreateDesc(const HMDDeviceCreateDesc& other) : DeviceCreateDesc(other.pFactory, Device_HMD), DeviceId(other.DeviceId), DisplayDeviceName(other.DisplayDeviceName), DesktopX(other.DesktopX), DesktopY(other.DesktopY), Contents(other.Contents), HResolution(other.HResolution), VResolution(other.VResolution), - HScreenSize(other.HScreenSize), VScreenSize(other.VScreenSize) + HScreenSize(other.HScreenSize), VScreenSize(other.VScreenSize), + EyeToScreenDistance(other.EyeToScreenDistance) { + for (int i=0; i<4; i++) + DistortionK[i] = other.DistortionK[i]; } HMDDeviceCreateDesc::MatchResult HMDDeviceCreateDesc::MatchDevice(const DeviceCreateDesc& other, @@ -392,6 +408,7 @@ bool HMDDeviceCreateDesc::GetDeviceInfo(DeviceInfo* info) const if (Contents & Contents_Distortion) { memcpy(hmdInfo->DistortionK, DistortionK, sizeof(float)*4); + hmdInfo->EyeToScreenDistance = EyeToScreenDistance; } else { @@ -414,13 +431,13 @@ bool HMDDeviceCreateDesc::GetDeviceInfo(DeviceInfo* info) const else hmdInfo->EyeToScreenDistance = 0.0387f; } - - hmdInfo->ChromaAbCorrection[0] = 0.996f; - hmdInfo->ChromaAbCorrection[1] = -0.004f; - hmdInfo->ChromaAbCorrection[2] = 1.014f; - hmdInfo->ChromaAbCorrection[3] = 0.0f; } + hmdInfo->ChromaAbCorrection[0] = 0.996f; + hmdInfo->ChromaAbCorrection[1] = -0.004f; + hmdInfo->ChromaAbCorrection[2] = 1.014f; + hmdInfo->ChromaAbCorrection[3] = 0.0f; + OVR_strcpy(hmdInfo->DisplayDeviceName, sizeof(hmdInfo->DisplayDeviceName), DisplayDeviceName.ToCStr()); } diff --git a/LibOVR/Src/OVR_Win32_HMDDevice.h b/LibOVR/Src/OVR_Win32_HMDDevice.h index e4b6657..44e5a97 100644 --- a/LibOVR/Src/OVR_Win32_HMDDevice.h +++ b/LibOVR/Src/OVR_Win32_HMDDevice.h @@ -5,12 +5,23 @@ Content : Win32 HMDDevice implementation Created : September 21, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_HMDDevice_h @@ -61,6 +72,7 @@ protected: unsigned HResolution, VResolution; float HScreenSize, VScreenSize; float DistortionK[4]; + float EyeToScreenDistance; public: HMDDeviceCreateDesc(DeviceFactory* factory, @@ -104,8 +116,10 @@ public: VScreenSize = vsize; Contents |= Contents_Screen; } - void SetDistortion(const float* dks) + void SetDistortion(float eye2screen, const float* dks) { + EyeToScreenDistance = eye2screen; + for (int i = 0; i < 4; i++) DistortionK[i] = dks[i]; Contents |= Contents_Distortion; diff --git a/LibOVR/Src/OVR_Win32_SensorDevice.cpp b/LibOVR/Src/OVR_Win32_SensorDevice.cpp index c69e618..88beb7a 100644 --- a/LibOVR/Src/OVR_Win32_SensorDevice.cpp +++ b/LibOVR/Src/OVR_Win32_SensorDevice.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_SensorDevice.h" @@ -34,8 +45,8 @@ void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo displayInfo.HResolution, displayInfo.VResolution, displayInfo.HScreenSize, displayInfo.VScreenSize); - if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion) - hmdCreateDesc.SetDistortion(displayInfo.DistortionK); + if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) & SensorDisplayInfoImpl::Base_Distortion) + hmdCreateDesc.SetDistortion(displayInfo.EyeToScreenDistance[0], displayInfo.DistortionK); if (displayInfo.HScreenSize > 0.14f) hmdCreateDesc.Set7Inch(); diff --git a/LibOVR/Src/OVR_Win32_SensorDevice.h b/LibOVR/Src/OVR_Win32_SensorDevice.h index 624d3b5..85f478f 100644 --- a/LibOVR/Src/OVR_Win32_SensorDevice.h +++ b/LibOVR/Src/OVR_Win32_SensorDevice.h @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Win32_SensorDevice_h diff --git a/LibOVR/Src/Util/Util_LatencyTest.cpp b/LibOVR/Src/Util/Util_LatencyTest.cpp index 57c2769..b972e48 100644 --- a/LibOVR/Src/Util/Util_LatencyTest.cpp +++ b/LibOVR/Src/Util/Util_LatencyTest.cpp @@ -7,10 +7,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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 "Util_LatencyTest.h" diff --git a/LibOVR/Src/Util/Util_LatencyTest.h b/LibOVR/Src/Util/Util_LatencyTest.h index a01864e..657a3a9 100644 --- a/LibOVR/Src/Util/Util_LatencyTest.h +++ b/LibOVR/Src/Util/Util_LatencyTest.h @@ -8,10 +8,21 @@ Authors : Lee Cooper Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Util_LatencyTest_h diff --git a/LibOVR/Src/Util/Util_Render_Stereo.cpp b/LibOVR/Src/Util/Util_Render_Stereo.cpp index e2600a9..2ff3ef2 100644 --- a/LibOVR/Src/Util/Util_Render_Stereo.cpp +++ b/LibOVR/Src/Util/Util_Render_Stereo.cpp @@ -5,12 +5,23 @@ Content : Stereo rendering configuration implementation Created : October 22, 2012 Authors : Michael Antonov, Andrew Reisse -Copyright : Copyright 2012 Oculus, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus Inc license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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 "Util_Render_Stereo.h" diff --git a/LibOVR/Src/Util/Util_Render_Stereo.h b/LibOVR/Src/Util/Util_Render_Stereo.h index 9ac4002..492080d 100644 --- a/LibOVR/Src/Util/Util_Render_Stereo.h +++ b/LibOVR/Src/Util/Util_Render_Stereo.h @@ -6,12 +6,23 @@ Content : Sample stereo rendering configuration classes. Created : October 22, 2012 Authors : Michael Antonov -Copyright : Copyright 2012 Oculus, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus Inc license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR 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-2.0 + +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_Util_Render_Stereo_h |