Commit cb10c2d5 authored by Martin Schultz's avatar Martin Schultz

also use shader generator for polylinecollections (untested)

parent f1bb6259
......@@ -368,8 +368,10 @@ pick_vertices(GLState &_state)
float point_size_old = _state.point_size();
glPointSize(point_size_old+3.0f);
GLSL::Program* pickVertexShader = ACG::ShaderCache::getInstance()->getProgram("Picking/pick_vertices_vs.glsl", "Picking/pick_vertices_fs.glsl");
static ShaderGenDesc desc;
desc.vertexTemplateFile = "Picking/pick_vertices_vs.glsl";
desc.fragmentTemplateFile = "Picking/pick_vertices_fs.glsl";
GLSL::Program* pickVertexShader = ACG::ShaderCache::getInstance()->getProgram(&desc, nullptr);
if (pickVertexShader && pickVertexShader->isLinked())
{
......@@ -447,7 +449,18 @@ pick_edges(GLState &_state, unsigned int _offset)
float line_width_old = _state.line_width();
glLineWidth(line_width_old+3.0f);
GLSL::Program* pickEdgeShader = ACG::ShaderCache::getInstance()->getProgram("Picking/vertex.glsl", "Picking/pick_vertices_fs2.glsl");
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* pickEdgeShader = ACG::ShaderCache::getInstance()->getProgram(&desc, nullptr);
if (pickEdgeShader && pickEdgeShader->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