viewer/various: split off color management into separate base class
Also moves scopes to said base class.
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
WaveformScope::WaveformScope(QWidget* parent) :
|
||||
QOpenGLWidget(parent),
|
||||
ManagedDisplayWidget(parent),
|
||||
texture_(nullptr)
|
||||
{
|
||||
|
||||
EnableDefaultContextMenu();
|
||||
}
|
||||
|
||||
void WaveformScope::SetTexture(OpenGLTexture *texture)
|
||||
@@ -42,6 +42,8 @@ void WaveformScope::SetTexture(OpenGLTexture *texture)
|
||||
|
||||
void WaveformScope::initializeGL()
|
||||
{
|
||||
ManagedDisplayWidget::initializeGL();
|
||||
|
||||
pipeline_ = OpenGLShader::Create();
|
||||
pipeline_->create();
|
||||
pipeline_->addShaderFromSourceCode(QOpenGLShader::Vertex, OpenGLShader::CodeDefaultVertex());
|
||||
|
||||
@@ -21,16 +21,15 @@
|
||||
#ifndef WAVEFORMSCOPE_H
|
||||
#define WAVEFORMSCOPE_H
|
||||
|
||||
#include <QOpenGLWidget>
|
||||
|
||||
#include "codec/frame.h"
|
||||
#include "render/backend/opengl/openglcolorprocessor.h"
|
||||
#include "render/backend/opengl/openglshader.h"
|
||||
#include "render/backend/opengl/opengltexture.h"
|
||||
#include "widget/manageddisplay/manageddisplay.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
class WaveformScope : public QOpenGLWidget
|
||||
class WaveformScope : public ManagedDisplayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user