- Online Community Forums » Allegro Development » is_same_bitmap bug?

This thread is locked; no one can reply to it. rss feed Print
 1   2 
is_same_bitmap bug?
Member #358
May 2000


The X11 driver fakes video bitmaps if the virtual screen is larger than the actual screen.

Yeah, that's why I said generally. In a case where you use a 640x480 window on a 1280x1024 desktop, you would be able to create an off-screen 'video bitmap', but it's nothing you can rely on.

"Either help out or stop whining" - Evert

Member #1,204
April 2001

Elias said:

I would expect it to fail, depending on windows and directx version. It's simply not an officially supported mode of operation, AFAICT.


No, Linux and OSX will generally return NULL for create_video_bitmap.

If video bitmaps fail, then I am using a system bitmap, and if that fails for some reason (not that it will - a memory bitmap will be created if system bitmaps are not available) then I am creating a memory bitmap.

So the solution works and provides accelerated blitting for those platforms that support it. I am also checking gfx_capabilities before using video bitmaps.

Evert said:

No one should ever set screen to anything else than what it's set at after a call to set_gfx_mode(). I'm not sure if that's what you meant though?

Yeap, that's what I meant.

But since both of you are so strong against using 'screen', I will provide another way to provide the target bitmap.

Free Market Evangelist
September 2000


the first created Video Bitmap is always taken from the same area (weather or not its the same size, you can have multiple small video bitmaps be allocated from the same space that "screen" is using).

This is not strictly true. The first allocated video bitmap may overlap with the visible screen. However, the first allocated video bitmap of size (SCREEN_W, SCREEN_H) will overlap with the visible screen.

- Bob
[ -- All my signature links are 404 -- ]

 1   2 

Go to: