                                     has no supported formats"
         return @promise
 
+    bind: ->
+        if @bound_unit == -1
+            @context.render_manager.bind_texture @
+        return this
+
     # @private
     # Recreates, uploads and configures texture in GPU
     upload: ->

                return @promise
            @promised_data = raw_pixels
            @promise = new Promise (resolve, reject) =>
                {@width=0, @height=0, pixels} = raw_pixels
                if @width==0 or @height==0
                    reject "Texture #{name} has no width or height."
                buffer = pixels.buffer or (new Uint8Array(pixels)).buffer
                @texture_type = 'arrays'
                @gl_format = @gl_internal_format = gl.RGBA
                @gl_type = gl.UNSIGNED_BYTE
                if pixels.constructor == Float32Array
                    @gl_type = gl.FLOAT

                    for array, i in self.arrays
                        return if upload_task_id != self.upload_task_id
                        render_manager.bind_texture self
                        gl.compressedTexImage2D(self.gl_target, i,
                            self.gl_internal_format, width>>i, height>>i, 0,
                            array)
                        # console.log 'uploaded something on frame',
