Commit Graph

1586 Commits

Author SHA1 Message Date
Robert Osfield
1fce3c0ad1 Added handling of resetting of the texture object format 2009-09-27 15:14:57 +00:00
Robert Osfield
4d75729650 Added stats collection to new Texture Pool code, and improved TexturePool implementation.
The Texture Pool can be enabled by setting the env var OSG_TEXTURE_POOL_SIZE=size_in_bytes.
Note, setting a size of 1 will result in the TexturePool allocating the minimum number of
textures it can without having to reuse TextureObjects from within the same frame.
2009-09-25 18:05:54 +00:00
Robert Osfield
216849f73a From Jean-Sebastien Guay, fixed Widows build and updated the SO version 2009-09-23 15:16:34 +00:00
Robert Osfield
d56499025b Introduced memory pool size management 2009-09-23 13:51:20 +00:00
Robert Osfield
3d75054e2c Preliminary work on support for a texture object pool that is designed to help manage resources down the GPU more tightly. 2009-09-22 18:45:24 +00:00
Robert Osfield
c56dd6faa5 From Michael Platings, "the DAE importer was crashing when calling osg::Object::setName with a null pointer argument. Rather than trying to fix all the places this might happen and probably missing a few, I thought it would be better to trivially validate the input in setName. With this fix if setName is called with a null pointer then the name is cleared." 2009-08-22 17:13:19 +00:00
Robert Osfield
3f65f4f80b From Wojciech Lewandowski, support for FBO's without colour or depth attachments.
Note from Robert Osfield, I've temporarily re-enabled the old focing of of color and depth attachment to avoid regressions on some OpenGL driver.  We'll revist this once
we have a mechanism for controlling this override at runtime.

#define FORCE_COLOR_ATTACHMENT  1
#define FORCE_DEPTH_ATTACHMENT  1
2009-08-21 09:34:48 +00:00
Robert Osfield
a2a2740a23 From Ronald van Maarseveen and Robert Osfield, changed compute of up vector and localToWorld transform so that it takes in to account the geographic latitude. 2009-08-20 14:19:10 +00:00
Robert Osfield
239aed9a88 Tweak of NodeMask docs 2009-07-28 06:00:23 +00:00
Robert Osfield
35962ab099 From Lee Butler and Robert Osfield, doxygen comment explaining role of NodeMask 2009-07-24 15:30:13 +00:00
Robert Osfield
773ae51a45 From Chris Hanson, typo and comment clean ups 2009-07-24 14:45:44 +00:00
Robert Osfield
2e0f1dc0d1 From Chris Hanson, added EllipsoidModel::isWGS84() method and clean up on comments. 2009-07-24 14:25:34 +00:00
Robert Osfield
5496e91f87 Added the ability to turn off the external paging in of PagedLOD children. 2009-07-16 10:13:41 +00:00
Robert Osfield
11d7d98e79 Updated version numbers for 2.9.6 release 2009-07-03 10:33:51 +00:00
Robert Osfield
b1f4a81606 From Mathias Froehlich, "Fix possible problem with aliasing rules.. and fix a gcc warning :)Use a union to determine if we are on a little endian or big endian machine." 2009-06-25 13:26:26 +00:00
Robert Osfield
85bb6b327d From Wojciech Lewandowski, "Here are my changes:
- osg::Texture sets GL_MAX_TEXTURE_LEVEL if image uses fewer mipmaps than
number from computeNumberOfMipmaps (and it works!)
- DDS fix to read only available mipmaps
- DDS fixes to read / save 3D textures with mipmaps ( packing == 1 is
required)
- Few cosmetic DDS modifications and comments to make code cleaner (I hope)

Added _isTextureMaxLevelSupported variable to texture extensions. It
could be removed if OSG requires OpenGL version 1.2 by default.

Added simple ComputeImageSizeInBytes function in DDSReaderWrites. In
my opinion it would be better if similar static method was defined for
Image. Then it could be used not only in DDS but other modules as well (I
noticed that Texture/Texture2D do similar computations).

Also attached is an example test.osg model with DDS without last mipmaps to
demonstrate the problem. When loaded into Viewer with current code and moved
far away, so that cube occupies 4 pixels, cube becomes red due to the issue
I described in earlier post. When you patch DDS reader writer with attched
code but no osg::Texture yet, cube becomes blank (at least on my
Windows/NVidia)  When you also merge osg::Texture patch cube will look right
and mipmaps will be correct."
2009-06-19 11:55:52 +00:00
Robert Osfield
1523032d2b From Cedric Pinson and Robert Osfield, addition of NodeCallbacks to osg::CopyOp and osg::Node copy constructor. 2009-06-18 10:01:39 +00:00
Robert Osfield
7c4225e574 Fixed error in DisplaySettings::setNumOfHttpDatabaseThreadsHint 2009-06-17 08:56:11 +00:00
Robert Osfield
d60801be3f From Mathias Froehlich, "attached is a change to the ProxyNode that also includes ProxyNode local
database options like recently added to PagedLOD.

