Commit 81a020c9 authored by Sylvain Thery's avatar Sylvain Thery

small bugs

parent 629a9b28
......@@ -536,8 +536,11 @@ void MapRender::initPrimitives(typename PFP::MAP& map, int prim, const VertexAtt
m_indexBufferUpToDate[prim] = true;
// setup du buffer d'indices
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[prim]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_nbIndices[prim] * sizeof(GLuint), &(tableIndices[0]), GL_STREAM_DRAW);
if (m_nbIndices[prim] > 0)
{
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[prim]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_nbIndices[prim] * sizeof(GLuint), &(tableIndices[0]), GL_STREAM_DRAW);
}
}
template <typename PFP>
......
......@@ -243,7 +243,7 @@ void Surface_RenderVector_DockTab::updateMapParameters()
++i;
}
}
if (m_current_vbo >= 0)
if ((m_current_vbo >= 0) && (m_current_vbo<p.vectorVBOs.size()))
{
slider_vectorsScaleFactor->setSliderPosition(p.scaleFactors[m_current_vbo] * 50.0f);
combo_color->setColor(p.colors[m_current_vbo]);
......
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