Bug in the unproject code.
by John Carroll · in Torque Game Engine Advanced · 02/14/2007 (2:17 pm) · 1 replies
Hi,
I have found what appears to be a bug in GFXD3DDevice::unProject. The D3Dviewport width and height are being calculated incorrectly. This bug would only be apparent if you have multiple viewports, or an offset viewport. The lines currently read:
D3Dviewport.Width = viewport.extent.x - viewport.point.x;
D3Dviewport.Height = viewport.extent.y - viewport.point.y;
and the should be:
D3Dviewport.Width = viewport.extent.x;
D3Dviewport.Height = viewport.extent.y;
I found this problem when I ported the fxGUISnooper to the TSE. I have multiple viewports and only the leftmost was working.
I have found what appears to be a bug in GFXD3DDevice::unProject. The D3Dviewport width and height are being calculated incorrectly. This bug would only be apparent if you have multiple viewports, or an offset viewport. The lines currently read:
D3Dviewport.Width = viewport.extent.x - viewport.point.x;
D3Dviewport.Height = viewport.extent.y - viewport.point.y;
and the should be:
D3Dviewport.Width = viewport.extent.x;
D3Dviewport.Height = viewport.extent.y;
I found this problem when I ported the fxGUISnooper to the TSE. I have multiple viewports and only the leftmost was working.
About the author
Working on using Torque as an Image Generator for Tactical Simulations under laser and live fire conditions, for Law Enforcement/Military applications.
Torque Owner Brian Ramage
Black Jacket Games