2004-11-18 19:53:00 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <simgear/compiler.h>
|
|
|
|
|
2004-01-09 21:19:44 +00:00
|
|
|
#include <iostream>
|
2004-11-18 19:53:00 +00:00
|
|
|
|
|
|
|
#include SG_GLUT_H
|
|
|
|
|
2004-01-09 21:19:44 +00:00
|
|
|
#include <plib/ssg.h>
|
|
|
|
|
|
|
|
using std::cerr;
|
|
|
|
using std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int ac, char ** av)
|
|
|
|
{
|
|
|
|
if (ac != 3) {
|
|
|
|
cerr << "Usage: " << av[0] << " <file_in> <file_out>" << endl;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int fakeac = 1;
|
|
|
|
char * fakeav[] = { "3dconvert",
|
|
|
|
"Convert a 3D Model",
|
|
|
|
0 };
|
|
|
|
glutInit(&fakeac, fakeav);
|
|
|
|
glutCreateWindow(fakeav[1]);
|
|
|
|
|
|
|
|
ssgInit();
|
|
|
|
ssgEntity * object = ssgLoad(av[1]);
|
|
|
|
if (object == 0) {
|
|
|
|
cerr << "Failed to load " << av[1] << endl;
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
ssgSave(av[2], object);
|
|
|
|
}
|