Added OpenGL3 as a driver option to the configuration tool.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent 300cd284d1
commit 37c8b096b1

@ -32,6 +32,7 @@ CDisplaySettingsWidget::CDisplaySettingsWidget( QWidget *parent ) :
connect( autoRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) ); connect( autoRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) );
connect( openglRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) ); connect( openglRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) );
connect( openGL3RB, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) );
connect( direct3dRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) ); connect( direct3dRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) );
connect( fullscreenRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) ); connect( fullscreenRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) );
connect( windowedRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) ); connect( windowedRadioButton, SIGNAL( clicked( bool ) ), this, SLOT( onSomethingChanged() ) );
@ -65,6 +66,12 @@ void CDisplaySettingsWidget::load()
case DRV_DIRECT3D: case DRV_DIRECT3D:
direct3dRadioButton->setChecked( true ); direct3dRadioButton->setChecked( true );
break; break;
case DRV_GLES:
openglRadioButton->setChecked( true );
break;
case DRV_OPENGL3:
openGL3RB->setChecked( true );
break;
} }
updateVideoModes(); updateVideoModes();
@ -99,6 +106,8 @@ void CDisplaySettingsWidget::save()
if( openglRadioButton->isChecked() ) if( openglRadioButton->isChecked() )
s.config.setString( "Driver3D", std::string( "OpenGL" ) ); s.config.setString( "Driver3D", std::string( "OpenGL" ) );
else if( openGL3RB->isChecked() )
s.config.setString( "Driver3D", std::string( "OpenGL3" ) );
else if( direct3dRadioButton->isChecked() ) else if( direct3dRadioButton->isChecked() )
s.config.setString( "Driver3D", std::string( "Direct3D" ) ); s.config.setString( "Driver3D", std::string( "Direct3D" ) );
else else
@ -217,11 +226,16 @@ E3DDriver CDisplaySettingsWidget::getDriverFromConfigString(std::string &str) co
return DRV_OPENGL; return DRV_OPENGL;
if( str.compare( "2" ) == 0 ) if( str.compare( "2" ) == 0 )
return DRV_DIRECT3D; return DRV_DIRECT3D;
if( str.compare( "3" ) == 0 )
return DRV_GLES;
if( str.compare( "4" ) == 0 )
return DRV_OPENGL3;
if( str.compare( "OpenGL" ) == 0 ) if( str.compare( "OpenGL" ) == 0 )
return DRV_OPENGL; return DRV_OPENGL;
if( str.compare( "Direct3D" ) == 0) if( str.compare( "Direct3D" ) == 0)
return DRV_DIRECT3D; return DRV_DIRECT3D;
if( str.compare( "OpenGL3" ) == 0 )
return DRV_OPENGL3;
return DRV_AUTO; return DRV_AUTO;
} }

@ -27,7 +27,9 @@ enum E3DDriver
{ {
DRV_AUTO, DRV_AUTO,
DRV_OPENGL, DRV_OPENGL,
DRV_DIRECT3D DRV_DIRECT3D,
DRV_GLES,
DRV_OPENGL3
}; };
/** /**

@ -6,106 +6,128 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>391</width> <width>408</width>
<height>429</height> <height>415</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Display</string> <string>Display</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item row="0" column="0"> <item>
<widget class="QGroupBox" name="driverGroupBox"> <widget class="QGroupBox" name="driverGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title"> <property name="title">
<string>Driver</string> <string>Driver</string>
</property> </property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>23</y>
<width>249</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Specify if Ryzom is to be run in OpenGL or Direct3D.</string>
</property>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>69</width>
<height>88</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QRadioButton" name="autoRadioButton">
<property name="text">
<string>Auto</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="openglRadioButton">
<property name="text">
<string>OpenGL</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="openGL3RB">
<property name="text">
<string>OpenGL3</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="direct3dRadioButton">
<property name="text">
<string>Direct3D</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QGroupBox" name="parametersGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Parameters</string>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_6">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Specify if Ryzom is to be run in OpenGL or Direct3D.</string> <string>Specify if Ryzom is to be run in full screen or window mode:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="autoRadioButton"> <widget class="QRadioButton" name="fullscreenRadioButton">
<property name="text"> <property name="text">
<string>Auto</string> <string>Full screen</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="openglRadioButton"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>OpenGL</string> <string>Specify a video mode</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="direct3dRadioButton"> <widget class="QComboBox" name="videomodeComboBox"/>
</item>
<item>
<widget class="QRadioButton" name="windowedRadioButton">
<property name="text"> <property name="text">
<string>Direct3D</string> <string>Windowed</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
</layout> <item row="1" column="0">
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="parametersGroupBox">
<property name="title">
<string>Parameters</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Specify if Ryzom is to be run in full screen or window mode:</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="fullscreenRadioButton">
<property name="text">
<string>Full screen</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Specify a video mode</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="videomodeComboBox"/>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>34</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QRadioButton" name="windowedRadioButton">
<property name="text">
<string>Windowed</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">

Loading…
Cancel
Save