Commit Graph

2562 Commits

Author SHA1 Message Date
Robert Osfield
5a4ce5a387 From Mathias Froechlich, "Attached is a change to that atomic stuff to move the win32, msvc
implementation of the atomic increment and decrement into a implementation
file.
This way inlining and compiler optimization can no longer happen for these
implementations, but it fixes compilation on win32 msvc targets. I expect
that this is still faster than with with mutexes.

Also the i386 gcc target gets atomic operations with this patch. By using an
implementation file we can guarantee that we have the right compiler flags
available."
2008-06-26 10:27:16 +00:00
Robert Osfield
37765805ff Fixed pedantic warning 2008-06-23 15:11:37 +00:00
Robert Osfield
0b6e605795 From Mathias Froehlich, "fixed win32/win64 configure check and win32/win64
atomic related compile failures with msvs2005. Attached changes to make win32
really use the atomic stuff. There are pointer typecast problems and some
historic alignment restrictions that I just took from a previous similar
implementation of mine without looking deep enough. "
2008-06-23 14:51:34 +00:00
Robert Osfield
af271f99ec Added support for X11's overrideRedirect functionality 2008-06-21 17:50:58 +00:00
Robert Osfield
a71939c5bb From Mathias Froehlich, moved optional config variables into include/osg/Config file that
is automatically created by cmake according to its own settings.
2008-06-20 15:50:53 +00:00
Robert Osfield
be185cb3af From Terry Welsh, new flatten static transforms visitor that duplicates subgraphs that are shared beneath differnt static transforms
From Robert Osfield, made a range of changes to Terry's visitor integrating it into osgUtil::Optimizer and 
changing the code to use a style more like the rest of the OSG.
2008-06-20 13:16:35 +00:00
Robert Osfield
bc6e5b5da2 Updated version numbers for dev releases 2008-06-20 11:11:47 +00:00
Robert Osfield
3672ba51e7 From Melchior Franz, fixed typo on variable name 2008-06-20 09:46:45 +00:00
Robert Osfield
2011028ee7 From Neil Groves,
"I have taken the liberty of updating a few files so that there is no longer any derivation from std::vector. I have done this by adding a new file osg/MixinVector and by updating only two others: osg/PrimitiveSet and osg/Array. You will notice that this actually removes what is acknowledged as a \u2018hack\u2019 in osg/PrimitiveSet.

With the original code I did manage to find memory leaks with some compiler options on VC 8 and 9, as well as Intel compiler. I determined the leak existence by instrumenting the destructor code, and by use of a garbage collector as a leak detector (in a similar manner to the Firefox project). Hence in contrast to what I said originally, it is exhibiting symptoms on at least some platforms.

Since I am trying to be a good OSG citizen I got out my editor and started hacking! I have built and tested on Linux (Ubuntu) with GCC 4.x and Windows VC 8 SP1. It appears that nothing is broken, and that I\u2019m using less memory J"
2008-06-19 20:38:38 +00:00
Robert Osfield
936edacc92 From Mathias Froehlich, added support for using OpenThreads::Atomic for thread safe ref/unref. 2008-06-19 17:30:38 +00:00
Robert Osfield
0faaf93dc2 From Adrian Egli, "Improvements to the PSSM implementation" 2008-06-19 14:45:54 +00:00
Robert Osfield
dd13893861 From Farshid Lashkari, "I noticed some problems when setting up CameraNodes that inherit
viewport settings in stereo mode. It seems that the SceneView::cull()
method will pass the full size viewport to the left/right
cullvisitors, instead of the modified stereo viewport. I made quite a
few changes to SceneView to fix the issue. The SceneView::cullStage()
method will now receive the viewport as an argument, instead of using
the global viewport. The SceneView::cull() method will pass the
modifed viewport to cullStage when rendering in stereo.

