Commit e438a3b0 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'featureCoreProfile' into 'master'

fixed old shaders were used in core profile.

See merge request !9
parents 73f2f6dd 6cb025e5
...@@ -165,15 +165,17 @@ void VolumeMeshObject<MeshT>::init() { ...@@ -165,15 +165,17 @@ void VolumeMeshObject<MeshT>::init() {
std::string shaderDirectory = std::string( shaderDir.toUtf8() ); std::string shaderDirectory = std::string( shaderDir.toUtf8() );
shaderNode_->setShaderDir( shaderDirectory ); 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" ); if ( QFile( shaderDir + "Phong/Vertex.glsl").exists() && QFile( shaderDir + "Phong/Fragment.glsl" ).exists() )
shaderNode_->setShader(drawModes.facesPhongShaded, "Phong/Vertex.glsl" , "Phong/Fragment.glsl" ); {
shaderNode_->setShader(drawModes.halffacesPhongShaded,"Phong/Vertex.glsl" , "Phong/Fragment.glsl" ); 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 all nodes
update(); update();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment