1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 11:49:56 +00:00
openmw-tes3mp/apps/opencs/view/render/scenewidget.hpp

70 lines
1.2 KiB
C++

#ifndef OPENCS_VIEW_SCENEWIDGET_H
#define OPENCS_VIEW_SCENEWIDGET_H
#include <QWidget>
#include <QTimer>
#include "lightingday.hpp"
#include "lightingnight.hpp"
#include "lightingbright.hpp"
#include <osgViewer/View>
#include <osgViewer/CompositeViewer>
namespace osg
{
class Group;
}
namespace CSVWidget
{
class SceneToolMode;
class SceneToolbar;
}
namespace CSVRender
{
class Navigation;
class Lighting;
class SceneWidget : public QWidget
{
Q_OBJECT
public:
SceneWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
~SceneWidget();
void flagAsModified();
void setVisibilityMask(int mask);
protected:
osg::ref_ptr<osgViewer::View> mView;
osg::Group* mRootNode;
QTimer mTimer;
};
// There are rendering glitches when using multiple Viewer instances, work around using CompositeViewer with multiple views
class CompositeViewer : public QObject, public osgViewer::CompositeViewer
{
Q_OBJECT
public:
CompositeViewer();
static CompositeViewer& get();
QTimer mTimer;
public slots:
void update();
};
}
#endif