I have a modified (just using classes and a different variable naming scheme) version of Lesson 10 working, but I get this weird texturing issue and the only thing I can think of is it is related to loading in textures using SOIL. I even went as far as modifying the sample code to use SOIL, and I get the same result:
I'm loading it all from the world file given in the sample:
float x, y, z, u, v;
int tris;
char textline[255];
FILE *filein = fopen( "Assets/Worlds/World.txt", "rt");
ReadStr( filein, textline );
sscanf( textline, "NUMPOLLIES %d\n", &tris);
sector1.numTriangles = tris;
sector1.triangles = new triangle[sector1.numTriangles];
for ( int triangles = 0 ; triangles < sector1.numTriangles ; triangles++ )
{
for ( int vert = 0 ; vert < 3 ; vert++ )
{
ReadStr(filein, textline);
sscanf(textline, "%f %f %f %f %f", &x, &y, &z, &u, &v);
sector1.triangles[triangles].vertices[vert].x = x ;
sector1.triangles[triangles].vertices[vert].y = y ;
sector1.triangles[triangles].vertices[vert].z = z ;
sector1.triangles[triangles].vertices[vert].u = u ;
sector1.triangles[triangles].vertices[vert].v = v ;
}
}
fclose(filein);
It looked fine when stepping through the code, and I pretty much copy/pasted the tutorial project into mine with the modified texture loading and got the same result which is why I believe it has something to do with misusing SOIL.