Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libRendering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STORM
repos
Radium
libRendering
Commits
bb2214c3
Commit
bb2214c3
authored
4 years ago
by
Mathias Paulin
Browse files
Options
Downloads
Patches
Plain Diff
Fix envmap opengl initialisation
parent
6753d808
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libRender/RadiumNBR/Renderer/Visualization.cpp
+6
-3
6 additions, 3 deletions
src/libRender/RadiumNBR/Renderer/Visualization.cpp
src/libRender/RadiumNBR/Renderer/Visualization.hpp
+5
-0
5 additions, 0 deletions
src/libRender/RadiumNBR/Renderer/Visualization.hpp
with
11 additions
and
3 deletions
src/libRender/RadiumNBR/Renderer/Visualization.cpp
+
6
−
3
View file @
bb2214c3
...
...
@@ -80,6 +80,8 @@ void VisualizationController::update( const Ra::Engine::Data::ViewingParameters&
auto
defColor
=
Ra
::
Core
::
Utils
::
Color
::
linearRGBTosRGB
(
m_renderer
->
getBackgroundColor
()
);
m_clearPass
->
setBackground
(
defColor
);
}
// TODO : do this only once ?
if
(
m_envmap
)
{
m_envmap
->
updateGL
();
}
};
void
VisualizationController
::
resize
(
int
w
,
int
h
){
...
...
@@ -125,6 +127,7 @@ void VisualizationController::setEnvMap( const std::string& files ) {
m_clearPass
->
setEnvMap
(
nullptr
);
m_customPass
->
setEnvMap
(
nullptr
);
m_hasEnvMap
=
false
;
m_envmap
=
nullptr
;
}
else
{
...
...
@@ -138,9 +141,9 @@ void VisualizationController::setEnvMap( const std::string& files ) {
if
(
ext
!=
"pfm"
)
{
t
=
EnvMap
::
EnvMapType
::
ENVMAP_LATLON
;
}
}
// for now, only skyboxes are managed
auto
e
=
std
::
make_shared
<
EnvMap
>
(
files
,
t
,
true
);
m_clearPass
->
setEnvMap
(
e
);
m_customPass
->
setEnvMap
(
e
);
m_envmap
=
std
::
make_shared
<
EnvMap
>
(
files
,
t
,
true
);
m_clearPass
->
setEnvMap
(
m_envmap
);
m_customPass
->
setEnvMap
(
m_envmap
);
m_hasEnvMap
=
true
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/libRender/RadiumNBR/Renderer/Visualization.hpp
+
5
−
0
View file @
bb2214c3
#include
<RadiumNBR/NodeBasedRenderer.hpp>
#include
<RadiumNBR/EnvMap.hpp>
namespace
RadiumNBR
{
class
CustomAttribToColorPass
;
class
ClearPass
;
...
...
@@ -74,6 +76,9 @@ class NodeBasedRenderer_LIBRARY_API VisualizationController
/// Is an envmap attached to the renderer
bool
m_hasEnvMap
{
false
};
/// The Environment to used for skybox display
std
::
shared_ptr
<
EnvMap
>
m_envmap
{
nullptr
};
};
}
// namespace RadiumNBR
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment