Mail Archives: djgpp/1999/02/15/16:47:11
Thanks for your reply,
The problem is, as soon as I select an unsupported graphic mode, windows
pops up with an 'Invalid page fault mesage'
Kester Maddock wrote in message <36C658EB DOT AA94324D AT xtra DOT co DOT nz>...
>
>If set_gfx_mode returns a negative number, you can assume that the
>selected colour depth does not work. This goes for DOS Allegro
>too. WinAllegro uses DirectX, and apparently not all colour depths
>are supported properly.
> int colours[] = {8, 15, 16, 24, 32};
> int i, e;
> for (i = 0; i < sizeof(colours)/sizeof(colours[0]); i++)
> {
> set_color_depth(colours[i]);
> e = set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
> if (!e)
> break;
> }
> if (e < 0)
> {
> /* Do some error condition: Graphics failed */
> }
>
>Kester
>dmaddock AT xtra DOT co DOT nz
>
>Gary Smith wrote:
>
>> By changing the colour depth to 15 bit, the program runs at the correct
>> frame rate.
>>
>> If I set the colour depth to 16bit, and then call 'set_gfx_mode', this
>> causes the program to crash. How can I tell if the colour depth that is
>> selected will work on someone elses computer.
>>
>> Gary Smith
>>
>> Gary Smith wrote in message
<7a4ma6$kv4$1 AT nclient3-gui DOT server DOT virgin DOT net>...
>> >Help.
>> >
>> >I have been working on a program using Winallegro as the graphics
library.
>> >
>> >I have just upgraded my graphics card from a Matrox Mystique, 4MB to an
ATI
>> >Rage LT PRO, 8MB.
>> >
>> >With the Matrox card, I could run the program in 15bit, 16bit, 24bit &
32
>> >bit at a reasonable frame rate. With the ATI card, the program now
runs
>> at
>> >approximately 10% of its previous speed.
>> >
>> >The ATI card should be faster than the Matrox card.
>> >
>> >I have tried setting various colour depths with no luck.
>> >
>> >Any suggestions.
>> >
>> >Gary Smith
>> >
>> >
>> >
>> >
>
- Raw text -