Commit 8cb0d143 authored by sylvain thery's avatar sylvain thery

GLbug on intel HD4400

parent 329e575f
......@@ -73,22 +73,6 @@ void Surface_Render_Plugin::drawMap(View* view, MapHandlerGen* map)
const MapParameters& p = h_viewParameterSet[view][map];
if(p.positionVBO)
{
if(p.renderVertices)
{
m_pointSprite->setSize(map->getBBdiagSize() / 200.0f * p.verticesScaleFactor);
m_pointSprite->setAttributePosition(p.positionVBO);
m_pointSprite->setColor(p.vertexColor);
map->draw(m_pointSprite, CGoGN::Algo::Render::GL2::POINTS);
}
if(p.renderEdges)
{
glLineWidth(1.0f);
CGoGN::Geom::Vec4f c(0.1f, 0.1f, 0.1f, 1.0f);
m_simpleColorShader->setColor(c);
m_simpleColorShader->setAttributePosition(p.positionVBO);
m_simpleColorShader->setColor(p.simpleColor);
map->draw(m_simpleColorShader, CGoGN::Algo::Render::GL2::LINES);
}
if(p.renderFaces)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
......@@ -114,6 +98,23 @@ void Surface_Render_Plugin::drawMap(View* view, MapHandlerGen* map)
}
glDisable(GL_POLYGON_OFFSET_FILL);
}
if(p.renderVertices)
{
m_pointSprite->setSize(map->getBBdiagSize() / 200.0f * p.verticesScaleFactor);
m_pointSprite->setAttributePosition(p.positionVBO);
m_pointSprite->setColor(p.vertexColor);
map->draw(m_pointSprite, CGoGN::Algo::Render::GL2::POINTS);
}
if(p.renderEdges)
{
glLineWidth(1.0f);
CGoGN::Geom::Vec4f c(0.1f, 0.1f, 0.1f, 1.0f);
m_simpleColorShader->setColor(c);
m_simpleColorShader->setAttributePosition(p.positionVBO);
m_simpleColorShader->setColor(p.simpleColor);
map->draw(m_simpleColorShader, CGoGN::Algo::Render::GL2::LINES);
}
if(p.renderBoundary)
{
glLineWidth(5.0f);
......
......@@ -65,8 +65,8 @@ std::string GLSLShader::DEFINES_GL3=\
"#version 150\n"
"#define PRECISON precision highp float\n"
"#define ATTRIBUTE in\n"
"#define VARYING_VERT smooth out\n"
"#define VARYING_FRAG smooth in\n"
"#define VARYING_VERT out\n"
"#define VARYING_FRAG in\n"
"#define FRAG_OUT_DEF out vec4 outFragColor\n"
"#define FRAG_OUT outFragColor\n"
"#define INVARIANT_POS invariant gl_Position\n";
......@@ -134,8 +134,8 @@ std::string GLSLShader::defines_Geom(const std::string& primitivesIn, const std:
ss << maxVert;
str.append(ss.str());
str.append(") out;\n");
str.append("#define VARYING_IN smooth in\n");
str.append("#define VARYING_OUT smooth out\n");
str.append("#define VARYING_IN in\n");
str.append("#define VARYING_OUT out\n");
str.append("#define POSITION_IN(X) gl_in[X].gl_Position\n");
str.append("#define NBVERTS_IN gl_in.length()\n");
return str;
......
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