示例#1
0
文件: FilePath.cpp 项目: rgmann/coral
//------------------------------------------------------------------------------
FilePath operator- (const std::string& left, const FilePath& right)
{
    FilePath lFilePath(left);

    lFilePath -= right;

    return lFilePath;
}
示例#2
0
int main(int argc, char **argv) {

	// Use a custom memory allocator
	FbxSetMallocHandler(MyMemoryAllocator::MyMalloc);
	FbxSetReallocHandler(MyMemoryAllocator::MyRealloc);
	FbxSetFreeHandler(MyMemoryAllocator::MyFree);
	FbxSetCallocHandler(MyMemoryAllocator::MyCalloc);

	// init GLUT and create window
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
	glutInitWindowPosition(100,100);
	glutInitWindowSize(800,600);
	glutCreateWindow("FBX Loading");

	// Initialize OpenGL.
	const bool lSupportVBO = InitializeOpenGL();

//	FbxString lFilePath("zombii.FBX");
//	FbxString lFilePath("soldier.FBX");
	FbxString lFilePath("Anteater_FBX.fbx");
//    FbxString lFilePath("Turtle_FBX.fbx");
    
	gSceneContext = new FBXLoader(lFilePath, 800, 600);

	init();
	// register callbacks
	glutDisplayFunc(renderScene);
	glutReshapeFunc(changeSize);
	glutIdleFunc(renderScene);

	glutIgnoreKeyRepeat(1);
	glutKeyboardFunc(processNormalKeys);
	glutSpecialFunc(pressKey);
	glutSpecialUpFunc(releaseKey);

	// here are the two new functions
	glutMouseFunc(mouseButton);
	glutMotionFunc(mouseMove);

	// OpenGL init
	glEnable(GL_DEPTH_TEST);

	// enter GLUT event processing cycle
	glutMainLoop();

	return 1;
}
示例#3
0
文件: FilePath.cpp 项目: rgmann/coral
//------------------------------------------------------------------------------
bool FilePath::operator== (const std::string &path)
{
    FilePath lFilePath(path);

    return (*this == lFilePath);
}