Fix normal vectors in 3ds import usage; but disabled 3d figures (too slow)

This commit is contained in:
Stefan Bühler 2009-02-12 12:32:56 +01:00
parent 64ba2097da
commit b1b13ce865
2 changed files with 4 additions and 1 deletions

View File

@ -179,6 +179,7 @@ namespace toruschess {
glTexCoord2f( repeat+ox, repeat+oy); glVertex3f( 10*repeat, 0, -10*repeat);
glEnd();
#if 0
glDisable(GL_TEXTURE_2D);
glEnable(GL_LIGHT1);
glDisable(GL_LIGHT0);
@ -190,7 +191,7 @@ namespace toruschess {
if (m_game->field()->player(Pos(i, j)) == WHITE) {
glColor3f(1.0, 1.0, 1.0);
} else {
glColor3f(.0, .0, .0);
glColor3f(.1, .1, .1);
}
for (int x = -10; x <= 10; x++) for (int y = -10; y <= 10; y++) {
glPushMatrix();
@ -201,6 +202,7 @@ namespace toruschess {
}
}
}
#endif
}
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, 0);

View File

@ -191,6 +191,7 @@ typedef size_t (*Lib3dsIoWriteFunc)(void *self, const void *buffer, size_t size)
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3,GL_FLOAT,0,m_pawn->meshes->pointL);
for (unsigned int i = 0; i < m_pawn->meshes->faces; i++) {
glNormal3fv(m_pawn->meshes->faceL[i].normal);
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_SHORT, m_pawn->meshes->faceL[i].points);
}
glDisableClientState(GL_VERTEX_ARRAY);