#pragma once #include "GLPanel.h" #include class WaterfallPanel : public GLPanel { public: WaterfallPanel(); void setup(int fft_size_in, int num_waterfall_lines_in); void refreshTheme(); void setPoints(std::vector &points); void step(); void update(); protected: void drawPanelContents(); private: std::vector points; GLuint waterfall[2]; int waterfall_ofs[2]; int fft_size; int waterfall_lines; unsigned char *waterfall_slice; std::vector lineBuffer[2]; std::vector rLineBuffer[2]; std::atomic_int lines_buffered; std::atomic_bool texInitialized, bufferInitialized; ColorTheme *activeTheme; };