2014-10-27 21:22:29 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/glcanvas.h"
|
|
|
|
#include "wx/timer.h"
|
|
|
|
|
2014-10-28 22:59:17 -04:00
|
|
|
#include <vector>
|
2014-11-06 01:33:59 -05:00
|
|
|
#include <queue>
|
|
|
|
|
2014-10-30 22:51:33 -04:00
|
|
|
#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"
|
2014-11-11 08:11:12 -05:00
|
|
|
|
2014-11-04 19:52:11 -05:00
|
|
|
class PrimaryGLContext: public wxGLContext {
|
2014-10-27 21:22:29 -04:00
|
|
|
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
|
|
|
|
};
|
2014-11-12 21:55:11 -05:00
|
|
|
PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext);
|
2014-10-27 21:22:29 -04:00
|
|
|
|
2014-11-12 21:55:11 -05:00
|
|
|
static wxString glGetwxString(GLenum name);
|
|
|
|
static void CheckGLError();
|
2014-10-28 22:59:17 -04:00
|
|
|
|
2014-12-08 21:08:03 -05:00
|
|
|
void BeginDraw();
|
|
|
|
void EndDraw();
|
|
|
|
|
2014-12-28 05:13:46 -05:00
|
|
|
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
|
|
|
|
2014-12-09 21:28:08 -05:00
|
|
|
static GLFont &getFont(GLFontSize esize);
|
2014-12-08 02:16:06 -05:00
|
|
|
|
2014-11-04 19:52:11 -05:00
|
|
|
private:
|
2014-12-09 21:28:08 -05:00
|
|
|
static GLFont fonts[GLFONT_MAX];
|
2014-12-10 21:22:13 -05:00
|
|
|
DemodulatorThreadParameters defaultDemodParams;
|
2014-10-27 21:22:29 -04:00
|
|
|
};
|