/*
Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
static int firstintersecting;
static XYZ point;
static XYZ oldp1;
- static XYZ start, end;
firstintersecting = -1;
static int firstintersecting;
static XYZ point;
static XYZ oldp1;
- static XYZ start, end;
firstintersecting = -1;
FILE *tfile;
long i;
- //~ int oldvertexNum, oldTriangleNum;
- //~ oldvertexNum = vertexNum;
- //~ oldTriangleNum = TriangleNum;
-
type = notextype;
color = 0;
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
if (visibleloading)
Game::LoadingScreen();
- //~ int oldvertexNum, oldTriangleNum;
- //~ oldvertexNum = vertexNum;
- //~ oldTriangleNum = TriangleNum;
-
type = normaltype;
color = 0;
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
LOG(std::string("Loading raw...") + filename);
- //~ int oldvertexNum, oldTriangleNum;
- //~ oldvertexNum = vertexNum;
- //~ oldTriangleNum = TriangleNum;
-
type = rawtype;
color = 0;
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
glInterleavedArrays( GL_T2F_C3F_V3F, 8 * sizeof(GLfloat), &vArray[0]);
textureptr.bind();
-#if PLATFORM_MACOSX
- glLockArraysEXT( 0, TriangleNum * 3);
-#endif
glDrawArrays(GL_TRIANGLES, 0, TriangleNum * 3);
-#if PLATFORM_MACOSX
- glUnlockArraysEXT();
-#endif
-
if (!color)
glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- //drawimmediate();
}
//TODO: phase out in favor of Texture