Files
CubicSDR/src/visual/PrimaryGLContext.h
T

40 lines
1.3 KiB
C++
Raw Normal View History

// Copyright (c) Charles J. Cliffe
// SPDX-License-Identifier: GPL-2.0+
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>
#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"
#include "ColorTheme.h"
class PrimaryGLContext: public wxGLContext {
2014-10-27 21:22:29 -04:00
public:
PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext);
2014-10-27 21:22:29 -04:00
static wxString glGetwxString(GLenum name);
static void CheckGLError();
2014-10-28 22:59:17 -04:00
2015-01-15 00:59:33 -05:00
void BeginDraw(float r, float g, float b);
2014-12-08 21:08:03 -05:00
void EndDraw();
void DrawFreqSelector(float uxPos, RGBA4f color, float w = 0, long long center_freq = -1, long long srate = 0);
void DrawRangeSelector(float uxPos1, float uxPos2, RGBA4f color);
void DrawDemod(DemodulatorInstance *demod, RGBA4f color, long long center_freq = -1, long long srate = 0);
void DrawDemodInfo(DemodulatorInstance *demod, RGBA4f color, long long center_freq = -1, long long srate = 0, bool centerline = false);
void DrawFreqBwInfo(long long freq, int bw, RGBA4f color, long long center_freq = - 1, long long srate = 0, bool stack = false, bool centerline = false);
2014-12-08 21:08:03 -05:00
void setHoverAlpha(float hoverAlpha);
private:
float hoverAlpha;
void drawSingleDemodLabel(const std::wstring& demodStr, float uxPos, float hPos, float xOfs, float yOfs, GLFont::Align demodAlign);
2014-10-27 21:22:29 -04:00
};