do not invalidate buffer, leave as is
This commit is contained in:
parent
f01a02be9a
commit
f2ec5b0ff3
@ -214,14 +214,8 @@ void LineShader::update_vbos(enum GraphicElement::style_t style,
|
|||||||
buffers_[style].last_vbo_update = line.last_render;
|
buffers_[style].last_vbo_update = line.last_render;
|
||||||
|
|
||||||
buffers_[style].indices = line.indices.size();
|
buffers_[style].indices = line.indices.size();
|
||||||
if (buffers_[style].indices == 0) {
|
if (buffers_[style].indices == 0)
|
||||||
// invalidate buffers
|
|
||||||
buffers_[style].position.allocate(nullptr, 0);
|
|
||||||
buffers_[style].normal.allocate(nullptr, 0);
|
|
||||||
buffers_[style].miter.allocate(nullptr, 0);
|
|
||||||
buffers_[style].index.allocate(nullptr, 0);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
buffers_[style].position.bind();
|
buffers_[style].position.bind();
|
||||||
buffers_[style].position.allocate(&line.vertices[0], sizeof(Vertex2DPOD) * line.vertices.size());
|
buffers_[style].position.allocate(&line.vertices[0], sizeof(Vertex2DPOD) * line.vertices.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user