aboutsummaryrefslogtreecommitdiff
path: root/colormap.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2023-06-04 13:02:14 +0200
committerSamuel Fadel <samuel@nihil.ws>2023-06-04 13:02:14 +0200
commitfb23c8d47f6dcef429423256d8dddcc0f7184fc4 (patch)
tree34e0032f28df5807e4abd90d6b1b4baad24d2991 /colormap.h
parent0f34fd437efb936ef29ac91186321aa7251fbfb1 (diff)
Further advances in nuklear port.
Rendering now looks similar to Qt version, needs a few tweaks: * Proper multisampling * Background Missing features: * Barcharts * Interactivity (e.g. brushing/linking in all objects) * History view of interactions
Diffstat (limited to 'colormap.h')
-rw-r--r--colormap.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/colormap.h b/colormap.h
index 76577f5..7d26a86 100644
--- a/colormap.h
+++ b/colormap.h
@@ -5,6 +5,7 @@
#include <vector>
#include <armadillo>
+#include <glad/gl.h>
#include <nod.hpp>
#include "colorscale.h"
@@ -22,6 +23,10 @@ public:
Colormap();
~Colormap();
+ GLuint texture() const { return m_texture; }
+ size_t width() const { return m_width; }
+ size_t height() const { return m_height; }
+
void update();
void setOrientation(Orientation orientation);
Orientation orientation() const { return m_orientation; }
@@ -31,13 +36,12 @@ public:
void setColorScale(std::shared_ptr<const ColorScale> scale);
- // QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *);
-
private:
- // QSGNode *newSceneGraph();
+ void updateTexture();
- // QSGDynamicTexture *m_texture;
- bool m_shouldUpdateTexture, m_shouldUpdateOrientation;
+ size_t m_width, m_height;
+ GLuint m_texture;
+ bool m_shouldUpdateTexture;
Orientation m_orientation;
std::vector<float> m_cmap;
};