Bugs and more bugs.
by Neal McLoughlin · in Torque Game Builder · 11/08/2007 (8:58 am) · 0 replies
Having trouble with quite a few things: version 1.5.1
Unable to run in fullscreen when using any of the flags. (ie defaultPrefs, or in the xml file).
It keeps changing my screen res throughout, it was set to be 1024,768,32,fullscreen true.
and ends up being 800,600,16,windowed.
Scrambled video on game init, fixed by not loading video prefs from xml file.
Device id and vendor id does not work correctly in unicode. (fixed) using the correct conversions.
Unable to set gamma, (fixed).
winoglvideo.cc
bool OpenGLDevice::setGammaCorrection(F32 g)
{
U16 ramp[256*3];
for (U16 i = 0; i < 256; ++i)
ramp[i] = (U16)mPow((F32) i/256.0f, g) * 65535.0f; << This will never work.
ramp[i] = (U16)(mPow((F32) i/256.0f, g) * 65535.0f); << And now it works.
dMemcpy(&ramp[256],ramp,256*sizeof(U16));
dMemcpy(&ramp[512],ramp,256*sizeof(U16));
return SetDeviceGammaRamp(winState.appDC, ramp);
}
Memory issue. When you start the game memory usage is approx. 247megs. If you minimize the game and then restore it, memory usage is now at 7megs. And everytime you load up a gui it adds approx 8 megs, when you leave the gui, it does NOT release the memory, the only way so far is to minimize and restore game again. It appears that the game is loading every gui into memory, even if it hasn't been pushed/popped yet.
Unable to run in fullscreen when using any of the flags. (ie defaultPrefs, or in the xml file).
It keeps changing my screen res throughout, it was set to be 1024,768,32,fullscreen true.
and ends up being 800,600,16,windowed.
Scrambled video on game init, fixed by not loading video prefs from xml file.
Device id and vendor id does not work correctly in unicode. (fixed) using the correct conversions.
Unable to set gamma, (fixed).
winoglvideo.cc
bool OpenGLDevice::setGammaCorrection(F32 g)
{
U16 ramp[256*3];
for (U16 i = 0; i < 256; ++i)
ramp[i] = (U16)mPow((F32) i/256.0f, g) * 65535.0f; << This will never work.
ramp[i] = (U16)(mPow((F32) i/256.0f, g) * 65535.0f); << And now it works.
dMemcpy(&ramp[256],ramp,256*sizeof(U16));
dMemcpy(&ramp[512],ramp,256*sizeof(U16));
return SetDeviceGammaRamp(winState.appDC, ramp);
}
Memory issue. When you start the game memory usage is approx. 247megs. If you minimize the game and then restore it, memory usage is now at 7megs. And everytime you load up a gui it adds approx 8 megs, when you leave the gui, it does NOT release the memory, the only way so far is to minimize and restore game again. It appears that the game is loading every gui into memory, even if it hasn't been pushed/popped yet.