-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
57 lines (45 loc) · 1.19 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//------------------------------------------------------------------------------
// Copyright 2007-2014 by Jyh-Ming Lien and George Mason University
// See the file "LICENSE" for more information
//------------------------------------------------------------------------------
#include "main.h"
//
//
//
//
// The MAIN function
//
//
//
//
int main(int argc, char ** argv)
{
//
if(!parseArg(argc,argv)){
printUsage(argv[0]);
return 1;
}
//read obj vile
readfromfiles();
//
/////////////////////////////////////////////////////////////////
//setup glut/gli
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB|GLUT_DOUBLE|GLUT_DEPTH );
glutInitWindowSize( 680, 680);
glutInitWindowPosition( 50, 50 );
glutCreateWindow( "ffd - free-form deformation" );
InitGL();
gli::gliInit();
gli::gliDisplayFunc(Display);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Keyboard);
gli::gliMotionFunc(Motion);
gli::gliMouseFunc(Mouse);
glutPassiveMotionFunc(PassiveMotion);
//set camera position
gli::setCameraPosZ(R*2.1f);
/////////////////////////////////////////////////////////////
gli::gliMainLoop();
return 0;
}