Wild Magic 4.4 to 4.5 Update Log

//----------------------------------------------------------------------------
(4.0.3) LibGraphics/ObjectSystem/Wm4Stream.cpp

The conversion to support 64-bit platforms was not correct on the big-endian
Macintosh.  The Read function needed to load the last four bytes of acTmp,
not the first four bytes.
//----------------------------------------------------------------------------
(4.0.3) SampleGraphics/Lighting/Lighting.cpp

The logic was incorrect when lights were added and all removed--the
sphere and plane needed to resort to using the default shader effect.
//----------------------------------------------------------------------------
(4.0.4) LibGraphics/Geometry/Wm4Geometry.cpp

In the case when there are no lights and the Geometry object's LightEffect
exists, an application had attached lights to the scene that affected the
object but then detached those lights.  The UpdateState had an 'assert' in
this case m_kEffects.begin() points to m_spkLEffect.  However, it is
possible that DetachAllEffects was called on this object, to m_kEffects has
no elements.  The 'assert' was removed and the erase call was modified to
do so only when m_kEffects has an element.
//----------------------------------------------------------------------------
(4.5.0) ToolUtility/WmifViewer/WmifViewer_VC60.dsp
(4.5.0) ToolUtility/WmifViewer/WmifViewer_VC70.vcproj
(4.5.0) ToolUtility/WmifViewer/WmifViewer_VC71.vcproj
(4.5.0) ToolUtility/WmifViewer/WmifViewer_VC80.vcproj
(4.5.0) ToolUtility/WmifViewer/WmifViewer.xcodeproj/project.pbxproj
(4.5.0) ToolUtility/WmifViewer/WmifViewer.h
(4.5.0) ToolUtility/WmifViewer/WmifViewer.cpp

A viewer for *.wmif files, including support for the newly added Image
formats.
//----------------------------------------------------------------------------
(4.0.3) SampleGraphics/RenderToTexture/RenderToTexture.cpp

Added conditionally compiled blocks to illustrate the different formats you
can use for framebuffer objects.
//----------------------------------------------------------------------------
(4.3.2) LibRenderers/OpenGLRenderer/GTglPlugin.cpp

Added a case to the switch statement to handle invalid framebuffer
operations.
//----------------------------------------------------------------------------
(4.0.1) LibRenderers/OpenGLRenderer/Wm4OpenGLFramebuffer.h
(4.0.1) LibRenderers/OpenGLRenderer/Wm4OpenGLFramebuffer.cpp

Added a Boolean flag to keep track of whether the object is enabled or
disabled.  Added support for reading the pixels for the various framebuffer
formats.
//----------------------------------------------------------------------------
(4.0.1) LibGraphics/Rendering/Wm4Image.h
(4.0.2) LibGraphics/Rendering/Wm4Image.cpp
(4.0.3) LibRenderers/OpenGLRenderer/Wm4OpenGLResourcesLR.cpp
(4.0.2) LibRenderers/Dx9Renderer/Wm4Dx9Renderer.h
(4.0.2) LibRenderers/Dx9Renderer/Wm4Dx9ResourcesLR.cpp

Changed the flag names IT_RGB32 and IT_RGBA32 to IT_RGB32F and IT_RGBA32F to
emphasize they are floating-point formats.  Added IT_RGB16F and IT_RGBA16F
for half-float formats.  Added IT_INTENSITY8I and IT_INTENSITY16I (integer
formats), IT_INTENSITY16F (half-float format), and IT_INTENSITY32F (float
format).  Added support for the new formats to the OpenGL and Direct3D
renderers (but not the software renderer).  Added another parameter to
Image::Load, indicating whether or not the input path is absolute.  When it
is, the path is used as-is (no name decoration).
//----------------------------------------------------------------------------
(4.0.2) SampleImagics/ImViewer/ImViewer.cpp

The string m_acPixelStr needed to be initialized in the constructor;
otherwise, the program crashes when a small image is loaded and a mouse
click occurs outside the image boundary.
//----------------------------------------------------------------------------
(4.0.2) LibRenderers/SoftRenderer/Wm4SoftSampler3.cpp

CreateMipmaps had two lines "int iYB = m_aiXBound[0];" that should be
"int iYB = m_aiYBound[0];".
//----------------------------------------------------------------------------
(4.0.2) SampleGraphics/Lighting/Lighting.cpp

