Posted: Sat Feb 04, 2006 2:26 pm
This is a great idea. As a tech demo, I wouldn't get tooo extravagant. It needs to show off Irrlicht.
I would like to see one thing in the programming that's different from the one we have now....
Regular Irrlicht Programming. Not windows programming.
In other words...
Instead of this:
I'd like to see it in this format:
All of the Irrlicht examples eccept for the techdemo and win 32 are like the latter.
I would like to see one thing in the programming that's different from the one we have now....
Regular Irrlicht Programming. Not windows programming.
In other words...
Instead of this:
Code: Select all
#ifdef _WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main()
#endif
{
bool fullscreen = false;
bool music = true;
bool shadows = false;
bool additive = false;
bool vsync = false;
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
CMainMenu menu;
#ifndef _DEBUG
if (menu.run(fullscreen, music, shadows, additive, vsync, driverType))
#endif
{
CDemo demo(fullscreen, music, shadows, additive, vsync, driverType);
demo.run();
}
Code: Select all
int main()
{
// ask if user would like shadows
char i;
printf("Please press 'y' if you want to use realtime shadows.\n");
std::cin >> i;
bool shadows = (i == 'y');
// ask user for driver
video::E_DRIVER_TYPE driverType;
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) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
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_SOFTWARE2;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
}
// create device and exit if creation failed
IrrlichtDevice *device =
createDevice(driverType, core::dimension2d<s32>(640, 480),
16, false, shadows);
if (device == 0)
return 1; // could not create selected driver.