The Final Refactoring has begun!
- December 24th, 2010
- Posted in Main
- Write comment
The final touches are now being applied to the OME source and an anonymous mercurial http download should be available “soon”.
Below is an example of a simple viewer app to give you an idea of the API:
(Also checkout http://juvul.com for an example of a larger App using OME)
#include "meContext.h"
meContext* m3d;
extern "C" int main(int argc, char *argv[]){
string fileName = "";
if(argc < 2){
cout << "Usage: " << argv[0] << "
exit(1);
}
else{
fileName = argv[1];
cout << "fileName " << fileName << endl;
}
m3d = new meContext();
m3d->meCoreInitEngine("config.xml");
m3d->meMidiInit();
m3d->meCameraSelectByIndex(0);
m3d->meODEWorldEnableFloor(-20);
m3d->meCoreTimingInit();
m3d->meCoreLoadDataFromXMLFile((char *)fileName.c_str());
while(!m3d->meCoreEventsExit()){
m3d->meCoreEventsUpdate();
m3d->meCameraUpdate();
m3d->meCoreRenderFrameSwapBuffers();
}
m3d->meCoreTimingShutdown();
delete m3d;
return 0;
}
No comments yet.