Latest Checkin
by Ben Garney · in Torque Game Engine Advanced · 02/10/2005 (5:50 pm) · 24 replies
Hey guys,
I added some stuff from my terrain work to TSE. Brief summary:
- Limited hackery to support multithreading. (Enable with TORQUE_MT_HACKS macros.)
- Added getThreadId() to Thread platform class; returns opaque token uniquely identifying active thread.
- Removed extant BSP collision hooks.
- Some basic support for loading DDS files.
- Support for compressed textures.
- Error cleanups, code formatting.
- Added some safety checks for GlowBuffer to avoid crashes.
- New math code; helper methods on PlaneF, Point2I, and a Box3I class.
Have fun! :)
I added some stuff from my terrain work to TSE. Brief summary:
- Limited hackery to support multithreading. (Enable with TORQUE_MT_HACKS macros.)
- Added getThreadId() to Thread platform class; returns opaque token uniquely identifying active thread.
- Removed extant BSP collision hooks.
- Some basic support for loading DDS files.
- Support for compressed textures.
- Error cleanups, code formatting.
- Added some safety checks for GlowBuffer to avoid crashes.
- New math code; helper methods on PlaneF, Point2I, and a Box3I class.
Have fun! :)
#22
03/14/2005 (11:22 am)
The Feb2005 SDK doesn't support VC6 at all. Dec2004 does if you grab the Extras download.
#23
03/14/2005 (7:25 pm)
That info is greatly appreciated Ken--I'll back track the SDK or upgrade to VC7--Thx!!
#24
VC7 includes a new feature that inserts runtime buffer overrun checks into your Release builds by default. This runtime check uses a VC7 runtime library function that is not available in VC6, so you need to disable the feature when linking with VC6 libraries. To disable it, go to project properties and select the desired configurations, then navigate to settings for C/C++->Code Generation. Change the setting for 'Buffer Security Check' to 'No'. Changing this setting prevents the following linker errors:
error LNK2019: unresolved external symbol ___security_cookie referenced in...
error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in...
In VC6, casting a floating point number to a long caused the compiler to generate a call to a hidden library function named _ftol. VC7 generates a call to _ftol2 (obviously the implementation of this function changed, so the name was changed to prevent version clashes). If your source code includes a cast from double to long types, VC7 will generate a call to _ftol2, and the following linker error will result:
error LNK2001: unresolved external symbol __ftol2
Resolve this error by placing the following in one of your .cpp files:
Edit: OK, everything compiled fine on VC6 with the october version (except max2dtsExporter[4]).
03/14/2005 (9:11 pm)
Well, december was not far enough back--appears the october release is what is needed for VC6. However, I did find out what is causing the problems:VC7 includes a new feature that inserts runtime buffer overrun checks into your Release builds by default. This runtime check uses a VC7 runtime library function that is not available in VC6, so you need to disable the feature when linking with VC6 libraries. To disable it, go to project properties and select the desired configurations, then navigate to settings for C/C++->Code Generation. Change the setting for 'Buffer Security Check' to 'No'. Changing this setting prevents the following linker errors:
error LNK2019: unresolved external symbol ___security_cookie referenced in...
error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in...
In VC6, casting a floating point number to a long caused the compiler to generate a call to a hidden library function named _ftol. VC7 generates a call to _ftol2 (obviously the implementation of this function changed, so the name was changed to prevent version clashes). If your source code includes a cast from double to long types, VC7 will generate a call to _ftol2, and the following linker error will result:
error LNK2001: unresolved external symbol __ftol2
Resolve this error by placing the following in one of your .cpp files:
#if (_MSC_VER >= 1300) && (WINVER < 0x0500)
//VC7 or later, building with pre-VC7 runtime libraries
extern "C" long _ftol( double ); //defined by VC6 C libs
extern "C" long _ftol2( double dblSource ) { return _ftol( dblSource ); }
#endifEdit: OK, everything compiled fine on VC6 with the october version (except max2dtsExporter[4]).
Torque Owner Desmond Fletcher
fletcher