Commit d9d9badc authored by Sylvain Thery's avatar Sylvain Thery

bug corrections

parent 8433dead
......@@ -129,12 +129,7 @@ public:
/**
* use as a glCallList
*/
void callList();
/**
* use as a glCallList
*/
void callList(float opacity) { m_shader->setOpacity(opacity); callList(); }
void callList(float opacity = 1.0f);
/**
* use as glLineWidth
......
......@@ -130,7 +130,7 @@ public:
*/
void drawAll(const Geom::Vec4f& color);
void drawAll(const Geom::Vec3f& color){ drawAll( Geom::Vec4f(color[0],color[1],color[2],1.0f)); }
void drawAll(const Geom::Vec3f& color){ drawAll( Geom::Vec4f(color[0],color[1],color[2],m_color[3])); }
/**
......@@ -139,7 +139,7 @@ public:
*/
void predraw(const Geom::Vec4f& color);
void predraw(const Geom::Vec3f& color){ predraw( Geom::Vec4f(color[0],color[1],color[2],1.0f)); }
void predraw(const Geom::Vec3f& color){ predraw( Geom::Vec4f(color[0],color[1],color[2],m_color[3])); }
/**
......@@ -148,7 +148,7 @@ public:
*/
void changeColor(const Geom::Vec4f& color);
void changeColor(const Geom::Vec3f& color){ changeColor( Geom::Vec4f(color[0],color[1],color[2],1.0f)); }
void changeColor(const Geom::Vec3f& color){ changeColor( Geom::Vec4f(color[0],color[1],color[2],m_color[3])); }
/**
* change opacity but keep color (0 is totally transparent 1 is totally opaque)
......
......@@ -171,6 +171,8 @@ void Drawer::callList(float opacity)
if (m_begins.empty())
return;
m_shader->setOpacity(opacity);
m_shader->enableVertexAttribs();
for (std::vector<PrimParam>::iterator pp = m_begins.begin(); pp != m_begins.end(); ++pp)
{
......@@ -184,6 +186,7 @@ void Drawer::callList(float opacity)
}
void Drawer::toSVG(Utils::SVG::SVGOut& svg)
{
const Geom::Vec3f* ptrP = reinterpret_cast<Geom::Vec3f*>(m_vboPos->lockPtr());
......
......@@ -106,6 +106,8 @@ Strings3D::Strings3D(bool withBackground, const Geom::Vec3f& bgc, bool with_plan
*m_uniform_planeY = glGetUniformLocation(program_handler(), "planeY");
}
unbind();
m_color = Geom::Vec4f(0.0f,0.0f,0.0f,1.0f);
}
void Strings3D::setScale(float scale)
......
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