aboutsummaryrefslogtreecommitdiff
path: root/colormap.h
diff options
context:
space:
mode:
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;
};