You can't texture object with bitmaps. You can only texture with images.
Once you have updated your bitmap, you will need to grab the bitmap into an image and re-texture using that.
sync on
sync rate 0
set display mode 1024,768,32
global _OBJECTCOUNT = 0
global _LASTOBJECT = 0
Cube = GetValidObject()
CubeTexture = GetValidObject()
CubeBitmap = GetValidObject()
xrot as float = 0.0
Make Object Cube Cube, 1
Create Bitmap CubeBitmap, 128,128
UpdateBitmap(CubeBitmap, CubeTexture)
texture object Cube,CubeTexture
while not downkey() = 1
` UpdateBitmap(CubeBitmap, CubeTexture)
rotate object Cube, 0,0,xrot
xrot = xrot + 0.1
text 0, 0, str$( screen fps() )
sync
endwhile
function UpdateBitmap(Bitmap, Img)
set current bitmap Bitmap
for y = 0 to 128 step 1
for x = 0 to 128 step 1
ink rgb(255,255,0),0
dot x,y
next x
next y
get image Img, 0, 0, 128, 128
set current bitmap 0
endfunction
function GetValidObject()
_LASTOBJECT = _OBJECTCOUNT
_OBJECTCOUNT = _OBJECTCOUNT+1
endfunction _OBJECTCOUNT
function GetLastObject()
endfunction _LASTOBJECT