Subversion Repositories gelsvn

Rev

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

Rev 382 Rev 398
Line 44... Line 44...
44
#include "Geometry/TriMesh.h"
44
#include "Geometry/TriMesh.h"
45
#include "Geometry/obj_load.h"
45
#include "Geometry/obj_load.h"
46
#include "Geometry/ply_load.h"
46
#include "Geometry/ply_load.h"
47
#include "HMesh/x3d_load.h"
47
#include "HMesh/x3d_load.h"
48
#include "HMesh/FaceCirculator.h"
48
#include "HMesh/FaceCirculator.h"
49
#include "wireframe.h"
-
 
50
 
49
 
51
using namespace std;
50
using namespace std;
52
using namespace CGLA;
51
using namespace CGLA;
53
using namespace Geometry;
52
using namespace Geometry;
54
using namespace HMesh;
53
using namespace HMesh;
Line 231... Line 230...
231
    ball->set_gl_modelview();
230
    ball->set_gl_modelview();
232
	
231
	
233
	if(do_wireframe)
232
	if(do_wireframe)
234
	{
233
	{
235
		if(GLEW_EXT_geometry_shader4)
234
		if(GLEW_EXT_geometry_shader4)
236
		{
-
 
237
			enable_wireframe();
235
			draw_triangles_in_wireframe(mesh, per_vertex_normals, Vec3f(1,0,0));
238
			glCallList(l);
-
 
239
			glUseProgram(0);
-
 
240
		}
-
 
241
		else
236
		else
242
		{
-
 
243
			glDisable(GL_LIGHTING);
-
 
244
			glColor3f(1,1,1);
-
 
245
			glCallList(l);
-
 
246
			glEnable(GL_POLYGON_OFFSET_LINE);
-
 
247
			glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
237
			draw_wireframe_oldfashioned(mesh, per_vertex_normals, Vec3f(1,0,0));
248
			glColor3fv(line_col.get());
-
 
249
			glPolygonOffset(0,-5);
-
 
250
			glCallList(l);
-
 
251
			glEnable(GL_LIGHTING);
-
 
252
			glDisable(GL_POLYGON_OFFSET_LINE);
-
 
253
			glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-
 
254
		}
-
 
255
	}
238
	}
256
	else
239
	else
257
		glCallList(l);
240
		glCallList(l);
258
		
241
		
259
    glutSwapBuffers();
242
    glutSwapBuffers();
Line 330... Line 313...
330
	// Setup projection
313
	// Setup projection
331
	glMatrixMode(GL_PROJECTION);
314
	glMatrixMode(GL_PROJECTION);
332
	glLoadIdentity();
315
	glLoadIdentity();
333
	gluPerspective(53,1.0f,r/100.0,r*3.0);
316
	gluPerspective(53,1.0f,r/100.0,r*3.0);
334
	glMatrixMode(GL_MODELVIEW);
317
	glMatrixMode(GL_MODELVIEW);
335
	
-
 
336
	if(GLEW_EXT_geometry_shader4)
-
 
337
		initialize_wireframe_shaders();
-
 
338
			
-
 
339
	
318
 
340
	// Pass control to GLUT
319
	// Pass control to GLUT
341
	glutMainLoop();
320
	glutMainLoop();
342
	
321
	
343
	return 0;
322
	return 0;
344
}
323
}