Subversion Repositories gelsvn

Rev

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

Rev 441 Rev 492
Line 135... Line 135...
135
				mat.tex_id = SOIL_load_OGL_texture(name.data(), 0, 0, SOIL_FLAG_TEXTURE_REPEATS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_POWER_OF_TWO);
135
				mat.tex_id = SOIL_load_OGL_texture(name.data(), 0, 0, SOIL_FLAG_TEXTURE_REPEATS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_POWER_OF_TWO);
136
			}
136
			}
137
		}
137
		}
138
	}
138
	}
139
	 
139
	 
-
 
140
	/// Draw an object of type T which contains only triangles as wireframe. In practice T = Manifold or TriMesh.
-
 
141
	template<typename T>
-
 
142
	inline void draw_triangles_in_wireframe(T& m, bool per_vertex_norms, const CGLA::Vec3f& line_color)
-
 
143
	{
-
 
144
		static SinglePassWireframeRenderer swr;
-
 
145
		swr.enable(line_color);
-
 
146
		draw(m, per_vertex_norms);
-
 
147
		swr.disable();
-
 
148
	}
-
 
149
 
-
 
150
	template
-
 
151
	inline void draw_triangles_in_wireframe(HMesh::Manifold& m, bool per_vertex_norms, const CGLA::Vec3f& line_color);
-
 
152
 
-
 
153
	template
-
 
154
	inline void draw_triangles_in_wireframe(Geometry::TriMesh& m, bool per_vertex_norms, const CGLA::Vec3f& line_color);
-
 
155
 
140
	template<class T>
156
  template<class T>
141
	void draw_wireframe_oldfashioned(T& m, bool per_vertex_norms, const Vec3f& line_color)
157
	void draw_wireframe_oldfashioned(T& m, bool per_vertex_norms, const Vec3f& line_color)
142
	{
158
	{
143
		// Store state that we change
159
		// Store state that we change
144
		glPushAttrib(GL_POLYGON_BIT);
160
		glPushAttrib(GL_POLYGON_BIT);
145
		GLboolean lights_on;
161
		GLboolean lights_on;