Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
Type-OpenVolumeMesh
Commits
6cb025e5
Commit
6cb025e5
authored
Feb 13, 2018
by
Martin Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed old shaders were used in core profile.
parent
73f2f6dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
ObjectTypes/VolumeMeshObject/VolumeMeshObjectT.cc
ObjectTypes/VolumeMeshObject/VolumeMeshObjectT.cc
+9
-7
No files found.
ObjectTypes/VolumeMeshObject/VolumeMeshObjectT.cc
View file @
6cb025e5
...
...
@@ -165,15 +165,17 @@ void VolumeMeshObject<MeshT>::init() {
std
::
string
shaderDirectory
=
std
::
string
(
shaderDir
.
toUtf8
()
);
shaderNode_
->
setShaderDir
(
shaderDirectory
);
if
(
QFile
(
shaderDir
+
"Phong/Vertex.glsl"
).
exists
()
&&
QFile
(
shaderDir
+
"Phong/Fragment.glsl"
).
exists
()
)
if
(
!
OpenFlipper
::
Options
::
coreProfile
())
{
shaderNode_
->
setShader
(
drawModes
.
cellsPhongShaded
,
"Phong/Vertex.glsl"
,
"Phong/Fragment.glsl"
);
shaderNode_
->
setShader
(
drawModes
.
facesPhongShaded
,
"Phong/Vertex.glsl"
,
"Phong/Fragment.glsl"
);
shaderNode_
->
setShader
(
drawModes
.
halffacesPhongShaded
,
"Phong/Vertex.glsl"
,
"Phong/Fragment.glsl"
);
if
(
QFile
(
shaderDir
+
"Phong/Vertex.glsl"
).
exists
()
&&
QFile
(
shaderDir
+
"Phong/Fragment.glsl"
).
exists
()
)
{
shaderNode_
->
setShader
(
drawModes
.
cellsPhongShaded
,
"Phong/Vertex.glsl"
,
"Phong/Fragment.glsl"
);
shaderNode_
->
setShader
(
drawModes
.
facesPhongShaded
,
"Phong/Vertex.glsl"
,
"Phong/Fragment.glsl"
);
shaderNode_
->
setShader
(
drawModes
.
halffacesPhongShaded
,
"Phong/Vertex.glsl"
,
"Phong/Fragment.glsl"
);
}
else
std
::
cerr
<<
"Shader Files for Phong not found!"
<<
std
::
endl
;
}
else
std
::
cerr
<<
"Shader Files for Phong not found!"
<<
std
::
endl
;
// Update all nodes
update
();
...
...
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