qt: Initial OpenGL 3.0 renderer implementation
This commit is contained in:
@@ -1,28 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <QRect>
|
||||
#include <QImage>
|
||||
#include <QDialog>
|
||||
#include <QEvent>
|
||||
#include <QImage>
|
||||
#include <QRect>
|
||||
#include <QWidget>
|
||||
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
class QWidget;
|
||||
|
||||
class RendererCommon
|
||||
{
|
||||
class RendererCommon {
|
||||
public:
|
||||
RendererCommon();
|
||||
|
||||
void onResize(int width, int height);
|
||||
virtual std::vector<std::tuple<uint8_t*, std::atomic_flag*>> getBuffers() = 0;
|
||||
protected:
|
||||
bool eventDelegate(QEvent* event, bool& result);
|
||||
void onResize(int width, int height);
|
||||
virtual void finalize() { }
|
||||
|
||||
QRect source, destination;
|
||||
QWidget* parentWidget{nullptr};
|
||||
virtual std::vector<std::tuple<uint8_t *, std::atomic_flag *>> getBuffers() = 0;
|
||||
|
||||
/* Does renderer implement options dialog */
|
||||
virtual bool hasOptions() const { return false; }
|
||||
/* Returns options dialog for renderer */
|
||||
virtual QDialog *getOptions(QWidget *parent) { return nullptr; }
|
||||
|
||||
protected:
|
||||
bool eventDelegate(QEvent *event, bool &result);
|
||||
|
||||
QRect source, destination;
|
||||
QWidget *parentWidget { nullptr };
|
||||
|
||||
std::vector<std::atomic_flag> buf_usage;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user