mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-24 18:08:27 +01:00
Fixed OpenGL memory leak
This commit is contained in:
parent
313b786d88
commit
72611b5fa7
@ -88,7 +88,7 @@ bool showMenu = true;
|
|||||||
dsp::stream<dsp::complex_t> dummyStream;
|
dsp::stream<dsp::complex_t> dummyStream;
|
||||||
|
|
||||||
void windowInit() {
|
void windowInit() {
|
||||||
spdlog::info("Initializing SoapySDR");
|
gui::waterfall.init();
|
||||||
|
|
||||||
credits::init();
|
credits::init();
|
||||||
|
|
||||||
|
@ -107,6 +107,10 @@ namespace ImGui {
|
|||||||
updatePallette(COLOR_MAP, 13);
|
updatePallette(COLOR_MAP, 13);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WaterFall::init() {
|
||||||
|
glGenTextures(1, &textureId);
|
||||||
|
}
|
||||||
|
|
||||||
void WaterFall::drawFFT() {
|
void WaterFall::drawFFT() {
|
||||||
// Calculate scaling factor
|
// Calculate scaling factor
|
||||||
float startLine = floorf(fftMax / vRange) * vRange;
|
float startLine = floorf(fftMax / vRange) * vRange;
|
||||||
@ -361,7 +365,6 @@ namespace ImGui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WaterFall::updateWaterfallTexture() {
|
void WaterFall::updateWaterfallTexture() {
|
||||||
glGenTextures(1, &textureId);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, textureId);
|
glBindTexture(GL_TEXTURE_2D, textureId);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
@ -51,6 +51,8 @@ namespace ImGui {
|
|||||||
public:
|
public:
|
||||||
WaterFall();
|
WaterFall();
|
||||||
|
|
||||||
|
void init();
|
||||||
|
|
||||||
void draw();
|
void draw();
|
||||||
void pushFFT(std::vector<float> data, int n);
|
void pushFFT(std::vector<float> data, int n);
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"bandPlan": "General",
|
"bandPlan": "General",
|
||||||
"bandPlanEnabled": true,
|
"bandPlanEnabled": true,
|
||||||
"fftHeight": 298,
|
"fftHeight": 298,
|
||||||
"frequency": 98200000,
|
"frequency": 100100000,
|
||||||
"max": 0.0,
|
"max": 0.0,
|
||||||
"maximized": true,
|
"maximized": true,
|
||||||
"menuOrder": [
|
"menuOrder": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"device": "HackRF One #0 901868dc282c8f8b",
|
"device": "Generic RTL2832U OEM :: 00000001",
|
||||||
"devices": {
|
"devices": {
|
||||||
"AirSpy HF+ [c852435de0224af7]": {
|
"AirSpy HF+ [c852435de0224af7]": {
|
||||||
"gains": {
|
"gains": {
|
||||||
|
Loading…
Reference in New Issue
Block a user