Subversion Repositories gelsvn

Rev

Rev 442 | Rev 596 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 442 Rev 492
Line 10... Line 10...
10
// - w                              : toggle wireframe on/off
10
// - w                              : toggle wireframe on/off
11
// - t                              : toggle texture on/off
11
// - t                              : toggle texture on/off
12
// - f                              : switch between vertex and face normals
12
// - f                              : switch between vertex and face normals
13
// ----------------------------------------
13
// ----------------------------------------
14
 
14
 
15
#if (_MSC_VER >= 1200)
-
 
16
#pragma warning (disable: 4786)
-
 
17
#endif
-
 
18
 
-
 
19
#include <list>
-
 
20
#include <vector>
-
 
21
 
-
 
22
#include <assert.h>
-
 
23
#include <stdio.h>
-
 
24
#ifdef WIN32
-
 
25
#include <windows.h>
-
 
26
#include <io.h>
-
 
27
#endif
-
 
28
#include <string.h>
-
 
29
#include <stdlib.h>
-
 
30
 
-
 
31
#include <iostream>
15
#include <iostream>
32
#include <vector>
16
#include <string>
33
 
-
 
34
#include <Util/ArgExtracter.h>
17
#include <GL/glew.h>
35
#include <CGLA/Vec2i.h>
18
#include "Util/ArgExtracter.h"
36
#include <CGLA/Vec2f.h>
19
#include "CGLA/Vec2i.h"
37
#include <CGLA/Vec3f.h>
20
#include "CGLA/Vec3f.h"
38
#include <CGLA/Mat4x4f.h>
-
 
39
#include "GLGraphics/glsl_shader.h"
-
 
40
#include "GLGraphics/gel_glut.h"
21
#include "GLGraphics/gel_glut.h"
41
#include "GLGraphics/QuatTrackBall.h"
22
#include "GLGraphics/QuatTrackBall.h"
42
#include "GLGraphics/draw.h"
23
#include "GLGraphics/draw.h"
43
#include "GLGraphics/SOIL.h"
-
 
44
#include "Geometry/TriMesh.h"
24
#include "Geometry/TriMesh.h"
45
#include "Geometry/load.h"
25
#include "Geometry/load.h"
46
#include "HMesh/x3d_load.h"
-
 
47
#include "HMesh/FaceCirculator.h"
-
 
48
 
26
 
49
using namespace std;
27
using namespace std;
50
using namespace CGLA;
28
using namespace CGLA;
51
using namespace Geometry;
29
using namespace Geometry;
52
using namespace HMesh;
-
 
53
using namespace GLGraphics;
30
using namespace GLGraphics;
54
 
31
 
55
int win_size_x = 800;
32
int win_size_x = 800;
56
int win_size_y = 800;
33
int win_size_y = 800;
57
bool per_vertex_normals = 1;
34
bool per_vertex_normals = 1;
Line 193... Line 170...
193
    main_window = glutCreateWindow("OBJ Viewer");
170
    main_window = glutCreateWindow("OBJ Viewer");
194
    glutDisplayFunc(display);
171
    glutDisplayFunc(display);
195
    glutKeyboardFunc(keyboard);
172
    glutKeyboardFunc(keyboard);
196
    glutMotionFunc(mouse_motion);
173
    glutMotionFunc(mouse_motion);
197
    glutMouseFunc(mouse);
174
    glutMouseFunc(mouse);
198
    //glutIdleFunc(idle);
-
 
199
	
175
	
200
	glewInit();
176
	glewInit();
201
	
177
	
202
    // GL INIT
178
    // GL INIT
203
    glClearColor(.8f, 0.9f, 1.0f, 0.f);
179
    glClearColor(.8f, 0.9f, 1.0f, 0.f);