2015-08-09 23:00:51 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "GLPanel.h"
|
|
|
|
|
|
|
|
class WaterfallPanel : public GLPanel {
|
|
|
|
public:
|
|
|
|
WaterfallPanel();
|
|
|
|
void setup(int fft_size_in, int num_waterfall_lines_in);
|
|
|
|
void refreshTheme();
|
|
|
|
void setPoints(std::vector<float> &points);
|
|
|
|
void step();
|
|
|
|
|
2015-08-10 00:33:31 -04:00
|
|
|
protected:
|
|
|
|
void drawPanelContents();
|
|
|
|
|
2015-08-09 23:00:51 -04:00
|
|
|
private:
|
2015-08-10 18:45:46 -04:00
|
|
|
std::vector<float> points;
|
|
|
|
|
2015-08-09 23:00:51 -04:00
|
|
|
GLuint waterfall[2];
|
|
|
|
int waterfall_ofs[2];
|
|
|
|
int fft_size;
|
|
|
|
int waterfall_lines;
|
|
|
|
unsigned char *waterfall_slice;
|
|
|
|
|
|
|
|
ColorTheme *activeTheme;
|
2015-08-10 18:45:46 -04:00
|
|
|
};
|