Let example 11 also use the driverChoice function (was only example using other keys when selecting driver)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3357 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2010-07-17 18:59:47 +00:00
parent 1641e03aac
commit ab95e1980d
1 changed files with 3 additions and 21 deletions

View File

@ -174,27 +174,9 @@ Now for the real fun. We create an Irrlicht Device and start to setup the scene.
int main() int main()
{ {
// let user select driver type // let user select driver type
video::E_DRIVER_TYPE driverType=driverChoiceConsole();
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9; if (driverType==video::EDT_COUNT)
return 1;
printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
char i;
std::cin >> i;
switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 0;
}
// create device // create device