Game Development Community

32-Bit Only Textures

by Richard_H · in Torque Game Engine · 11/08/2006 (5:15 pm) · 3 replies

Hi,

I would like to make my game automaticly run in 32 bit mode, but when I change the options dialog it just goes back when I reload the game. Does anyone know how I would make my game run in 32-Bit mode, unless the player changes it in the options dialog?

#1
11/09/2006 (4:19 am)
Have a look in winWindow.cc line 1173 (or there abouts) you should find the code that sets the default resolution to 800x600x16 when preferences are not set to anything else. If you change the bpp line instead to

U32 bpp = ( temp ? dAtoi( temp ) : 32 );

Then on first run TGE will attempt to start in 32 bit mode rather than 16. After first run it will use whatever preference settings the user selected.

There may be a few more places you need to look at to handle all cases, for example if the device is set to fullScreenOnly then in "setScreenMode" bpp looks to be reset to 16.
#2
11/09/2006 (4:47 am)
The problem I'm having involves fullscreen mode aswell. I don't have access to the SKD at the moment so if anyone has the code to make 32-bit mode default and saved with the preferences. The code you posted is useful though.
#3
11/09/2006 (5:54 pm)
Since I'm using a mac I edited the macCarbWindow and ended up with this:
// bit depth
   if (fullScreen)
   {
      s = dAtoi( dStrtok( NULL, "[[60c202a21e362]]" ) );
      if( ! bpp > 0 ) bpp = 32;
   }
   else
      bpp = platState.desktopBitsPixel;

Yet, in fullscreen mode this apears to do nothing.
Does anyone know how to do this?