The 1/sqrt(3) value used to create the directional lights was computed in
the wrong place.  It occurred before the ambient color creation, causing the
ambient colors to be incorrect.
//----------------------------------------------------------------------------
(4.0.2) LibPhysics/Intersection.Wm4IntersectingIntervals.cpp
(4.0.2) LibPhysics/Intersection.Wm4IntersectingRectangles.cpp
(4.0.2) LibPhysics/Intersection.Wm4IntersectingBoxes.cpp

The IntersectingIntervals::Update function had the comparison
"if (rkI0[1] >= rkI1[0])" to test for overlap.  This should be
"if (rkI0[0] <= rkI1[1])".  The old code always led to insertion, but happened
to work, because later the erase function would be called (due to the
insertion sort swapping one pair of points at a time).  I also corrected the
comments for this block of code in all the Update functions.  Finally, the
comparisons "if (kE0.Index < kE1.Index)" are not needed, because the EdgeKey
class orders the indices as needed.
//----------------------------------------------------------------------------
(4.0.3) LibFoundation/Mathematics/Wm4Matrix4.inl

Removed the declaration of the unused variable "i" in operator/=.
//----------------------------------------------------------------------------
Attributes, VertexBuffer, and Program were modified to support the semantics
that are associated with Shader Model 3. POSITION, NORMAL, COLOR*, and
TEXCOORD* were already supported. Now BLENDWEIGHT, BLENDINDICES, FOG, PSIZE,
TANGENT, and BITANGENT are supported. In the process, I changed Attribute
member names. The substring changes: PChannel to PositionChannel, NChannel to
NormalChannel, CChannel to ColorChannel, and TChannel to TCoordChannel. This
affects a lot of the sample application files. The Direct3D renderer used the
FVF (flexible vertex format) for packing vertex buffers. To support the new
semantics, the renderer now uses "vertex declarations". The streaming version
has changed to 4.04, because Attributes has new members to save/load. Version
4.03 files are still loadable (code is in place to make the conversion
automatically). I also modified some Program member names to be more verbose.
GetRC becomes GetRendererConstant, GetNC becomes GetNumericalConstant, GetUC
becomes GetUserConstant, and GetSI becomes GetSamplerInformation.

