Fix normal vectors in 3ds import usage; but disabled 3d figures (too slow)
This commit is contained in:
parent
64ba2097da
commit
b1b13ce865
@ -179,6 +179,7 @@ namespace toruschess {
|
|||||||
glTexCoord2f( repeat+ox, repeat+oy); glVertex3f( 10*repeat, 0, -10*repeat);
|
glTexCoord2f( repeat+ox, repeat+oy); glVertex3f( 10*repeat, 0, -10*repeat);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
|
#if 0
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
glEnable(GL_LIGHT1);
|
glEnable(GL_LIGHT1);
|
||||||
glDisable(GL_LIGHT0);
|
glDisable(GL_LIGHT0);
|
||||||
@ -190,7 +191,7 @@ namespace toruschess {
|
|||||||
if (m_game->field()->player(Pos(i, j)) == WHITE) {
|
if (m_game->field()->player(Pos(i, j)) == WHITE) {
|
||||||
glColor3f(1.0, 1.0, 1.0);
|
glColor3f(1.0, 1.0, 1.0);
|
||||||
} else {
|
} else {
|
||||||
glColor3f(.0, .0, .0);
|
glColor3f(.1, .1, .1);
|
||||||
}
|
}
|
||||||
for (int x = -10; x <= 10; x++) for (int y = -10; y <= 10; y++) {
|
for (int x = -10; x <= 10; x++) for (int y = -10; y <= 10; y++) {
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
@ -201,6 +202,7 @@ namespace toruschess {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
|
@ -191,6 +191,7 @@ typedef size_t (*Lib3dsIoWriteFunc)(void *self, const void *buffer, size_t size)
|
|||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glVertexPointer(3,GL_FLOAT,0,m_pawn->meshes->pointL);
|
glVertexPointer(3,GL_FLOAT,0,m_pawn->meshes->pointL);
|
||||||
for (unsigned int i = 0; i < m_pawn->meshes->faces; i++) {
|
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);
|
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_SHORT, m_pawn->meshes->faceL[i].points);
|
||||||
}
|
}
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
|
Loading…
Reference in New Issue
Block a user