Commits on May 30, 2008
  1. Updated ChangeLog

    robertosfield committed May 30, 2008
  2. Added version check on FIND_PACKAGE(PkgConfig) to attempt to fix buil…

    …d with older versions of CMake
    robertosfield committed May 30, 2008
  3. Updated ChangeLog

    robertosfield committed May 30, 2008
  4. From Jean-Sebastien Guay, "This is a fix for the warning we've been d…

    …iscussing on osg-users. CMake 2.6.0 allows quotes to be unescaped in strings in ADD_DEFINITIONS statements, where we had to escape them before (CMake 2.4.x). Setting CMake policy CMP0005 to OLD removes the warning for 2.6.0, and the quotes are still escaped, so it still works with 2.4.x.
    robertosfield committed May 30, 2008
  5. From Luc Frauciel, Added support for osgTerrain::ValidDataOperator.

    From Robert Osfield, added versioning to the above.
    robertosfield committed May 30, 2008
Commits on May 29, 2008
Commits on May 28, 2008
  1. From Wojiech Lewandowski, Workaround for wglMakeCurrent bug in NVidia…

    … drivers by
    calling wglMakeCurrent twice.
    This bug has been reported to NVidia, confirmed and fixed by NVidia but awaits verifiaction and release if a driver which fixes this bug.
    robertosfield committed May 28, 2008
  2. Updated wrappers

    robertosfield committed May 28, 2008
  3. From Thibault Genessay, "The PNG plugin crashes when you try to read …

    …a malformed file (attached
    is an example). This can happen in circumstances that are not
    manageable by the OSG itself (e.g. 3rd party buggy program) but one
    would expect the plugin to be able to recover by returning
    libpng provides two callbacks for warnings and errors - those are
    currently unused. By default, they point to function that call exit()
    or something similar (the default error callback never returns). This
    patch registers the callbacks using libpng's mechanisms, makes the
    warning callback emit an osg::notify(osg::WARN) message and the error
    callback throw an error. The reading process is enclosed in a
    try...catch block. Upon error, the memory is freed and
    ReadResult::ERROR_IN_READING_FILE is returned.
    robertosfield committed May 28, 2008
  4. From Thibault Genessay, "On Windows, when setting a cursor through

    osgViewer::GraphicsWindow::setCursor() the new cursor type is recorded
    but not applied until windows sends another WM_SETCURSOR message. This
    delays the application of the cursor to the next mouse event.
    The attached file fixes this by setting the new cursor with a call to
    ::SetCursor() immediately.
    robertosfield committed May 28, 2008
  5. From Michael Platings, "Yes it's definitely a driver problem - I subm…

    …itted a bug report to
    nvidia 6 months ago and the issue is still "in progress". I've given up
    waiting for them!
    Platform - various Intel Windows XP SP2 PCs with various nvidia cards
    including GeForce 8800 GTS and Quadro FX 4500, and various driver
    versions including the latest WHQL 175.16.
    I investigated your concerns about glGenerateMipmapEXT being slower than
    GL_GENERATE_MIPMAP_SGIS, and for power-of-two textures, to my surprise
    it is. For a 512*512 texture, glGenerateMipmapEXT takes on average 10ms,
    while GL_GENERATE_MIPMAP_SGIS takes on average 6ms. Therefore I have
    modified the code to only use glGenerateMipmapEXT if the texture has a
    non-power-of-two width or height. I am resubmitting all the files
    previously submitted (only "Texture.cpp" has significant changes since
    my previous submission, I've also replaced tabs with spaces in
    robertosfield committed May 28, 2008
  6. From Mathieu Marache,

    first post:
    "I had the problem that debug and release version of the plugins had the same name under linux. These minors modification to Registry and the CMake support files enable to have both Release and Debug version of the plugins to coexist and be found by there respective runtimes."
    follow up post:
    "I've gone ahead and added a preprocessor directive with the editable CMAKE_DEBUG_POSTFIX. I modified Registry.cpp to take this new preprocessor directive called OSG_DEBUG_POSTFIX while looking for libraries in Debug mode for the windows (msvc) and the linux platforms.
    MinGW, cygwin and Apple are still left out this proposal."
    Notes from Robert Osfield, completed the work in change d entries to use OSG_DEBUG_POSTFIX
    robertosfield committed May 28, 2008
  7. Updated wrappers

    robertosfield committed May 28, 2008
  8. From Michael Platings, "On nvidia cards mipmap generation for non-pow…

    …er-of-two textures with
    GL_GENERATE_MIPMAP_SGIS is very slow (over half a second for a 720*576
    texture). However, glGenerateMipmapEXT() performs well (16ms for the
    same texture), so I have modified the attached files to use
    Texture::generateMipmap() if glGenerateMipmapEXT is supported, instead
    of enabling & disabling GL_GENERATE_MIPMAP_SGIS."
    Notes, from Robert Osfield, I've tested the out of the previous path using
    GL_GENERATE_MIPMAP_SGIS and non power of two textures on NVidia 7800GT and
    Nvidia linux drivers with the image size 720x576 and only get compile times
    of 56ms, so the above half second speed looks to be a driver bug.  With
    Muchael's changes the cost goes done to less than 5ms, so it's certainly 
    an effective change, even given that Michael's poor expereiences with
    GL_GENERATE_MIP_SGIS do look to be a driver bug.
    robertosfield committed May 28, 2008
Commits on May 27, 2008
  1. From Brad Anderegg, "This submission fixes two bugs and helps some pe…

    …rformance problems we have been having with txp databases.
    The first bug is that the terrain tiles will page out to a lower LOD when they are right in front of you.  The issue appears to be with the blacklisting heuristic which forces a tile to LOD 1, commenting out the usage of blacklisting with the LOD Nodes fixes our problem.  This code change was made to line 29 of TXPPageLOD.cpp.
    The second bug we were experiencing is that the database reader options never make it through to the archive loader.  The use case for us appeared when the FID codes for the terrain were no longer on the materials.  As it turns out the archive was being created twice, once by TXPNode and once by the ReaderWriterTXP on getArchive() so the options never actually got set on the archive that was being loaded.  The fix is to first create the archive by calling getArchive on the ReaderWriterTXP, which stores it in a map for reference later, and then passing that archive into the TXPNode for it to set its internal member.  With this code change we only create one archive (not sure what creating two did) and our options flags get set properly on the database.
    The changes made are in TXPNode.h line 72 where the TXPArchive is now passed in.  In the TXPNode.cpp the loadArchive(TXPArchive*) was changed to have the default behavior if NULL is passed in, if an archive is passed in then it does not load it since all the loading is done in the ReaderWriterTXP::getArchive().  The only other place that loadArchive is called is in TXPIO.cpp where a modification was made to pass in NULL which will have the same behavior as it used to.  The last change is the little block of code starting on line 57 of ReaderWriterTXP.cpp, this was changed so that it first calls getArchive() which caches the archives in a map does some loading stuff and returns a pointer to it which is then passed in as a parameter to TXPNode::loadArchive().
    The performance changes were made to TXPParser.cpp line 163 where we use to osgUtil::Optimizer on the node before passing it off, and on line 1456 we changed the geometry to use display lists.  These small changes actually made drastic performance increases for us, as much as 1000% on certain laptops.
    As far as testing goes, we have tested these changes with at least 5 txp databases on a variety of different computers including Mac OS and Linux.  The base version used is 2.4."
    robertosfield committed May 27, 2008
  2. From Cedric Pinson, "By default it's the normal behaviour, it means i…

    …t's "d" extension for debug library and executable. But if you want to change that you can.
    The reason is if you want to build an application that use a library that use openscenegraph you have to build the full chain in debug or in release.
    On windows you have no choice, but on linux you can link with both version without rebuilding everything ...
    The patch consist only to change the line on one line
    SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows")"
    robertosfield committed May 27, 2008
  3. Updated wrappers

    robertosfield committed May 27, 2008
  4. Reorginized the TerrainTile/TerrainTechnique dirty mechanism so that …

    now holds the dirty flag and enables/disables event traversal in response dirty
    being set/unset.  This allows terrain to be automatically updated in response
    to Terrain scale and sample ratio changes.
    robertosfield committed May 27, 2008
  5. Introduced a TerrainHandler that adjust the sameple ratio and vertica…

    …l scale
    of terrain interactively using the 'r','R' and 'v','V' keys respecitvely.
    robertosfield committed May 27, 2008
  6. From John Vidar Larring, "Added vertical scale as a property of osgTe…

    …rrain::Terrain. Lets you configure vertical scale when initializing the terrain model. E.g:
      osgTerrain::Terrain* terrain = findTopMostNodeOfType<osgTerrain::Terrain>(model.get());
      if (!terrain)
          terrain = new osgTerrain::Terrain;
          model = terrain;
    robertosfield committed May 27, 2008
  7. From Gino van den Bergen, "I've refactored the single ReadedWriterVRM…

    …L2.cpp into multiple files. The reason for doing this was to break up the horribly long function
    osg::ref_ptr<osg::Node> ReaderWriterVRML2::convertFromVRML(openvrml::node *obj)
    The fixes are:
    * Added the source's parent directory as search directory for image files.
    * The material properties are now set in the stateset of the Geode rather than the Geometry. This will allow geometries to be reused with different material properties in future updates.
    NB: I planned for a caching scheme in which multiple occurences of the same primitive (e.g., Cylinders with radius 0.8 and height 1.2), would use the same Geometry object. Unfortunately, my planning moved me to other areas, but I might still finish the caching scheme in a quiet hour. For the time being I decided it would be a good thing to already submit my current changes.
    robertosfield committed May 27, 2008
  8. From Mathias Froehlich, "Included a fix for my past pbuffer change. T…

    …he version test fo 'need at least
    glx 1.1' was broken, even if no implementation had yet a chance to trigger
    that :)
    Attached a fix for that broken test.
    Based on rev 8358"
    robertosfield committed May 27, 2008