aboutsummaryrefslogtreecommitdiffstats
path: root/gui/fpgaviewwidget.h
diff options
context:
space:
mode:
authorDarrell Harmon <darrell@harmoninstruments.com>2018-11-11 12:50:44 -0700
committerDarrell Harmon <darrell@harmoninstruments.com>2018-11-11 12:50:44 -0700
commit3312b9832d1a389a8bbc2a078f1958992743f00a (patch)
treef4426b4297178292bfe5cdb87ed9788621f05f2b /gui/fpgaviewwidget.h
parentcdd0f0fea0555129a16ff0a2c337333b3493b173 (diff)
parent9e5aded5c6583e36604aa09d22d3b2de3ff47905 (diff)
downloadnextpnr-3312b9832d1a389a8bbc2a078f1958992743f00a.tar.gz
nextpnr-3312b9832d1a389a8bbc2a078f1958992743f00a.tar.bz2
nextpnr-3312b9832d1a389a8bbc2a078f1958992743f00a.zip
Merge branch 'master' of github.com:YosysHQ/nextpnr
Diffstat (limited to 'gui/fpgaviewwidget.h')
-rw-r--r--gui/fpgaviewwidget.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h
index e76e6f32..3c0cfbbd 100644
--- a/gui/fpgaviewwidget.h
+++ b/gui/fpgaviewwidget.h
@@ -127,7 +127,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
private:
const float zoomNear_ = 0.1f; // do not zoom closer than this
- float zoomFar_ = 10.0f; // do not zoom further than this
+ float zoomFar_ = 10.0f; // do not zoom further than this
const float zoomLvl1_ = 1.0f;
const float zoomLvl2_ = 5.0f;
@@ -240,21 +240,6 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
QColor highlight[8];
} colors_;
- // Flags that are passed through from renderer arguments to renderer data.
- // These are used by the UI code to signal events that will only fire when
- // the next frame gets rendered.
- struct PassthroughFlags
- {
- bool zoomOutbound;
-
- PassthroughFlags() : zoomOutbound(false) {}
- PassthroughFlags &operator=(const PassthroughFlags &other) noexcept
- {
- zoomOutbound = other.zoomOutbound;
- return *this;
- }
- };
-
struct RendererArgs
{
// Decals that he user selected.
@@ -265,19 +250,22 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
DecalXY hoveredDecal;
// Whether to render the above three or skip it.
bool changed;
+ // Whether to render grid or skip it.
+ bool gridChanged;
- // Flags to pass back into the RendererData.
- PassthroughFlags flags;
+ // Flags for rendering.
+ bool zoomOutbound;
// Hint text
std::string hintText;
// cursor pos
- int x,y;
+ int x, y;
};
std::unique_ptr<RendererArgs> rendererArgs_;
QMutex rendererArgsLock_;
struct RendererData
{
+ LineShaderData gfxGrid;
LineShaderData gfxByStyle[GraphicElement::STYLE_MAX];
LineShaderData gfxSelected;
LineShaderData gfxHovered;
@@ -288,8 +276,6 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
PickQuadTree::BoundingBox bbSelected;
// Quadtree for picking objects.
std::unique_ptr<PickQuadTree> qt;
- // Flags from args.
- PassthroughFlags flags;
};
std::unique_ptr<RendererData> rendererData_;
QMutex rendererDataLock_;