Also there is a change to the traverse method:
The previous ProxyNode checks the VisitorType to be a CULL_VISITOR and the
presence of a request handler to submit a database request.
In contrast to that PagedLOD uses the request handler if it is there - even if
the visitor type is not a cull visitor.
The change removes the cull visitor test from the ProxyNode so that it behaves
like the PagedLOD.
I believe that the presence of a request handler in a visitor might be
sufficient to trigger the requests as this is done in the PagedLOD anyway.

Based on rev 10332."
2009-06-12 10:08:15 +00:00
Robert Osfield
58184612d4 From Konstantin Sinitsyn, support for GL_EXT_blend_equation_separate extension like in osg::BlendEquation. 2009-06-08 13:46:39 +00:00
Robert Osfield
482a18b9f2 Added depends_on template and usage in RenderBin to help with static variable destruction ordering 2009-06-05 11:48:35 +00:00
Robert Osfield
d38fb904d3 From Maciej Krol,"With advent of GUI applications in OSG there is a growing need to redirect notification messages to third party systems. For example windows applications do not have console output, it would be appropriate to redirect notifications to GUI widget or debug output. I have revamped notification system to fit this need. New notification stream is using NotifyHandler as a message sink. Handler is called whenever stream is synchronized (i.e. after <<std::endl). Standard streams std::cout and std::cerr are no longer used although by default StandardNotifyHandler is a message sink. Custom notification handler can be set with osg::setNotifyHandler(NotifyHandler *) function.
Two implementations of NotifyHandler are currently available:
- StandardNotifyHandler, calls fputs(message, stderr) for severity <= WARN and fputs(message, stdout) for severity > WARN
- WinDebugNotifyHandler, windows users can redirect notifications to windows debug output, notifications can be viewed in output window of the debugger i.e. MSVC or DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) (see screenshot).

I have seen on osg-users that some people do std::cerr.rdbuf(otherStream.rdbuf()) to redirect notifications. This trick will no longer work since osg::notify() returns internal osg::NotifyStream not std::cout or std::cerr. You can use osg::notify().rdbuf(otherStream.rdbuf()) to do this instead.

Additionally I've made some minor fixes:
- Minor imrovements to osg::notify documentation
- NullStream could crash by deleting stream buffer other than default NullStreamBuffer in the destructor i.e. after osg::notify(osg::DEBUG_FP).rdbuf(otherStream.rdbuf())"
2009-05-18 12:04:07 +00:00
Robert Osfield
7dead3f52d From Paul Obermeier, "Please find enclosed some changed OSG header files.
The changes are more or less just beautifications
(when looked at them from the C++ view), but make
wrapping OSG with SWIG easier.
I have tested the changes with both 2.8.1-rc4 and the
current head and would appreciate to incorporate the
changes in both branches.

Here is a description of the changes:

osg/BoundingSphere:
   Use the following typedef (like used in BoundingBox)
       typedef typename VT::value_type value_type;
   instead of
       typedef typename vec_type::value_type value_type;

   SWIG reports errors on the latter construct.
   Also makes it consistent with BoundingBox.


osg/Vec4ub:
   Consistent use of "value_type" throughout the file.


osg/Vec?b:
   Consistent use of "value_type" throughout the files.

   Also changed
       typedef char value_type;
   to
       typedef signed char value_type;

   In the case of a simple "char", SWIG assumes a string.
   Using "signed char" instead of "char" does not change
   the behaviour of the class.
"
2009-05-18 10:37:03 +00:00
Robert Osfield
47c922b0e5 Minor tweaks to avoid warnings when generating wrappers/doxygen documentation 2009-05-18 10:28:14 +00:00
Robert Osfield
8138a7698f Moved getAttributeVec into public: to allow 3rd party code to access without having to subclass 2009-05-12 05:49:36 +00:00
Robert Osfield
f939ea731e Moved Registry::ReadFileCallback + WriteFileCallback, and osgDB::ReaderWriter::Options into their own separate Options file and into the osgDB namespace.
Introduced a new callback osgDB::FindFileCallback that overrides the default behavior of findDataFile/findLibraryFile.

Introduced support for assigning ReaderWriter::Options directory to PagedLOD.