There are 2 new private methods computeLeftEyeViewport() and
computeRightEyeViewport() that will compute the stereo viewports. I
also modified the draw() function so it applies the correct viewport
to the prerender stages. These changes are only necessary for
horizontal/vertical split stereo."
2008-06-19 14:29:38 +00:00
Robert Osfield
4c9b3de4a1 Updated wrappers to fix OpenThreads::Atomic build issues. 2008-06-19 13:28:33 +00:00
Robert Osfield
a94cfccdce From Michael Platings, fixed typo error in renderbin assignment 2008-06-19 12:02:20 +00:00
Robert Osfield
061be3d084 In Program::PerContextProgram changed const Uniform* to osg::ref_ptr<const Uniform*> to avoid the possibility of a uniform being deleted
and another being created and assigned at the same address which previously confused the uniform tracking code and introduced a bug.
2008-06-19 11:58:34 +00:00
Robert Osfield
174f9bbfe0 From Michael Platings and Robert Osfield, added support for controlling,
via StateSet::setNestedRenderBin(bool) whether the new RenderBin should be nested
with the existing RenderBin, or be nested with the enclosing RenderStage.
2008-06-19 11:09:20 +00:00
Robert Osfield
f06d50a7eb From Michael Platings, implemented check against max number of supported samples to ensure that the number of samples is safely capped to what the hardware is capable of, avoiding GL errors and graceful fallback 2008-06-18 20:24:12 +00:00
Robert Osfield
1e5783ece7 Added a wrapString(const char*) which automatically handles null strings. 2008-06-18 16:45:21 +00:00
Robert Osfield
90ea0bd95f From Michael Platings and Paul Palumbo, multi-sample FBO support 2008-06-18 14:09:11 +00:00
Robert Osfield
dd137c2442 From Bob Kuehne, "this submission extends the osgViewer::RecordCameraPathHandler to have an optionally-enabled auto-incrementing filename. default behavior is still the same, but there's one new method to enable autoincrementing filenames."
From Robert Osfield, modified the above so that the number increments come after the filename rather than before.
2008-06-18 11:13:51 +00:00
Robert Osfield
7dc3ad4b5e From David Callu, "fixed bounding box bug" 2008-06-18 10:46:05 +00:00
Robert Osfield
d7e9e5e495 From Mathias Froehlich, OpenThreads::Atomic support 2008-06-17 17:43:59 +00:00
Robert Osfield
7cfe00d3d9 Added overriding of CullSettings::inheritCullSettings() into osg::Camera to
properly inherit the clear colour.
2008-06-16 20:22:16 +00:00
Robert Osfield
4e7dd7f0db Changed class to struct 2008-06-16 16:06:01 +00:00
Robert Osfield
68e750626a Checking in missing header changes 2008-06-16 09:32:22 +00:00
Robert Osfield
3585375d59 Updated versions for 2.5.2 dev release 2008-06-06 17:45:33 +00:00
Robert Osfield
01c284429b From Paul Melis, "Here's an updated include/osgText/Text3D that forces recomputation of the glyph repr when the character depth is updated, also when the rendering mode is set.
This caused a Text3D object read from a .osg file to not have the correct depth."
2008-06-06 16:25:14 +00:00
Robert Osfield
6fb62b9604 Renamed _rendergraph to _stateGraph to better reflect its function 2008-06-06 13:21:57 +00:00
Robert Osfield
cf97035a45 Added OSGDB_EXPORT 2008-06-06 08:42:37 +00:00
Robert Osfield
abfb5bbb8d Added accep(Shape&) 2008-06-05 13:46:19 +00:00
Robert Osfield
282fa84789 Added support for optionally calling releaseContext at the end of each
renderinTraversals() to help with cases where uses are driving multiple
contexts from mulitple viewers in a single threaded frame loop.
2008-06-04 16:46:14 +00:00
Robert Osfield
e09e07d45b Added support for assigning GraphicsContext to individual GUIEventAdapter events,
and use of this within osgViewer::View to better track the sources of events.
2008-06-02 17:34:47 +00:00
Robert Osfield
65772e451c Added applyMaskAction(CLEAR_COLOR) to Camera::setClearColor() to enable proper inheritance 2008-05-30 20:15:31 +00:00
Robert Osfield
0cc38108a5 Fixed cirular reference in DatabaseRequest 2008-05-30 11:43:04 +00:00
Robert Osfield
f07d106366 Moved enum to public scope and rebuilt wrappers to fix wrapper build error 2008-05-29 13:54:59 +00:00
Robert Osfield
1047f970bb From Adrian Egli, improvements to ParallelSplitShadowMap implementation 2008-05-28 14:11:22 +00:00
Robert Osfield
8677c4d6d6 From Michael Platings, "On nvidia cards mipmap generation for non-power-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.
2008-05-28 11:19:41 +00:00
Robert Osfield
4d60d73eca Reorginized the TerrainTile/TerrainTechnique dirty mechanism so that TerrainTile
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.
2008-05-27 15:30:20 +00:00
Robert Osfield
1519d0d546 From John Vidar Larring, "Added vertical scale as a property of osgTerrain::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;
      terrain->addChild(model.get());
      terrain->setVerticalScale(2.0f);
      model = terrain;
  }
  viewerWindow->setSceneData(model.get());