(4.0.2) LibGraphics/Curves/Wm4CurveMesh.cpp
(4.0.2) LibGraphics/Effects/Wm4ShaderEffect.cpp
(4.0.4) LibGraphics/ObjectSystem/Wm4StreamVersion.cpp
(4.0.4) LibGraphics/ObjectSystem/Wm4StreamVersion.h
(4.0.5) LibGraphics/Rendering/Wm4Renderer.cpp
(4.0.1) LibGraphics/SceneGraph/Wm4Attributes.cpp
(4.0.1) LibGraphics/SceneGraph/Wm4Attributes.h
(4.0.1) LibGraphics/SceneGraph/Wm4Attributes.inl
(4.0.1) LibGraphics/SceneGraph/Wm4Particles.cpp
(4.0.2) LibGraphics/SceneGraph/Wm4StandardMesh.cpp
(4.0.1) LibGraphics/SceneGraph/Wm4Triangles.cpp
(4.0.1) LibGraphics/SceneGraph/Wm4VertexBuffer.cpp
(4.0.1) LibGraphics/SceneGraph/Wm4VertexBuffer.h
(4.0.3) LibGraphics/Shaders/Wm4Program.cpp
(4.0.2) LibGraphics/Shaders/Wm4Program.h
(4.0.1) LibGraphics/Shaders/Wm4Program.inl
(4.0.2) LibGraphics/Shaders/Wm4Shader.cpp
(4.0.1) LibGraphics/Surfaces/Wm4BoxSurface.cpp
(4.0.1) LibGraphics/Surfaces/Wm4RectangleSurface.cpp
(4.0.2) LibGraphics/Surfaces/Wm4SurfaceMesh.cpp
(4.0.1) LibGraphics/Surfaces/Wm4TubeSurface.cpp
(4.0.1) LibRenderers/Dx9Renderer/Wm4Dx9Resources.h
(4.0.2) LibRenderers/Dx9Renderer/Wm4Dx9ResourcesED.cpp
(4.0.3) LibRenderers/Dx9Renderer/Wm4Dx9ResourcesLR.cpp
(4.0.2) LibRenderers/OpenGLRenderer/Wm4OpenGLResourcesED.cpp
(4.0.1) LibRenderers/SoftRenderer/Wm4SoftSampler1.cpp
(4.0.1) LibRenderers/SoftRenderer/Wm4SoftSampler2.cpp
(4.0.1) LibRenderers/SoftRenderer/Wm4SoftSampler3.cpp
(4.0.1) LibRenderers/SoftRenderer/Wm4SoftSamplerProj.cpp
(4.0.1) SampleFoundation/BSplineFitContinuous/BSplineFitContinuous.cpp
(4.0.1) SampleFoundation/BSplineFitDiscrete/BSplineFitDiscrete.cpp
(4.0.4) SampleFoundation/ConvexHull3D/ConvexHull3D.cpp
(4.0.1) SampleFoundation/Delaunay3D/Delaunay3D.cpp
(4.0.2) SampleFoundation/GeodesicHeightField/GeodesicHeightField.cpp
(4.0.1) SampleGraphics/BillboardNodes/BillboardNodes.cpp
(4.0.1) SampleGraphics/BlendedTerrain/BlendedTerrain.cpp
(4.0.1) SampleGraphics/BlendedTerrainEffect/BlendedTerrainEffect.cpp
(4.0.1) SampleGraphics/BspNodes/BspNodes.cpp
(4.0.2) SampleGraphics/BumpMaps/BumpMaps.cpp
(4.0.2) SampleGraphics/BumpMaps/SimpleBumpMapEffect.cpp
(4.0.3) SampleGraphics/CameraAndLightNodes/CameraAndLightNodes.cpp
(4.0.1) SampleGraphics/Charcoal/Charcoal.cpp
(4.0.1) SampleGraphics/Charcoal/CharcoalEffect.cpp
(4.0.4) SampleGraphics/ClodMeshes/ClodMeshes.cpp
(4.0.2) SampleGraphics/ClodTerrains/ClodTerrains.cpp
(4.0.2) SampleGraphics/Collisions/Collisions.cpp
(4.0.1) SampleGraphics/CubeMaps/CubeMaps.cpp
(4.0.1) SampleGraphics/CubeMaps/CubeMapEffect.cpp
(4.0.1) SampleGraphics/DlodNodes/DlodNodes.cpp
(4.0.1) SampleGraphics/GlossMaps/GlossMaps.cpp
(4.0.1) SampleGraphics/InverseKinematics/InverseKinematics.cpp
(4.0.1) SampleGraphics/Iridescence/Iridescence.cpp
(4.0.1) SampleGraphics/Iridescence/IridescenceEffect.cpp
(4.0.1) SampleGraphics/Lighting/Lighting.cpp
(4.0.1) SampleGraphics/MaterialTextures/MaterialTextures.cpp
(4.0.2) SampleGraphics/MorphControllers/MorphControllers.cpp
(4.0.1) SampleGraphics/Multieffects/Multieffects.cpp
(4.0.1) SampleGraphics/Multitextures/Multitextures.cpp
(4.0.1) SampleGraphics/NonuniformScale/NonuniformScale.cpp
(4.0.1) SampleGraphics/ParticleSystems/ParticleSystems.cpp
(4.0.1) SampleGraphics/PlanarReflections/PlanarReflections.cpp
(4.0.1) SampleGraphics/PlanarShadows/PlanarShadows.cpp
(4.0.2) SampleGraphics/PointSystems/PointSystems.cpp
(4.0.1) SampleGraphics/PolygonOffsets/PolygonOffsets.cpp
(4.0.1) SampleGraphics/Polylines/Polylines.cpp
(4.0.1) SampleGraphics/Portals/Portals.cpp
(4.0.1) SampleGraphics/ReflectionsAndShadows/ReflectionsAndShadows.cpp
(4.0.2) SampleGraphics/Refraction/Refraction.cpp
(4.0.1) SampleGraphics/Refraction/RefractionEffect.cpp
(4.0.2) SampleGraphics/RenderToTexture/RenderToTexture.cpp
(4.0.1) SampleGraphics/RipplingOcean/RipplingOcean.cpp
(4.0.1) SampleGraphics/RipplingOcean/RipplingOceanEffect.cpp
(4.0.1) SampleGraphics/ScreenPolygons/ScreenPolygons.cpp
(4.0.1) SampleGraphics/ShadowMaps/ShadowMaps.cpp
(4.0.2) SampleGraphics/ShadowMaps/ShadowMapEffect.cpp
(4.0.1) SampleGraphics/SkinnedBiped/SkinnedBiped.cpp
(4.0.1) SampleGraphics/Skinning/Skinning.cpp
(4.0.1) SampleGraphics/Skinning/SkinningEffect.cpp
(4.0.1) SampleGraphics/SortFaces/SortedCube.cpp
(4.0.1) SampleGraphics/SphereMaps/SphereMaps.cpp
(4.0.1) SampleGraphics/SurfaceMeshes/SurfaceMeshes.cpp
(4.0.1) SampleGraphics/SwitchNodes/SwitchNodes.cpp
(4.0.2) SampleGraphics/Terrains/Terrains.cpp
(4.0.2) SampleGraphics/Terrains/TerrainEffect.cpp
(4.0.4) SampleGraphics/TriStripsFans/TriStripsFans.cpp
(4.0.1) SampleGraphics/VolumeFog/VolumeFog.cpp
(4.0.1) SampleGraphics/VolumeTextures/VolumeTextures.cpp
(4.0.2) SampleImagics/ConformalMapping/ConformalMapping.cpp
(4.0.2) SampleImagics/ExtractLevelCubes/ExtractLevelCubes.cpp
(4.0.2) SampleImagics/ExtractLevelTetra/ExtractLevelTetra.cpp
(4.0.1) SamplePhysics/BallHill/BallHill.cpp
(4.0.1) SamplePhysics/BouncingBall/BouncingBall.cpp
(4.0.1) SamplePhysics/BouncingBall/DeformableBall.cpp
(4.0.2) SamplePhysics/BouncingSpheres/BouncingSpheres.cpp
(4.0.1) SamplePhysics/BouncingSpheres/RigidBall.cpp
(4.0.1) SamplePhysics/BouncingTetrahedra/BouncingTetrahedra.cpp
(4.0.1) SamplePhysics/BouncingTetrahedra/RigidTetra.cpp
(4.0.1) SamplePhysics/Cloth/Cloth.cpp
(4.0.1) SamplePhysics/ExtremalQuery/ExtremalQuery.cpp
(4.0.1) SamplePhysics/FlowingSkirt/FlowingSkirt.cpp
(4.0.2) SamplePhysics/FoucaultPendulum/FoucaultPendulum.cpp
(4.0.2) SamplePhysics/FreeFormDeformation/FreeFormDeformation.cpp
(4.0.1) SamplePhysics/FreeTopFixedTip/FreeTopFixedTip.cpp
(4.0.1) SamplePhysics/GelatinBlob/GelatinBlob.cpp
(4.0.1) SamplePhysics/GelatinCube/GelatinCube.cpp
(4.0.1) SamplePhysics/HelixTubeSurface/HelixTubeSurface.cpp
(4.0.1) SamplePhysics/IntersectBoxes/IntersectBoxes.cpp
(4.0.1) SamplePhysics/MassPulleySpringSystem/MassPulleySpringSystem.cpp
(4.0.2) SamplePhysics/PolyhedronDistance/PolyhedronDistance.cpp
(4.0.2) SamplePhysics/Rope/Rope.cpp
(4.0.2) SamplePhysics/RoughPlaneSolidBox/RoughPlaneSolidBox.cpp
(4.0.2) SamplePhysics/SimplePendulumFriction/SimplePendulumFriction.cpp
(4.0.1) SamplePhysics/WaterDropFormation/WaterDropFormation.cpp
(4.0.1) SamplePhysics/WrigglingSnake/WrigglingSnake.cpp