Introduced new osgDB::FileLocationCallback for assistancing the DatabasePager to know when a file is hosted on a local or remote file system.
2009-05-11 11:39:12 +00:00
Robert Osfield
67e0abf149 Added OSG_MIN_VERSION_REQUIRED, OSG_VERSION_LESS_THAN, OSG_VERSION_LESS_OR_EQUAL, OSG_VERSION_GREATER_THAN, OSG_VERSION_GREATER_OR_EQUAL macros to help out with management of feature usage in 3rd party libs and applications 2009-05-11 11:08:16 +00:00
Robert Osfield
24c19fa17e Changed setting of stack back assigned to push_back to fix bug with cull mask management. 2009-05-07 18:30:33 +00:00
Robert Osfield
7b16ff5ae1 From Mathias Froehlich, Changed osg::TextureRectangle to use osg::Texutre::applyTexParameters() to take advantage of texture shadow extension settings for texture rectangle 2009-04-24 09:07:22 +00:00
Robert Osfield
c3e9f27f35 Updated version numbers in prep for 2.9.4 dev release 2009-04-22 16:33:24 +00:00
Robert Osfield
777b00353a From Mathias Froehlich, "attached is a change to TexGenNode rev 10060 that removes a private member
variable that is only initialized and copied by never used seriously.
"
2009-04-22 13:07:02 +00:00
Robert Osfield
9407def083 Changed parameter for T* to const T*. 2009-04-22 10:46:12 +00:00
Robert Osfield
c949789ac7 Updated version info for 2.9.3 dev release, fixed typo and updated wrappers 2009-04-10 11:00:54 +00:00
Robert Osfield
20ad246896 Added new virtual reseveElements, setElement, getElment and addElement methods to DrawElements
to make is easier to write code that can work on DrawElementUByte, UShort or UInt.

Changed the osgTerrain::GeometryTechnique so that it automatically chooses 
the use of DrawElementUShort or DrawElementsUInt accordining to the size of the tile.
2009-03-25 11:17:21 +00:00
Robert Osfield
38ee2f924d Bumped version numbers in prep for 2.7.2 dev release 2009-03-23 15:21:31 +00:00
Robert Osfield
c3fc21fa82 Added support for tracking the time since the last clear() call to enable other
classes to be able to find out how long the current graphics frame has been running.
2009-03-12 15:18:51 +00:00
Robert Osfield
73cffacf09 Added docs on getPixelAspectRatio and corrected usage of getPixelAspection in osgmovie.cpp 2009-03-11 17:57:33 +00:00
Robert Osfield
b6bffdd02f From Tanguy Fautre,
Clean up of the FFmpeg plugin's class API/AudioStream API. 
Implementation of isImageTransparent().
Implementation of Image:g/setPixelAspectRatio()
2009-03-11 15:12:46 +00:00
Robert Osfield
ec63cfd930 From Mathias Froehlich, "small addition to osg::Texture to include all possible depth test variants for
the shadow depth comparison."
2009-03-11 13:08:12 +00:00
Robert Osfield
c0863e96ca Made bool isImageTranslucent() const virtual to allow subclasses to provide their own implementation 2009-03-10 16:52:18 +00:00
Robert Osfield
0669107287 From Roland Smeenk, "While working on the Collada plugin I noticed that all geometry created by the dae reader result in slow path geometry.
Because there already exists the option to convert slow path geometry to the fast path by computing an internal fast path alternative, I added a new optimizer option that automatically does this. To check the results I also made some changes to the statistics gathering and rendering.

Somewhat unrelated, but also part of the optimizer I disabled removal of CameraView nodes during RemoveRedundantNodes optimization.
As discussed on the ML, CameraViews were removed from the scenegraph. This solves that issue.

Summary:
-Geometry::areFastPathsUsed now also looks at internalOptimizedGeometry
-Added Optimize option to make all slow path geometry compute their internal fast path alternative
-Added fast geometry counter to the statistics
-Disabled removel of CameraViews in optimizer
"
2009-03-10 14:15:59 +00:00
Robert Osfield
199067d150 From Martin Spott, compile fixes for IBM AIX. 2009-03-10 11:14:56 +00:00
Robert Osfield
43a081ee98 Updated wrappers and dev release version numbers 2009-03-05 15:31:03 +00:00
Robert Osfield
d2099da5cb Fixed indentation 2009-03-04 16:15:05 +00:00
Robert Osfield
e035decd95 Introduce FFmpegAudioStream implementation 2009-03-03 16:51:01 +00:00
Robert Osfield
4ebd316130 Introduced osg::AudioStream class to help manage audio streams coming in from movie reading plugins 2009-02-27 20:16:08 +00:00
Robert Osfield
f8636d8006 Fixes for doxgen warnings 2009-02-11 10:41:55 +00:00
Robert Osfield
1a28f0105d Bumped version number of svn/trunk to 2.9.0 2009-02-06 15:49:21 +00:00
Robert Osfield
b19b2f820b Added a couple more pragma's to resolve final Windows warnings 2009-02-06 15:39:44 +00:00
Robert Osfield
087d6390fa Added VS and gcc warning suppression to clean up a few last stubborn warnings 2009-02-05 11:10:32 +00:00