"
2008-05-27 13:11:47 +00:00
Robert Osfield
b41404546e Updated version numbers in prep for 2.5.1 release 2008-05-27 12:07:58 +00:00
Robert Osfield
804c91c8c1 From Art Tevs, "I've attached a patch for the Texture2DArray which solves problems of loading image data into the texture array. So here are a small description:
- Solves issues of loading image data into the texture memory
- Print a warning if images are of different dimensions or have different internal formats (GL specification requires images to be the same)


Patch is tested and seems to work fine. It shouldn't break any other functionality. It should go into include/osg and src/osg
"
2008-05-26 21:53:57 +00:00
Robert Osfield
1f8ff7916c Fixed copyright notice typo 2008-05-26 21:44:14 +00:00
Robert Osfield
cac6e2facb Added continuous recording of the animation path to the RecordAnimationPathHandler 2008-05-26 17:30:43 +00:00
Robert Osfield
a88567a852 Added #define's for PixelBufferObject extensions.
Added docs for Camera::DrawCallback
2008-05-24 11:05:10 +00:00
Robert Osfield
6a16cbfca4 Reorginaized the DatabaseQueue's to avoid warnings under Windows 2008-05-22 12:38:36 +00:00
Robert Osfield
7b003b24ea Refactored DatabasePager and related classes to introduce support for
multi-threaded paging, where the Pager manages threads of reading local
and http files via seperate threads.  This makes it possible to smoothly
browse large databases where parts of the data are locally cached while
others are on a remote server.  Previously with this type of dataset 
the pager would stall all paging while http requests were being served,
even when parts of the models are still loadable virtue of being in the 
local cache.

Also as part of the refactoring the DatabaseRequest are now stored in the
ProxyNode/PagedLOD nodes to facilitate quite updating in the cull traversal,
with the new code avoiding mutex locks and searches.  Previous on big 
databases the overhead involved in make database requests could accumulate
to a point where it'd cause the cull traversal to break frame.  The overhead
now is negligable.

Finally OSG_FILE_CACHE support has been moved from the curl plugin into
the DatabasePager.  Eventually this functionality will be moved out into
osgDB for more general usage.
2008-05-21 21:09:45 +00:00
Robert Osfield
646fc43747 Introduced preliminary support for asynchronous file read requests,
ReaderWriter::ReadResult now has a FILE_REQUEST enum.
  ReaderWriter::Options now has a s/getAsynchronousFileReadHint() parameter methods.

  libcurl based plugin now detects enabing of the AsynchronousFileReadHint, but
  as yet does not handle async requests - handling everything syncronously.
  
  DatabasePager now by default will enable AsynchronousFileReadHint for http
  based file requests
2008-05-14 17:03:57 +00:00
Robert Osfield
1d2bd834a4 Updated version number for 2.5.0 dev release 2008-05-12 11:01:54 +00:00
Robert Osfield
965c72f5bd From Eric Sokolowski and Robert Osfield, moved command line option usage setup
from osgviewer example into osg::ArgumentParser and osgViewer::Viewer to make
them more universally available.
2008-05-12 10:55:55 +00:00
Robert Osfield
db2cf75b23 From Mathias Froehlich, fixed typo 2008-05-12 10:16:40 +00:00