http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/
> "Both gcc and MSVC are smart enough to optimize out the evaluation of x, but only if they can determine if there are no side effects associated with the evaluation. Unfortunately, this can only be done if the body of x is known entirely to the compiler. If x is a function call to another module MSVC can still make it go away with Link-Time Code Generation (via cross-module inlining), but poor gcc is dead in the water and emits the call. Either way, we’re relying on compiler and linker optimizations to make this code go away."
- Modified OculusVRSensorData::compare() to only work with the raw
sensor data when specifically requested. No need to process those
values if the user hasn't asked for them.
- Now requires OVR SDK 0.2.5
- New chromatic aberration correction shader. Can be disabled by
setting $pref::OculusVR::UseChromaticAberrationCorrection to false prior
to enabling Rift display (such as for screen shots).
- FXAA on by default when using full screen on the Rift.
- Can now manually override IPD from script. Otherwise value set in
profile is used.
- Raw sensor data now available through input events (set
$OculusVR::GenerateSensorRawEvents to true) and console methods. The
raw data is acceleration, angular velocity, and magnetometer reading.
- Can determine if magnetometer calibration data is available using a
console method in order to notify the user.
- Side by side rendering implemented throughout the graphics pipeline.
- New GuiTSCtrl renderStyle property is set to "stereo side by side" to
activate.
- You set an IDisplayDevice on the GameConnection to define any vertical
FOV, projection offset, and stereo eye offset properties required for
the stereo rendering (no display device included with this commit).
- Full and Empty templates updated with correct scripts and shaders.
Not all platforms currently support the PVI_NumAdapters query from
PlatformVideoInfo. This fix puts in the assumption that there is always
1 adapter if the PVI_NumAdapaters query returns false. This was the
behaviour prior to PVI_NumAdapters being put in place.
The GFX (DirectX) pipeline did not respect the choice of adapter and
always went for the default one. Normally this isn't an issue unless
you wish to target a particular adapter and display device combination.
This has been corrected.
The GFX initialize functions now attempt to find the best adapter that
matches a given display device (i.e. monitor) if one has been passed in.
To aid with choosing a display device some new monitor enumeration
methods have been added to the platform window manager. These methods
have been exposed to the Canvas.
- displaySplashWindow() now takes an optional path to a bitmap file.
- Missing, unavailable and warning texture paths now come from
GFXTextureManager static methods.
- New InputEventManager class. It will be used by 3rd party input
devices to generate Torque 3D input events.
- Expanded the input event signal to include three new floats and a new
integer.
- Expanded the number of joystick buttons to 48.
- The input virtual map is now extendable rather than hard coded.
- The input devices types are now extendable rather than hard coded.
- New SI_POS, SI_ROT, SI_INT, and SI_FLOAT input event types.
- New SI_VALUE input action type.
- ActionMap has been updated to work with these changes.
- Removed unnecessary references to platform/event.h
Looks like GCC (4.4.x) on RHEL is built with some optimization flags, which caused crash inside assembler code (when using inline-cast: uint->uchar->uint from GetNzbSubID down to find_maskwidth).
Tested this change on 7 different distros, so far - everything seems to be working.