Subversion Repositories gelsvn

Rev

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

Rev 432 Rev 441
Line 5... Line 5...
5
#include "draw.h"
5
#include "draw.h"
6
#include "HMesh/FaceCirculator.h"
6
#include "HMesh/FaceCirculator.h"
7
 
7
 
8
#include "SinglePassWireframeRenderer.h"
8
#include "SinglePassWireframeRenderer.h"
9
#include "IDBufferWireFrameRenderer.h"
9
#include "IDBufferWireFrameRenderer.h"
-
 
10
#include "SOIL.h"
10
 
11
 
11
using namespace CGLA;
12
using namespace CGLA;
12
using namespace HMesh;
13
using namespace HMesh;
13
using namespace std;
14
using namespace std;
14
 
15
 
Line 121... Line 122...
121
		}
122
		}
122
		glEnd();
123
		glEnd();
123
		glDisable(GL_TEXTURE_2D);
124
		glDisable(GL_TEXTURE_2D);
124
	}
125
	}
125
	
126
	
-
 
127
	void load_textures(Geometry::TriMesh& tm)
126
	
128
	{
-
 
129
		for(unsigned int i=0;i<tm.materials.size(); ++i)
-
 
130
		{
-
 
131
			Geometry::Material& mat = tm.materials[i];
-
 
132
			if(mat.tex_name != "")
-
 
133
			{
-
 
134
				string name = mat.tex_path + mat.tex_name;
-
 
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
			}
-
 
137
		}
-
 
138
	}
127
	 
139
	 
128
	template<class T>
140
	template<class T>
129
	void draw_wireframe_oldfashioned(T& m, bool per_vertex_norms, const Vec3f& line_color)
141
	void draw_wireframe_oldfashioned(T& m, bool per_vertex_norms, const Vec3f& line_color)
130
	{
142
	{
131
		// Store state that we change
143
		// Store state that we change