Question about screen memory

Blitz3D Forums/Blitz3D Beginners Area/Question about screen memory

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.

I replied on the other thread by you on a similar problem. SetBuffer() is used to select which buffer you are drawing to, but that is not the same as turning dubble buffering on/off. Dubble buffering is a combination of selecting the back buffer, and using flip to flip the contents of the backbuffer to the front buffer (screen). At least that is what I think.

To use the frontbuffer you should do SetBuffer(FrontBuffer()). Then draw things, and do not use flip (flip is not needed as you are already drawing directly to the screen).

This way, you would only be using one buffer. What I *don't* know is what Blitz does with the other buffer. I think it is still there. I mean, there is no command to say "hey Blitz, I don't need the backbuffer so you don't have to reserve the needed memory".

When I run your program I see the rectangle *without* using flip. And this is expected, as you don't make a call to SetBuffer(), and the default then is to use the frontbuffer. So what you are doing above is "not buffering", drawing straight to the screen.

Well that might not have been of much help.

Oh, I am not using Blitz Plus but normal Blitz Basic 2D, I don't know if the default buffer for SetBuffer() was changed in Blitz Plus?