public void render ()
    {
        if (bi != null && !updating) {
            if (textureID != -1) glDeleteTextures(textureID);
            textureID = Utilities.loadTexture(bi);
            bi = null;
        }
        if (textureID == -1 || !isVisible()) return;

        glEnable(GL_TEXTURE_2D);
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
            
        glPushMatrix();
        glBindTexture(GL_TEXTURE_2D, textureID);
        if (world.thePlayer.showChunks) {
            if (((x + y) % 2) == 0) glColor3d(1.0, 1.0, 0.0);
            else                    glColor3d(0.0, 1.0, 1.0);
        } else {
            glColor3d(1.0, 1.0, 1.0);
        }
        glBegin(GL_QUADS);
            glTexCoord2f(0, 0);
            glVertex2f(x * world.chunkSize * 16, y * world.chunkSize * 16);
               
            glTexCoord2f(1, 0);
            glVertex2f((x + 1) * world.chunkSize * 16, y * world.chunkSize * 16);
               
            glTexCoord2f(1, 1);
            glVertex2f((x + 1) * world.chunkSize * 16, (y + 1) * world.chunkSize * 16);
               
            glTexCoord2f(0, 1);
            glVertex2f(x * world.chunkSize * 16, (y + 1) * world.chunkSize * 16);
        glEnd();
        
        glPopMatrix();
        glDisable(GL_BLEND);
        glDisable(GL_TEXTURE_2D);
    }