2011-05-02 20:21:42 +00:00
|
|
|
#ifndef GRAPHICSPAGE_H
|
|
|
|
#define GRAPHICSPAGE_H
|
2011-04-24 19:42:56 +00:00
|
|
|
|
2011-05-02 20:21:42 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
2011-05-10 23:12:25 +00:00
|
|
|
#include <OgreRoot.h>
|
|
|
|
#include <OgreRenderSystem.h>
|
2013-01-27 15:39:51 +00:00
|
|
|
//#include <OgreConfigFile.h>
|
|
|
|
//#include <OgreConfigDialog.h>
|
2011-05-10 23:12:25 +00:00
|
|
|
|
2012-03-15 14:51:39 +00:00
|
|
|
// Static plugin headers
|
|
|
|
#ifdef ENABLE_PLUGIN_GL
|
|
|
|
# include "OgreGLPlugin.h"
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_PLUGIN_Direct3D9
|
|
|
|
# include "OgreD3D9Plugin.h"
|
|
|
|
#endif
|
|
|
|
|
2011-05-10 23:12:25 +00:00
|
|
|
class QComboBox;
|
|
|
|
class QCheckBox;
|
|
|
|
class QStackedWidget;
|
|
|
|
class QSettings;
|
|
|
|
|
2013-01-27 15:39:51 +00:00
|
|
|
class GraphicsSettings;
|
|
|
|
|
2012-01-21 00:14:35 +00:00
|
|
|
namespace Files { struct ConfigurationManager; }
|
|
|
|
|
2011-05-02 20:21:42 +00:00
|
|
|
class GraphicsPage : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-01-27 15:39:51 +00:00
|
|
|
GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSettings, QWidget *parent = 0);
|
2011-05-10 23:12:25 +00:00
|
|
|
|
2013-01-27 15:39:51 +00:00
|
|
|
void saveSettings();
|
2012-06-20 18:43:51 +00:00
|
|
|
bool setupOgre();
|
2011-05-10 23:12:25 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void rendererChanged(const QString &renderer);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ogre::Root *mOgre;
|
|
|
|
Ogre::RenderSystem *mSelectedRenderSystem;
|
|
|
|
Ogre::RenderSystem *mOpenGLRenderSystem;
|
|
|
|
Ogre::RenderSystem *mDirect3DRenderSystem;
|
2012-03-15 14:51:39 +00:00
|
|
|
#ifdef ENABLE_PLUGIN_GL
|
|
|
|
Ogre::GLPlugin* mGLPlugin;
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_PLUGIN_Direct3D9
|
|
|
|
Ogre::D3D9Plugin* mD3D9Plugin;
|
|
|
|
#endif
|
2011-05-10 23:12:25 +00:00
|
|
|
|
|
|
|
QComboBox *mRendererComboBox;
|
|
|
|
|
|
|
|
QStackedWidget *mDisplayStackedWidget;
|
|
|
|
|
2012-05-22 18:37:18 +00:00
|
|
|
QComboBox *mAntiAliasingComboBox;
|
|
|
|
QComboBox *mResolutionComboBox;
|
|
|
|
QCheckBox *mVSyncCheckBox;
|
|
|
|
QCheckBox *mFullScreenCheckBox;
|
2012-02-22 07:34:47 +00:00
|
|
|
|
|
|
|
Files::ConfigurationManager &mCfgMgr;
|
2013-01-27 15:39:51 +00:00
|
|
|
GraphicsSettings &mGraphicsSettings;
|
2012-02-22 07:34:47 +00:00
|
|
|
|
2011-05-10 23:12:25 +00:00
|
|
|
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
|
2012-06-19 13:57:58 +00:00
|
|
|
QStringList getAvailableResolutions(Ogre::RenderSystem *renderer);
|
2011-05-10 23:12:25 +00:00
|
|
|
|
|
|
|
void createPages();
|
2013-01-27 15:39:51 +00:00
|
|
|
void loadSettings();
|
|
|
|
|
2011-05-02 20:21:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|