dust3d/src/modelofflinerender.h

27 lines
621 B
C
Raw Normal View History

#ifndef MODEL_OFFLINE_RENDER_H
#define MODEL_OFFLINE_RENDER_H
#include <QOffscreenSurface>
#include <QScreen>
#include <QOpenGLFunctions>
#include <QOpenGLContext>
#include <QImage>
#include <QThread>
#include "modelshaderprogram.h"
#include "modelmeshbinder.h"
2018-05-07 17:16:58 +00:00
#include "meshloader.h"
class ModelOfflineRender : QOffscreenSurface
{
public:
ModelOfflineRender(QScreen *targetScreen = Q_NULLPTR);
~ModelOfflineRender();
void setRenderThread(QThread *thread);
2018-05-07 17:16:58 +00:00
void updateMesh(MeshLoader *mesh);
QImage toImage(const QSize &size);
private:
QOpenGLContext *m_context;
2018-05-07 17:16:58 +00:00
MeshLoader *m_mesh;
};
#endif