A simple to use, general purpose, 3D media framework using OpenGL, OpenAL and OpenDE

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] << " " << endl;
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;
}

Leave a Reply

Your email address will not be published.


6 − four =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>