mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-06 23:27:53 -04:00
- 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)
25 lines
515 B
C++
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;
|
|
};
|