wfobj/driver.cc
josh 26e2833f82 merged WFMtl code into WFObj files, added loadTexture callback
git-svn-id: svn://anubis/misc/wfobj@24 bd8a9e45-a331-0410-811e-c64571078777
2008-01-29 03:04:22 +00:00

29 lines
476 B
C++

#include <GL/gl.h>
#include <iostream>
#include "WFObj.hh"
using namespace std;
GLuint loadTexture(const char * texture)
{
cout << "got texture request: '" << texture << "'" << endl;
return 33;
}
int main(int argc, char * argv[])
{
WFObj w;
if (argc < 2)
{
cout << "Usage: " << argv[0] << " <filename>" << endl;
return -2;
}
if (!w.load(argv[1], &loadTexture))
{
cout << "Couldn't open '" << argv[1] << "'!" << endl;
return -1;
}
w.render();
return 0;
}