//----------------------------------------------------------------------------
(4.3.2) LibGraphics/OpenGLRenderer/GTwglExtensions.cpp

Expanded the macro in GTwglSwapIntervalEXT and removed the GT_NULL_FUNCTION
macro call (to disable the call to ReportNullFunction that triggers an
assertion).  On notebook computers that do not allow drawing during vertical
retrace, the applications will still run.
//----------------------------------------------------------------------------
(4.0.1) LibGraphics/Controllers/Wm4Controller.cpp
(4.0.1) LibGraphics/Controllers/Wm4IKController.cpp
(4.0.1) LibGraphics/Controllers/Wm4IKGoal.cpp
(4.0.1) LibGraphics/Controllers/Wm4IKJoint.cpp
(4.0.2) LibGraphics/Controllers/Wm4KeyframeController.cpp
(4.0.1) LibGraphics/Controllers/Wm4MorphController.cpp
(4.0.1) LibGraphics/Controllers/Wm4SkinController.cpp
(4.0.1) LibGraphics/Curves/Wm4CurveMesh.cpp
(4.0.1) LibGraphics/Detail/Wm4BillboardNode.cpp
(4.0.2) LibGraphics/Detail/Wm4ClodMesh.cpp
(4.0.1) LibGraphics/Effects/Wm4ShaderEffect.cpp
(4.0.2) LibGraphics/Effects/Wm4PlanarReflectionEffect.cpp
(4.0.1) LibGraphics/Effects/Wm4PlanarShadowEffect.cpp
(4.0.1) LibGraphics/ObjectSystem/Wm4Object.cpp
(4.0.1) LibGraphics/ObjectSystem/Wm4Stream.h
(4.0.2) LibGraphics/ObjectSystem/Wm4Stream.cpp
(4.0.1) LibGraphics/ObjectSystem/Wm4StreamMCR.h
(4.0.3) LibGraphics/ObjectSystem/Wm4StreamVersion.h
(4.0.3) LibGraphics/ObjectSystem/Wm4StreamVersion.cpp
(4.0.1) LibGraphics/SceneGraph/Wm4CameraNode.cpp
(4.0.3) LibGraphics/SceneGraph/Wm4Geometry.cpp
(4.0.1) LibGraphics/SceneGraph/Wm4LightNode.cpp
(4.0.3) LibGraphics/SceneGraph/Wm4Node.cpp
(4.0.3) LibGraphics/SceneGraph/Wm4Spatial.cpp
(4.0.1) LibGraphics/Shaders/Wm4Shader.cpp
(4.0.1) LibGraphics/Sorting/Wm4ConvexRegion.cpp
(4.0.1) LibGraphics/Sorting/Wm4Portal.cpp
(4.0.1) LibGraphics/Surfaces/Wm4SurfaceMesh.cpp
(4.0.4) LibGraphics/Terrain/Wm4ClodTerrain.cpp
(4.0.3) LibGraphics/Terrain/Wm4Terrain.cpp
(4.4.0) Data/Wmof/ConvertToVersion403.h
Data/Wmof/ConvertToVersion403.cpp
Data/Wmof/ConvertToVersion403_VC60.dsp
Data/Wmof/ConvertToVersion403_VC70.vcproj
Data/Wmof/ConvertToVersion403_VC71.vcproj
Data/Wmof/ConvertToVersion403_VC80.vcproj
Data/Wmof/ConvertToVersion403.xcodeproj/project.pbxproj

Modified the streaming system so that it works on 64-bit platforms, where the
pointers are 8-bytes in size.  Before this change, the stream file version
was 4.02.  The version number was incremented to 4.03.  After the change, the
engine can no longer read the version 4.02 files.  However, you can
automatically convert those files.  Read the description of this at the end
of the file, Wm4StreamMCR.h.  Any *.wmof files distributed with Wild Magic
4.4 should be deleted and replaced by the ones in the patch file
WildMagic4p4_64BitPatch.zip.
//----------------------------------------------------------------------------
(4.4.0) LibFoundation/Meshes/Wm4VETMesh.h
(4.4.0) LibFoundation/Meshes/Wm4VETMesh.inl
(4.4.0) LibFoundation/Meshes/Wm4VETMesh.cpp
(4.0.8) LibFoundation/Wm4Foundation.h
(4.0.7) LibFoundation/Wm4FoundationPCH.h

Ported the old VETMesh class (vertex-edge-triangle data structure) from Wild
Magic 2 to Wild Magic 4.
//----------------------------------------------------------------------------
