Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
stitchEm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Franco (nextime) Lanza
stitchEm
Commits
3409dd1d
Commit
3409dd1d
authored
Nov 12, 2019
by
Jeremy Tellaa
Committed by
jeremad
Dec 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(apps): fix app compilation on windows
parent
ae2aee72
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
21 deletions
+25
-21
export.cpp
IO/src/ximea_2/export.cpp
+2
-2
steamvrrenderer.cpp
apps/src/libvideostitch-base/steamvrrenderer.cpp
+19
-16
CUDA.cmake
cmake/CUDA.cmake
+1
-1
device.cpp
discovery/src/device.cpp
+1
-1
cmdUtils.cpp
lib/samples/common/cmdUtils.cpp
+2
-0
CMakeLists.txt
lib/src/test/CMakeLists.txt
+0
-1
No files found.
IO/src/ximea_2/export.cpp
View file @
3409dd1d
...
...
@@ -12,9 +12,9 @@
#include "ximeaDiscovery.hpp"
#include "ximeaReader.hpp"
#ifdef
_MSC_VER
#ifdef
DELAY_LOAD_ENABLED
SET_DELAY_LOAD_HOOK
#endif //
_MSC_VER
#endif //
DELAY_LOAD_ENABLED
extern
"C"
VS_PLUGINS_EXPORT
VideoStitch
::
Potential
<
VideoStitch
::
Input
::
Reader
>*
__cdecl
createReaderFn
(
const
VideoStitch
::
Ptv
::
Value
*
config
,
VideoStitch
::
Plugin
::
VSReaderPlugin
::
Config
runtime
)
{
...
...
apps/src/libvideostitch-base/steamvrrenderer.cpp
View file @
3409dd1d
...
...
@@ -196,7 +196,7 @@ Matrix4 SteamVRRenderer::getHMDMatrixProjectionEye(vr::Hmd_Eye eye) {
return
Matrix4
();
}
vr
::
HmdMatrix44_t
mat
=
hmd
->
GetProjectionMatrix
(
eye
,
nearClip
,
farClip
,
vr
::
API_OpenGL
);
vr
::
HmdMatrix44_t
mat
=
hmd
->
GetProjectionMatrix
(
eye
,
nearClip
,
farClip
);
return
Matrix4
(
mat
.
m
[
0
][
0
],
mat
.
m
[
1
][
0
],
mat
.
m
[
2
][
0
],
mat
.
m
[
3
][
0
],
mat
.
m
[
0
][
1
],
mat
.
m
[
1
][
1
],
mat
.
m
[
2
][
1
],
mat
.
m
[
3
][
1
],
mat
.
m
[
0
][
2
],
mat
.
m
[
1
][
2
],
mat
.
m
[
2
][
2
],
mat
.
m
[
3
][
2
],
mat
.
m
[
0
][
3
],
mat
.
m
[
1
][
3
],
mat
.
m
[
2
][
3
],
mat
.
m
[
3
][
3
]);
...
...
@@ -284,10 +284,11 @@ void SteamVRRenderer::setupDistortion() {
u
=
x
*
w
;
v
=
1
-
y
*
h
;
vert
.
position
=
Vector2
(
Xoffset
+
u
,
-
1
+
2
*
y
*
h
);
vr
::
DistortionCoordinates_t
dc0
=
hmd
->
ComputeDistortion
(
vr
::
Eye_Left
,
u
,
v
);
vert
.
texCoordRed
=
Vector2
(
dc0
.
rfRed
[
0
],
1
-
dc0
.
rfRed
[
1
]);
vert
.
texCoordGreen
=
Vector2
(
dc0
.
rfGreen
[
0
],
1
-
dc0
.
rfGreen
[
1
]);
vert
.
texCoordBlue
=
Vector2
(
dc0
.
rfBlue
[
0
],
1
-
dc0
.
rfBlue
[
1
]);
vr
::
DistortionCoordinates_t
*
dc0
;
hmd
->
ComputeDistortion
(
vr
::
Eye_Left
,
u
,
v
,
dc0
);
vert
.
texCoordRed
=
Vector2
(
dc0
->
rfRed
[
0
],
1
-
dc0
->
rfRed
[
1
]);
vert
.
texCoordGreen
=
Vector2
(
dc0
->
rfGreen
[
0
],
1
-
dc0
->
rfGreen
[
1
]);
vert
.
texCoordBlue
=
Vector2
(
dc0
->
rfBlue
[
0
],
1
-
dc0
->
rfBlue
[
1
]);
vertices
.
push_back
(
vert
);
}
}
...
...
@@ -299,10 +300,11 @@ void SteamVRRenderer::setupDistortion() {
u
=
x
*
w
;
v
=
1
-
y
*
h
;
vert
.
position
=
Vector2
(
Xoffset
+
u
,
-
1
+
2
*
y
*
h
);
vr
::
DistortionCoordinates_t
dc0
=
hmd
->
ComputeDistortion
(
vr
::
Eye_Right
,
u
,
v
);
vert
.
texCoordRed
=
Vector2
(
dc0
.
rfRed
[
0
],
1
-
dc0
.
rfRed
[
1
]);
vert
.
texCoordGreen
=
Vector2
(
dc0
.
rfGreen
[
0
],
1
-
dc0
.
rfGreen
[
1
]);
vert
.
texCoordBlue
=
Vector2
(
dc0
.
rfBlue
[
0
],
1
-
dc0
.
rfBlue
[
1
]);
vr
::
DistortionCoordinates_t
*
dc0
;
hmd
->
ComputeDistortion
(
vr
::
Eye_Right
,
u
,
v
,
dc0
);
vert
.
texCoordRed
=
Vector2
(
dc0
->
rfRed
[
0
],
1
-
dc0
->
rfRed
[
1
]);
vert
.
texCoordGreen
=
Vector2
(
dc0
->
rfGreen
[
0
],
1
-
dc0
->
rfGreen
[
1
]);
vert
.
texCoordBlue
=
Vector2
(
dc0
->
rfBlue
[
0
],
1
-
dc0
->
rfBlue
[
1
]);
vertices
.
push_back
(
vert
);
}
}
...
...
@@ -668,9 +670,10 @@ void SteamVRRenderer::render() {
renderStereoTargets
();
renderDistortion
();
vr
::
Texture_t
leftEyeTexture
=
{(
void
*
)
leftEyeDesc
.
resolveTextureId
,
vr
::
API
_OpenGL
,
vr
::
ColorSpace_Gamma
};
vr
::
Texture_t
leftEyeTexture
=
{(
void
*
)
leftEyeDesc
.
resolveTextureId
,
vr
::
TextureType
_OpenGL
,
vr
::
ColorSpace_Gamma
};
vr
::
VRCompositor
()
->
Submit
(
vr
::
Eye_Left
,
&
leftEyeTexture
);
vr
::
Texture_t
rightEyeTexture
=
{(
void
*
)
rightEyeDesc
.
resolveTextureId
,
vr
::
API_OpenGL
,
vr
::
ColorSpace_Gamma
};
vr
::
Texture_t
rightEyeTexture
=
{(
void
*
)
rightEyeDesc
.
resolveTextureId
,
vr
::
TextureType_OpenGL
,
vr
::
ColorSpace_Gamma
};
vr
::
VRCompositor
()
->
Submit
(
vr
::
Eye_Right
,
&
rightEyeTexture
);
}
...
...
@@ -794,9 +797,9 @@ void SteamVRRenderer::renderVideoFrame(vr::Hmd_Eye eye) {
}
}
bool
isInput
CapturedByAnotherProcess
=
hmd
->
IsInputFocusCapturedByAnotherProcess
();
bool
isInput
Available
=
hmd
->
IsInputAvailable
();
if
(
!
isInputCapturedByAnotherProcess
)
{
if
(
isInputAvailable
)
{
// draw the controller axis lines
glUseProgram
(
controllerTransformProgramID
);
glUniformMatrix4fv
(
controllerMatrixLocation
,
1
,
GL_FALSE
,
getCurrentViewProjectionMatrix
(
eye
).
get
());
...
...
@@ -818,7 +821,7 @@ void SteamVRRenderer::renderVideoFrame(vr::Hmd_Eye eye) {
continue
;
}
if
(
isInputCapturedByAnotherProcess
&&
if
(
!
isInputAvailable
&&
hmd
->
GetTrackedDeviceClass
(
trackedDevice
)
==
vr
::
TrackedDeviceClass_Controller
)
{
continue
;
}
...
...
@@ -872,7 +875,7 @@ void SteamVRRenderer::renderDistortion() {
void
SteamVRRenderer
::
drawControllers
()
{
// don't draw controllers if somebody else has input focus
if
(
hmd
->
IsInputFocusCapturedByAnotherProcess
())
{
if
(
!
hmd
->
IsInputAvailable
())
{
return
;
}
...
...
@@ -1007,7 +1010,7 @@ void SteamVRRenderer::updateHMDMatrixPose() {
case
vr
:
:
TrackedDeviceClass_Invalid
:
devClassChar
[
device
]
=
'I'
;
break
;
case
vr
:
:
TrackedDeviceClass_
Oth
er
:
case
vr
:
:
TrackedDeviceClass_
GenericTrack
er
:
devClassChar
[
device
]
=
'O'
;
break
;
case
vr
:
:
TrackedDeviceClass_TrackingReference
:
...
...
cmake/CUDA.cmake
View file @
3409dd1d
...
...
@@ -27,7 +27,7 @@ if (WINDOWS)
include_directories
(
"
${
NVIDIA_VIDEO_CODEC
}
\\
include"
)
find_library
(
CUDA cuda PATHS
"
${
CUDA_TOOLKIT_ROOT_DIR
}
/lib/x64"
NO_DEFAULT_PATH
)
find_library
(
CUDART cudart PATHS
"
${
CUDA_TOOLKIT_ROOT_DIR
}
/lib/x64"
NO_DEFAULT_PATH
)
find_library
(
CUVID nvcuvid PATHS
"
${
NVIDIA_VIDEO_CODEC
}
\\
Lib
\\
Win32
"
)
find_library
(
CUVID nvcuvid PATHS
"
${
NVIDIA_VIDEO_CODEC
}
\\
Lib
\\
x64
"
)
find_library
(
NVML nvml PATHS
"
${
CUDA_TOOLKIT_ROOT_DIR
}
/lib/x64"
NO_DEFAULT_PATH
)
endif
(
WINDOWS
)
...
...
discovery/src/device.cpp
View file @
3409dd1d
...
...
@@ -233,7 +233,7 @@ FrameworkStatus DevicesInfo::getFrameworkStatus(Framework framework) const {
}
DevicesInfo
::
DevicesInfo
()
{
#ifdef
_MSC_VER
#ifdef
DELAY_LOAD_ENABLED
PfnDliHook
currentFailHook
=
__pfnDliFailureHook2
;
__pfnDliFailureHook2
=
failDelayHook
;
try
{
...
...
lib/samples/common/cmdUtils.cpp
View file @
3409dd1d
...
...
@@ -27,7 +27,9 @@
#ifdef _MSC_VER
#include <libgpudiscovery/delayLoad.hpp>
#ifdef DELAY_LOAD_ENABLED
SET_DELAY_LOAD_HOOK
#endif // DELAY_LOAD_ENABLED
FARPROC
WINAPI
delayFailureHook
(
unsigned
dliNotify
,
PDelayLoadInfo
pdli
)
{
switch
(
dliNotify
)
{
case
dliFailLoadLib
:
...
...
lib/src/test/CMakeLists.txt
View file @
3409dd1d
...
...
@@ -26,7 +26,6 @@ file(MAKE_DIRECTORY ${VS_TEST_DATA_DIR})
if
(
WINDOWS
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4100 /wd4244 /wd4245 /wd4267 /wd4305 /wd4309 /wd4324"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
/LTCG"
)
STRING
(
REPLACE
"INCREMENTAL"
"INCREMENTAL:NO"
CMAKE_EXE_LINKER_FLAGS_DEBUG
${
CMAKE_EXE_LINKER_FLAGS_DEBUG
}
)
endif
(
WINDOWS
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment