(bind-func xtm_envmap_init
(lambda (flipped:i1 front:String* back:String* top:String* bottom:String* left:String* right:String*)
(set! ENV_MAP_TEXTURE (Texture))
(load_cube_data ENV_MAP_TEXTURE (i1toi32 flipped) front back top bottom left right)
(update_cube ENV_MAP_TEXTURE) ;; send data to card
;; (bind_cube ENV_MAP_TEXTURE #t 2) ;; send data to card
;; (unbind_cube SKY_BOX_TEXTURE 2)
(set! ENV_MAP #t)
(set! ENV_MAP_WEIGHT 1.0:f)
void))