glClearColor(0.0, 0.0, 0.0, 1.0);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(60.0, 1.33333, 1.0, 2500.0);
+ //glMatrixMode(GL_PROJECTION);
+ //glLoadIdentity();
+ //Mf::Scalar ratio = Mf::engine.getVideo()->getWidth() /
+ //Mf::engine.getVideo()->getHeight();
+ //gluPerspective(60.0, ratio, 1.0, 250.0);
- glMatrixMode(GL_MODELVIEW);
+ //glMatrixMode(GL_MODELVIEW);
}
void MainLayer::contextRecreated()
// make sure the engine started up okay
- if (Mf::engine.getError().isError())
+ const Mf::Error& error = Mf::engine.getError();
+ if (error.isError())
{
Mf::ModalDialog dialog;
dialog.title = PACKAGE_STRING;
- dialog.text1 = "Fatal Error";
- dialog.text2 = getErrorString(Mf::engine.getError());
+ dialog.text1 = "Uh oh!";
+ dialog.text2 = getErrorString(error);
dialog.type = Mf::ModalDialog::CRITICAL;
dialog.run();
- return 1;
+ // openal errors are not fatal
+ if (error.code() != Mf::Error::OPENAL_INIT) return 1;
}
Mf::Settings& settings = Mf::Settings::getInstance();
settings.loadFromFile(configFiles);
settings.parseArgs(argc, argv);
+ Mf::engine.initWithSettings(settings);
std::string iconFile = Mf::Resource::getPath(PACKAGE".png");