Commit ab95e198 authored by cutealien's avatar cutealien

Let example 11 also use the driverChoice function (was only example using...

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
parent 1641e03a
...@@ -174,27 +174,9 @@ Now for the real fun. We create an Irrlicht Device and start to setup the scene. ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment