2014-11-15 23:41:41 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "PrimaryGLContext.h"
|
|
|
|
#include "Gradient.h"
|
|
|
|
|
2015-01-11 03:09:59 -05:00
|
|
|
|
|
|
|
#define COLOR_THEME_DEFAULT 0
|
|
|
|
#define COLOR_THEME_BW 1
|
|
|
|
#define COLOR_THEME_SHARP 2
|
|
|
|
#define COLOR_THEME_RAD 3
|
|
|
|
#define COLOR_THEME_TOUCH 4
|
|
|
|
#define COLOR_THEME_HD 5
|
|
|
|
#define COLOR_THEME_RADAR 6
|
|
|
|
#define COLOR_THEME_MAX 7
|
|
|
|
|
2014-11-15 23:41:41 -05:00
|
|
|
class WaterfallCanvas;
|
|
|
|
|
|
|
|
class WaterfallContext: public PrimaryGLContext {
|
|
|
|
public:
|
|
|
|
WaterfallContext(WaterfallCanvas *canvas, wxGLContext *sharedContext);
|
|
|
|
|
|
|
|
void Draw(std::vector<float> &points);
|
2014-12-28 05:13:46 -05:00
|
|
|
void Setup(int fft_size_in, int num_waterfall_lines_in);
|
2015-01-11 03:09:59 -05:00
|
|
|
void setTheme(int theme_id);
|
|
|
|
int getTheme();
|
2014-11-15 23:41:41 -05:00
|
|
|
|
|
|
|
private:
|
2015-01-11 03:09:59 -05:00
|
|
|
Gradient *gradients[COLOR_THEME_MAX];
|
2014-11-15 23:41:41 -05:00
|
|
|
GLuint waterfall;
|
2015-01-11 03:09:59 -05:00
|
|
|
int theme;
|
2014-12-28 05:13:46 -05:00
|
|
|
unsigned char *waterfall_tex;
|
|
|
|
int fft_size;
|
|
|
|
int waterfall_lines;
|
2014-11-15 23:41:41 -05:00
|
|
|
};
|