(bind-func world_texture_setup
(lambda ()
(glActiveTexture GL_TEXTURE0)
(glBindTexture GL_TEXTURE_2D tex)
(glTexImage2D GL_TEXTURE_2D
0
GL_RGB
(convert (world_width world))
(convert (world_height world))
0
GL_RED
GL_BYTE
(world_data world))
(glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE)
(glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE)
(glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_NEAREST)
(glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MAG_FILTER GL_NEAREST)
(gl_print_error "in world_texture_setup")))