2011-05-02 22:21:42 +02:00
|
|
|
#ifndef GRAPHICSPAGE_H
|
|
|
|
#define GRAPHICSPAGE_H
|
2011-04-24 21:42:56 +02:00
|
|
|
|
2011-05-02 22:21:42 +02:00
|
|
|
#include <QWidget>
|
|
|
|
|
2011-05-11 01:12:25 +02:00
|
|
|
#include <OgreRoot.h>
|
|
|
|
#include <OgreRenderSystem.h>
|
2013-01-27 16:39:51 +01:00
|
|
|
//#include <OgreConfigFile.h>
|
|
|
|
//#include <OgreConfigDialog.h>
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2012-03-15 15:51:39 +01:00
|
|
|
// Static plugin headers
|
|
|
|
#ifdef ENABLE_PLUGIN_GL
|
|
|
|
# include "OgreGLPlugin.h"
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_PLUGIN_Direct3D9
|
|
|
|
# include "OgreD3D9Plugin.h"
|
|
|
|
#endif
|
|
|
|
|
2013-03-05 02:17:28 +01:00
|
|
|
#include "ui_graphicspage.h"
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2013-01-27 16:39:51 +01:00
|
|
|
class GraphicsSettings;
|
|
|
|
|
2012-01-21 01:14:35 +01:00
|
|
|
namespace Files { struct ConfigurationManager; }
|
|
|
|
|
2013-03-05 02:17:28 +01:00
|
|
|
class GraphicsPage : public QWidget, private Ui::GraphicsPage
|
2011-05-02 22:21:42 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-01-27 16:39:51 +01:00
|
|
|
GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSettings, QWidget *parent = 0);
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2013-01-27 16:39:51 +01:00
|
|
|
void saveSettings();
|
2012-06-20 20:43:51 +02:00
|
|
|
bool setupOgre();
|
2011-05-11 01:12:25 +02:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void rendererChanged(const QString &renderer);
|
|
|
|
|
2013-03-05 02:17:28 +01:00
|
|
|
private slots:
|
|
|
|
void slotFullScreenChanged(int state);
|
|
|
|
void slotStandardToggled(bool checked);
|
|
|
|
|
2011-05-11 01:12:25 +02:00
|
|
|
private:
|
|
|
|
Ogre::Root *mOgre;
|
|
|
|
Ogre::RenderSystem *mSelectedRenderSystem;
|
|
|
|
Ogre::RenderSystem *mOpenGLRenderSystem;
|
|
|
|
Ogre::RenderSystem *mDirect3DRenderSystem;
|
2012-03-15 15:51:39 +01:00
|
|
|
#ifdef ENABLE_PLUGIN_GL
|
|
|
|
Ogre::GLPlugin* mGLPlugin;
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_PLUGIN_Direct3D9
|
|
|
|
Ogre::D3D9Plugin* mD3D9Plugin;
|
|
|
|
#endif
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2012-02-22 08:34:47 +01:00
|
|
|
Files::ConfigurationManager &mCfgMgr;
|
2013-01-27 16:39:51 +01:00
|
|
|
GraphicsSettings &mGraphicsSettings;
|
2012-02-22 08:34:47 +01:00
|
|
|
|
2011-05-11 01:12:25 +02:00
|
|
|
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
|
2012-06-19 15:57:58 +02:00
|
|
|
QStringList getAvailableResolutions(Ogre::RenderSystem *renderer);
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2013-01-27 16:39:51 +01:00
|
|
|
void loadSettings();
|
|
|
|
|
2011-05-02 22:21:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|