Commit 249d9999 authored by Sylvain's avatar Sylvain
Browse files

minor optim String3D::drawAll

parent 7d229848
......@@ -256,14 +256,18 @@ void Strings3D::draw(unsigned int idSt, const Geom::Vec3f& pos)
void Strings3D::drawAll(const Geom::Vec3f& color)
unsigned int nb = m_strpos.size();
// nothing to do if no string !
if (nb == 0)
if (m_strpos.size() != m_strTranslate.size())
CGoGNerr << "Strings3D: for drawAll use exclusively addString with position"<< CGoGNendl;
unsigned int nb = m_strpos.size();
for (unsigned int idSt=0; idSt<nb; ++idSt)
glUniform3fv(*m_uniform_position, 1, m_strTranslate[idSt].data());
Supports Markdown
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