Commit f1bb6259 authored by Martin Schultz's avatar Martin Schultz

use the shadergenerator for the picking shaders.

parent 991627ec
......@@ -455,7 +455,10 @@ pick_vertices( GLState& _state )
glDepthRange(0.0, 0.999999);
GLSL::Program* pickShader = ACG::ShaderCache::getInstance()->getProgram("Picking/pick_vertices_vs.glsl", "Picking/pick_vertices_fs.glsl", 0, false);
static ShaderGenDesc desc;
desc.vertexTemplateFile = "Picking/pick_vertices_vs.glsl";
desc.fragmentTemplateFile = "Picking/pick_vertices_fs.glsl";
GLSL::Program* pickShader = ACG::ShaderCache::getInstance()->getProgram(&desc, nullptr);
if (pickShader && pickShader->isLinked())
{
......@@ -567,7 +570,18 @@ pick_edges( GLState& _state, unsigned int _offset)
glDepthRange(0.0, 0.999999);
GLSL::Program* pickShader = ACG::ShaderCache::getInstance()->getProgram("Picking/vertex.glsl", "Picking/pick_vertices_fs2.glsl", 0, false);
static ShaderGenDesc desc;
if(ACG::openGLVersionTest(3,2))
{
desc.vertexTemplateFile = "Picking/vertex.glsl";
desc.fragmentTemplateFile = "Picking/pick_vertices_fs2.glsl";
}
else
{
desc.vertexTemplateFile = "Picking/pick_vertices_vs.glsl";
desc.fragmentTemplateFile = "Picking/pick_vertices_fs.glsl";
}
GLSL::Program* pickShader = ACG::ShaderCache::getInstance()->getProgram(&desc, nullptr);
if (pickShader && pickShader->isLinked())
{
......
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