Commit 6cb025e5 authored by Martin Schultz's avatar Martin Schultz

fixed old shaders were used in core profile.

parent 73f2f6dd
......@@ -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();
......
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