aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-10-25 20:33:49 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-10-25 20:33:49 +0200
commitf2ec5b0ff31c84f581ab0cd6c16043f3622587d2 (patch)
tree3601384d2bc6638d23220ed8bced2bd20dffa5fe /gui
parentf01a02be9accb5807879febf9fa77fe6fdfd6bd5 (diff)
downloadnextpnr-f2ec5b0ff31c84f581ab0cd6c16043f3622587d2.tar.gz
nextpnr-f2ec5b0ff31c84f581ab0cd6c16043f3622587d2.tar.bz2
nextpnr-f2ec5b0ff31c84f581ab0cd6c16043f3622587d2.zip
do not invalidate buffer, leave as is
Diffstat (limited to 'gui')
-rw-r--r--gui/lineshader.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/gui/lineshader.cc b/gui/lineshader.cc
index 0f762b38..fc726df5 100644
--- a/gui/lineshader.cc
+++ b/gui/lineshader.cc
@@ -214,14 +214,8 @@ void LineShader::update_vbos(enum GraphicElement::style_t style,
buffers_[style].last_vbo_update = line.last_render;
buffers_[style].indices = line.indices.size();
- 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);
+ if (buffers_[style].indices == 0)
return;
- }
buffers_[style].position.bind();
buffers_[style].position.allocate(&line.vertices[0], sizeof(Vertex2DPOD) * line.vertices.size());