Game Development Community

1.7.4 bug in 'allowOpenGl' = false

by James Ford · in Torque Game Builder · 11/02/2008 (8:11 pm) · 0 replies

To reproduce this bug, specify in your prefs,
$pref::Video::allowD3D = true;
$pref::Video::allowOpenGl = false;

You might also have make sure it actually initializes the D3D, but that's a different issue.

Assuming that TGB is trying to set/initialize the D3D device, and the openGL device is 'not allowed', you should get a Vector out of bounds assertion in platformVideo.cc 'bool Video::setDevice( ... )'

My fix inline...

Bugs are on lines 318,319
delete smDeviceList[iOpenGL];
smDeviceList.erase(iOpenGL);
// JCF: Don't mess up our index!
if ( deviceIndex > iOpenGL )
   deviceIndex--;
and lines 337, 338
delete smDeviceList[iD3D];
smDeviceList.erase(iD3D);
// JCF: Don't mess up our index!
if ( deviceIndex > iD3D)
   deviceIndex--;