Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ACGL
acgl
Commits
8de5f833
Commit
8de5f833
authored
Aug 01, 2014
by
Robert Menzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility with VStudio 2012
parent
5e5b9bf5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
include/ACGL/Scene/OculusRiftCamera.hh
include/ACGL/Scene/OculusRiftCamera.hh
+1
-1
include/ACGL/Utils/MemoryMappedFile.hh
include/ACGL/Utils/MemoryMappedFile.hh
+2
-2
src/ACGL/OpenGL/Data/TextureData.cc
src/ACGL/OpenGL/Data/TextureData.cc
+14
-14
src/ACGL/Scene/OculusRiftCamera.cc
src/ACGL/Scene/OculusRiftCamera.cc
+1
-1
src/ACGL/Utils/MemoryMappedFile.cc
src/ACGL/Utils/MemoryMappedFile.cc
+1
-1
No files found.
include/ACGL/Scene/OculusRiftCamera.hh
View file @
8de5f833
...
...
@@ -65,7 +65,7 @@ private:
ACGL_SMARTPOINTER_TYPEDEFS
(
OculusRiftCamera
)
}
}
#el
se
#el
if ACGL_RIFT_SDK_VERSION >= 40
// SDK 0.4 or later:
#include <ACGL/ACGL.hh>
...
...
include/ACGL/Utils/MemoryMappedFile.hh
View file @
8de5f833
...
...
@@ -40,9 +40,9 @@ namespace ACGL{
private:
#ifdef _WIN32
MemoryMappedFileWinImpl
*
mpMMFileImpl
=
nullptr
;
MemoryMappedFileWinImpl
*
mpMMFileImpl
;
#else
MemoryMappedFilePosixImpl
*
mpMMFileImpl
=
nullptr
;
MemoryMappedFilePosixImpl
*
mpMMFileImpl
;
#endif
public:
...
...
src/ACGL/OpenGL/Data/TextureData.cc
View file @
8de5f833
...
...
@@ -316,30 +316,30 @@ glm::vec4 convertTexelNumChannels(glm::vec4 _texel, GLsizei _from, GLsizei _to)
}
else
if
(
_from
==
1
)
{
switch
(
_to
)
{
case
2
:
return
{
_texel
.
r
,
1.0
,
0.0
,
0.0
}
;
case
3
:
return
{
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
0.0
}
;
case
4
:
return
{
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
1.0
}
;
case
2
:
return
glm
::
vec4
(
_texel
.
r
,
1.0
,
0.0
,
0.0
)
;
case
3
:
return
glm
::
vec4
(
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
0.0
)
;
case
4
:
return
glm
::
vec4
(
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
1.0
)
;
}
}
else
if
(
_from
==
2
)
{
switch
(
_to
)
{
case
1
:
return
{
_texel
.
r
,
0.0
,
0.0
,
0.0
}
;
case
3
:
return
{
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
_texel
.
g
}
;
case
4
:
return
{
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
_texel
.
g
}
;
case
1
:
return
glm
::
vec4
(
_texel
.
r
,
0.0
,
0.0
,
0.0
)
;
case
3
:
return
glm
::
vec4
(
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
_texel
.
g
)
;
case
4
:
return
glm
::
vec4
(
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
_texel
.
g
)
;
}
}
else
if
(
_from
==
3
)
{
switch
(
_to
)
{
case
1
:
return
{
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
0.0
,
0.0
,
0.0
}
;
case
2
:
return
{
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
1.0
,
0.0
,
0.0
}
;
case
4
:
return
{
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
1.0
}
;
case
1
:
return
glm
::
vec4
(
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
0.0
,
0.0
,
0.0
)
;
case
2
:
return
glm
::
vec4
(
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
1.0
,
0.0
,
0.0
)
;
case
4
:
return
glm
::
vec4
(
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
1.0
)
;
}
}
else
if
(
_from
==
4
)
{
switch
(
_to
)
{
case
1
:
return
{
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
0.0
,
0.0
,
0.0
}
;
case
2
:
return
{
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
1.0
,
0.0
,
0.0
}
;
case
3
:
return
{
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
0.0
}
;
case
1
:
return
glm
::
vec4
(
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
0.0
,
0.0
,
0.0
)
;
case
2
:
return
glm
::
vec4
(
grayscaleMixdown
(
_texel
.
r
,
_texel
.
g
,
_texel
.
b
),
1.0
,
0.0
,
0.0
)
;
case
3
:
return
glm
::
vec4
(
_texel
.
r
,
_texel
.
r
,
_texel
.
r
,
0.0
)
;
}
}
return
_texel
;
...
...
@@ -367,8 +367,8 @@ void convertTextureData(const SharedTextureData& _from, const SharedTextureData&
// Transfer pixels
for
(
GLsizei
y
=
0
;
y
<
_to
->
getHeight
();
++
y
)
{
for
(
GLsizei
x
=
0
;
x
<
_to
->
getWidth
();
++
x
)
{
auto
texel
=
convertTexelNumChannels
(
_from
->
getTexel
(
{
x
,
y
}
),
_from
->
getNumberOfChannels
(),
_to
->
getNumberOfChannels
());
_to
->
setTexel
(
{
x
,
y
}
,
texel
);
auto
texel
=
convertTexelNumChannels
(
_from
->
getTexel
(
glm
::
uvec2
(
x
,
y
)
),
_from
->
getNumberOfChannels
(),
_to
->
getNumberOfChannels
());
_to
->
setTexel
(
glm
::
uvec2
(
x
,
y
)
,
texel
);
}
}
}
...
...
src/ACGL/Scene/OculusRiftCamera.cc
View file @
8de5f833
...
...
@@ -142,7 +142,7 @@ glm::uvec2 OculusRiftCamera::getViewportSize() const
}
}
#el
se
#el
if ACGL_RIFT_SDK_VERSION >= 40
// 0.4 version:
namespace
ACGL
{
...
...
src/ACGL/Utils/MemoryMappedFile.cc
View file @
8de5f833
...
...
@@ -25,7 +25,7 @@ ACGL::Utils::MemoryMappedFile::MemoryMappedFile(
accessMode
_accessMode
,
shareMode
_shareMode
,
size_t
_length
,
off_t
_offset
)
off_t
_offset
)
:
mpMMFileImpl
(
NULL
)
{
#ifdef _WIN32
mpMMFileImpl
=
new
MemoryMappedFileWinImpl
(
_fileName
,
_accessMode
,
_shareMode
,
_length
,
_offset
);
...
...
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