CubicSDR/src/visual/PrimaryGLContext.h

36 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#include "wx/glcanvas.h"
#include "wx/timer.h"
#include <vector>
#include <queue>
#include "CubicSDRDefs.h"
2014-12-08 02:16:06 -05:00
#include "GLFont.h"
2014-12-08 21:08:03 -05:00
#include "DemodulatorMgr.h"
class PrimaryGLContext: public wxGLContext {
public:
2014-12-16 21:30:03 -05:00
enum GLFontSize {
GLFONT_SIZE12, GLFONT_SIZE16, GLFONT_SIZE18, GLFONT_SIZE24, GLFONT_SIZE32, GLFONT_SIZE48, GLFONT_MAX
};
PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext);
static wxString glGetwxString(GLenum name);
static void CheckGLError();
2014-12-08 21:08:03 -05:00
void BeginDraw();
void EndDraw();
void DrawFreqSelector(float uxPos, float r = 1, float g = 1, float b = 1, float w = 0, int center_freq = -1, int srate = SRATE);
void DrawDemod(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1, int center_freq = -1, int srate = SRATE);
void DrawDemodInfo(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1, int center_freq = -1, int srate = SRATE);
2014-12-08 21:08:03 -05:00
static GLFont &getFont(GLFontSize esize);
2014-12-08 02:16:06 -05:00
private:
static GLFont fonts[GLFONT_MAX];
2014-12-10 21:22:13 -05:00
DemodulatorThreadParameters defaultDemodParams;
};