Thomas Fjellstrom said:
Nope. the "screen" has a separate vtable
Which part of the "they are not the same BITMAP objects" you did not understand?
as well as the "screen" may also be the size of VRAM, not just SCREEN_W, SCREEN_H.
Hey, that's basic allegro knowledge...otherwise SCREEN_W and SCREEN_H would not have been there.
Once you create a video bitmap, FORGET about "screen". Just use the first two video bitmaps created, and switch between them. That IS the proper way.
But I am not implementing a page flipping algorithm. I am writing a GUI library and I just want to blit the GUI buffer to the screen. So I am using one video bitmap and the screen.
And I do not want to use the first page allocated, because the 'screen' value could be set to anything the user of my library desires.
The solution I am using works perfectly under Windows, both in windowed and full screen mode. Wouldn't it work for Linux?
Neither. It is platform dependent due to differences between platforms.
Due to design then.
It is. Check the docs for VRAM_SINGLE_SURFACE: if this is defined, then all video bitmaps are children of the screen bitmap.
Yes, but it does not say anything about 'is_same_bitmap'.
The problem is neither of what you or anyone else keeps referring to. The problem is that the function 'is_same_bitmap' does not work as expected: when I write to one bitmap, the drawing appears in the other bitmap, but the function 'is_same_bitmap' does not report any relationship between the two bitmaps.