delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/15/16:47:11

From: "Gary Smith" <gary DOT smith3 AT virgin DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help. Winallegro
Date: Mon, 15 Feb 1999 21:42:54 -0000
Organization: Virgin Net Usenet Service
Lines: 75
Message-ID: <7aa4d0$29g$1@nclient1-gui.server.virgin.net>
References: <7a4ma6$kv4$1 AT nclient3-gui DOT server DOT virgin DOT net> <7a4ven$f01$1 AT nclient5-gui DOT server DOT virgin DOT net> <36C658EB DOT AA94324D AT xtra DOT co DOT nz>
NNTP-Posting-Host: 194.168.67.96
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019