gfxStarfield=CreateImage(32,32,10)

Blitz3D Forums/Blitz3D Beginners Area/gfxStarfield=CreateImage(32,32,10)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

When you setbuffer to a graphics buffer all drawing commands: including cls,clscolor,rect, plot, etc are drawn to that buffer. This also includes text, and print (i think print). All other commands will be ignored or won't work right, I don't think. Try:

graphics3d 800,600,16,3
setbuffer backbuffer()
cube=createcube()
cam=createcamera()
positionentity cam,0,0,-15
renderworld
text 100,100,"Press Any key to see if it works"
flip

gfxStarfield=CreateImage(32,32,10) 

; loop through each frame of the graphic we just made 
For t = 0 To 9 
 ; Set the drawing buffer to the graphic frame so we can write on it 
 SetBuffer ImageBuffer(gfxStarfield,t) 
 ; put 50 stars in the frame at random locations 
 For y = 1 To 50 
  Plot Rand(32),Rand(32) 
 Next 
Next

rotateentity cube,45,0,0
text 100,150,"IT WORKS FOR TEXT"

waitkey()
setbuffer backbuffer()
renderworld
flip


If the text 100,150 shows up on the screen it works for text
If the cube is rotated, it works for meshes
though all mesh commands might not
if it didn't change or you see nothing, or get an error it doesn't. (i would test it, but i'm at my gf's house NO BLITZ OH NO!!!!")