--- deliantra/Deliantra-Client/Client.xs 2006/06/15 15:33:57 1.117 +++ deliantra/Deliantra-Client/Client.xs 2006/06/17 15:07:52 1.119 @@ -1449,16 +1449,19 @@ { unsigned char m = data [x + y * w]; - float *c = color [m & 15]; - - float tx1 = m & 0x40 ? 0.5 : m & 0x80 ? 0.25 : 0.; - float tx2 = tx1 + 0.25; - - glColor4f (c[0], c[1], c[2], 0.75); - glTexCoord2f (tx1, 0.); glVertex2i (x , y ); - glTexCoord2f (tx1, 1.); glVertex2i (x , y + 1); - glTexCoord2f (tx2, 1.); glVertex2i (x + 1, y + 1); - glTexCoord2f (tx2, 0.); glVertex2i (x + 1, y ); + if (m) + { + float *c = color [m & 15]; + + float tx1 = m & 0x40 ? 0.5 : 0.; + float tx2 = tx1 + 0.5; + + glColor4f (c[0], c[1], c[2], 0.75); + glTexCoord2f (tx1, 0.); glVertex2i (x , y ); + glTexCoord2f (tx1, 1.); glVertex2i (x , y + 1); + glTexCoord2f (tx2, 1.); glVertex2i (x + 1, y + 1); + glTexCoord2f (tx2, 0.); glVertex2i (x + 1, y ); + } } glEnd (); @@ -1714,6 +1717,8 @@ const_iv (GL_ALPHA_TEST), const_iv (GL_NORMALIZE), const_iv (GL_RESCALE_NORMAL), + const_iv (GL_FRONT), + const_iv (GL_BACK), const_iv (GL_AND), const_iv (GL_ONE), const_iv (GL_ZERO), @@ -1845,6 +1850,10 @@ void glLoadIdentity () +void glDrawBuffer (int buffer) + +void glReadBuffer (int buffer) + # near_ and far_ are due to microsofts buggy "c" compiler void glFrustum (double left, double right, double bottom, double top, double near_, double far_)