|
|
| Problem with virtual screen and set_gfx_mode |
|
Number Six
Member #3,912
October 2003
|
I'm trying to simple create a screen with 640x480 res and a larger virtual screen size (say 1024x1024) No matter what size I try to make the virtual screen, set_gfx_mode fails with "Unsupported virtual resolution". This is on a system with a TNT2 Model64 pro so I'm sure theres plenty of Video Ram --------------------------------------- |
|
Evert
Member #794
November 2000
|
Not all drivers can do this. As far as I know, Windows' DirectX windowed driver cannot, for instance. |
|
Carl Divston
Member #4,843
July 2004
|
Aye Sir! The same problem happens here. Looks like its something that some videocards (or anything else) cant do. I needed to do a turn-around. You can make a simple scrolling system with some few variables. Problably this is not what you want, but its the only way I found... EDIT: beaten... |
|
Number Six
Member #3,912
October 2003
|
Oh yeah sorry! On this platform its Windows 2000 DX9.0b Allegro 4.1.14! --------------------------------------- |
|
gnolam
Member #2,030
March 2002
|
AFAIK there's no real reason to use the virtual screen parameters instead of create_video_bitmap() anyway... -- |
|
Kitty Cat
Member #2,815
October 2002
|
The Windows gfx drivers do not support virtual screens. You can still create extra video bitmaps, but you won't be able to scroll the screen smoothly. Note though that other drivers do require a virtual screen if you want to use extra VRAM. If ALLEGRO_VRAM_SINGLE_SURFACE (IIRC) is defined, create a virtual screen. If not, leave those parameters 0 and just pray. -- |
|
Number Six
Member #3,912
October 2003
|
Quote: AFAIK there's no real reason to use the virtual screen parameters instead of create_video_bitmap() anyway...
So does that mean I have to try and do it with page flipping? --------------------------------------- |
|
Thomas Fjellstrom
Member #476
June 2000
|
I think only the DOS or linux VGA drivers support any kind of virtual screen. The rest all make you create video_bitmaps. -- |
|
Number Six
Member #3,912
October 2003
|
Oh I think I'm (finally) getting it! <Touches wood!> So do you make a large video_bitmap say (1280x960), instead of the large virual screen, and then blit from whereever you wanted in that video_bitmap area to the screen? --------------------------------------- |
|
Kitty Cat
Member #2,815
October 2002
|
All DOS drivers and all Unix/X drivers do (sort of.. DGA2 requires a virtual screen but it has access to all VRAM regardless of what virtual screen size you specify). I'm not sure about OSX. -- |
|
Thomas Fjellstrom
Member #476
June 2000
|
Uh? X11 modes can't have a virtual screen, can they? Its like GDI in windows... Number6: I'd actually create a second bitmap that you store the cached sprites in. or make one for each, butthat might be overdoing it -- |
|
Evert
Member #794
November 2000
|
Quote: X11 modes can't have a virtual screen, can they? Its like GDI in windows... It's a hack. But yes, virtual screens and scrolling do work with the X11 driver. |
|
|