CubicSDR/src/visual/WaterfallContext.h
Charles J. Cliffe 679ad64a1f Move waterfall animation to GPU
- Refactored texture generation to linear wrap in GPU memory with
glTexSubImage2D (1 line per frame upload max)
- Texture upload per frame reduced nearly 700-800x (~2-4kb instead of
~1.6mb)
2015-02-08 13:49:12 -05:00

25 lines
515 B
C++

#pragma once
#include "PrimaryGLContext.h"
#include "Gradient.h"
#include "ColorTheme.h"
class WaterfallCanvas;
class WaterfallContext: public PrimaryGLContext {
public:
WaterfallContext(WaterfallCanvas *canvas, wxGLContext *sharedContext);
void Draw(std::vector<float> &points);
void Setup(int fft_size_in, int num_waterfall_lines_in);
void refreshTheme();
private:
GLuint waterfall[2];
int waterfall_ofs[2];
int fft_size;
int waterfall_lines;
ColorTheme *activeTheme;
};