Fast writing to a screen buffer

Blitz3D Forums/Blitz3D Beginners Area/Fast writing to a screen buffer

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.

You are reading outside the screen i think. You should change that to:
lockbuffer backbuffer()
For x = 0 to GraphicsWidth()-1
  For Y = 0 to GraphicsHeight()-1
    thisPixel = ReadPixelFast(x,y,backbuffer()) And $FFFFFF
  next
next
unlockbuffer backbuffer()


Having said that, this isn't the fastest way. skidracer explains a faster solution above.