mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2026-04-19 06:42:43 +00:00
Added new deemphasis mode + new image widget
This commit is contained in:
34
core/src/gui/widgets/image.h
Normal file
34
core/src/gui/widgets/image.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#include <dsp/stream.h>
|
||||
#include <mutex>
|
||||
#include <GL/glew.h>
|
||||
|
||||
namespace ImGui {
|
||||
class ImageDisplay {
|
||||
public:
|
||||
ImageDisplay(int width, int height, GLenum format);
|
||||
~ImageDisplay();
|
||||
void draw(const ImVec2& size_arg = ImVec2(0, 0));
|
||||
void swap();
|
||||
|
||||
void* buffer;
|
||||
|
||||
private:
|
||||
void updateTexture();
|
||||
|
||||
std::mutex bufferMtx;
|
||||
void* activeBuffer;
|
||||
|
||||
int _width;
|
||||
int _height;
|
||||
GLenum _format;
|
||||
|
||||
GLuint textureId;
|
||||
|
||||
bool newData = false;
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user