Commit Graph

58 Commits

Author SHA1 Message Date
Robert Osfield
950d282f55 From Vincent Bourdier, addition of out of memory read result. 2010-03-10 14:28:18 +00:00
Robert Osfield
7a80f5bcfa Moved the supports*() method into public scope to allow external injection of supported formats. Added docs to clearly state this type of inject is not generally supported by ReaderWriters. 2009-12-16 15:48:34 +00:00
Robert Osfield
122ee0a001 Added ReaderWriter::fileExists() method to help enable querrying of existing of files on servers using the curl plugin 2009-05-13 19:46:16 +00:00
Robert Osfield
b7b065abe3 Refactored the Registry::ReadFileCallback, WriteFileCallback and ReaderWriter::Options to they are now defined in their own header and in the osgDB namespace.
Introduced a new FindFileCallback to Registry to compliement the existing ReadFileCallback and WriteFileCallback.

Added support for assign Find, Read and WriteFileCallbacks to osdDB::Options to enable plugins/applications to override the callbacks just for that
read/write call and any nested file operations
2009-05-09 08:49:27 +00:00
Robert Osfield
a551c4864d From Neil Hughes, "please find attached a new version of the ReaderWriter header file. This has additional functions to mimic the setPluginData functions for string data." 2009-04-21 11:48:08 +00:00
Robert Osfield
a0a06c8b2a Completed support for automatic detection of plugin features.
Cleaned up debug out of various plugins to ensure a clean osgconv --formats.
2009-03-10 17:27:39 +00:00
Robert Osfield
287ff37b34 From Ralf Habacker, "The appended patch fixes this issue by adding a virtual method named supportedFeatures() to the class ReaderWriter, which could be overriden by a specific plugin to adjust the set of features.
Single features are implemented as bits asother enums in ReaderWriter class already does, so that combinations are possible and fast comparison operations are possible

By default all features are enabled.

I have added this virtual method to the dot plugin to get an idea how to use these features.

With this patch osgconv --formats shows an additional line 'features' for each plugin"
2009-03-10 15:00:39 +00:00
Robert Osfield
05cd6878a5 From Jason Beverage, "The _pluginData member variable is not properly copied when using the copy constructor for ReaderWriter::Options." 2008-11-21 12:10:27 +00:00
Robert Osfield
969884e6c2 Moved AuthenticalMap/AuthenticationDetails out in their own files 2008-07-17 12:13:04 +00:00
Robert Osfield
adaf71fa19 Added osgDB::AuthenticationMap/Details to osgDB and curl plugin to add the ability
to authenticate http transfers
2008-07-17 11:55:55 +00:00
Robert Osfield
3e96a9d448 Missing check-ins 2008-07-15 09:55:33 +00:00
Robert Osfield
cb98cddc31 Added new ReaderWriter methods for recording what protocols, extensions and options are
support by ReaderWriters
2008-07-13 15:24:45 +00:00
Robert Osfield
44d144997e Added prelimnary KdTree data structure and automatic kdtree build support
into osgDB::Registry/osgTerrain so that newly created subgraphs can have 
KdTree built on all osg::Geometry automatically on load/creation.
2008-07-04 15:57:48 +00:00
Robert Osfield
37765805ff Fixed pedantic warning 2008-06-23 15:11:37 +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
22c7699fa1 From Bob Kuehne, Added doxygen docs clarification of ReadResult enum values 2008-05-07 14:30:58 +00:00
Robert Osfield
c10acfcc47 From Bob Kuehne, "he attached are conversions of the 3 main places i found in osg where tokens are used to represent bitmasks with 'magic' numbers, like 32. i've changed these to a more representative bitshift representation, showing clearly in which bit you can expect this token to manifest. ie, converted things like:
from:            DEEP_COPY_STATESETS         = 8,
to:              DEEP_COPY_STATESETS         = 1<<3,

showing clearly that this isn't the _value_ 8, but the _bit_ 8. this is an old pattern i see (and like to promulgate) to make code a bit more readable and maintainable. 
"
2008-04-16 15:23:12 +00:00
Robert Osfield
c4d07194a2 From Art Trevs, add support for saving external shader files.
From Robert Osfield, adding missing member variable initializes and Output::getShaderFileNameForOutput() implementation
2008-03-04 14:04:48 +00:00
Robert Osfield
41ce67600e From Mattias Linde, "Nice, this almost gets the job done, one way communication into the plugin is possible.
I've done some additional small modification regarding constness in ReaderWriter and added
mutable on _pluginData so passing data back would be possible too.

Have updated the collada plugin (ReaderWriterDAE.cpp) to use the map to handle options and
have attached the changes.

The stuff in daeReader.h and daeWriter.h are just cosmetic changes to get rid of a warning."
2007-09-29 11:12:38 +00:00
Robert Osfield
9aab68b140 From Mattias Linde, "I've attached a modified ReaderWriter header which has some additions
to osgDB::ReaderWriter::Options to handle PluginData."
2007-09-28 13:35:51 +00:00
Robert Osfield
cf2c9da74d Made ReaderWriter and ReaderWriter::Options use thread safe ref counting. 2007-09-24 09:05:42 +00:00
Robert Osfield
5ba0e5b930 Fixed missing initializer in Options constrctor 2007-03-29 19:39:20 +00:00
Robert Osfield
35c720420e From Bryan Thrall, "The osgDB::ReaderWriter and osgDB::ReaderWriter::Options classes have
copy constructors that take a const osg::CopyOp rather than a
osg::CopyOp&, forcing an unnecessary copy. The attached header fixes
this, based off OSG 1.2.

Also fixed duplicate "or" openArchive()'s comment."
2007-01-30 14:18:39 +00:00
Robert Osfield
530e9e08d4 Added better handling of writeNode operations that arn't successful. 2006-11-07 17:00:56 +00:00
Robert Osfield
553d017fd9 From Daniel Trstenjak, build fixes for Hpux 11.11, Irix 6.5, Solaris 8 and Aix 2006-08-02 10:43:26 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Don BURNS
c7e8386707 Fixes for IRIX build 2004-11-29 01:12:25 +00:00
Robert Osfield
d9b9a6f1f8 Made read/write methods in ReaderWriter all const to facilate multi-threading 2004-11-23 15:29:52 +00:00
Robert Osfield
ffcd95b004 Tripped out experiemental threadSafe_ methods in ReaderWriter 2004-11-23 12:57:00 +00:00
Robert Osfield
e54f46f630 Removed the cache hints from registery placing them wholly into ReaderWriter's responsibility. 2004-11-22 14:49:27 +00:00
Robert Osfield
a6369da4f4 Moved Registry::CacheHintOptions into ReaderWriter::Options 2004-11-22 14:10:12 +00:00
Robert Osfield
6fa4eecdd5 Changed ReaderWriter::Options to derive from osg::Object to add clone()
ability.
2004-11-20 13:35:49 +00:00
Robert Osfield
36661a33d3 Fixed writeImage. 2004-11-18 11:21:51 +00:00
Robert Osfield
2b310c6926 Added support for serialization of calls to ReaderWriter plugins. 2004-11-15 19:46:10 +00:00
Robert Osfield
ddb0d6bd4f Added prelimarny support for reading archives via the .net plugin 2004-11-13 16:21:48 +00:00
Robert Osfield
72b7e08d93 From Stephane ???, fixes for VS.NET build 2004-11-08 16:39:32 +00:00
Robert Osfield
f84f8d87e0 Added support for openArchive into osgDB 2004-11-07 21:17:31 +00:00
Robert Osfield
1f5b044c71 Made ReaderWriter::className const 2004-10-26 10:26:43 +00:00
Robert Osfield
d734d6d532 Added osgDB::Archive 2004-10-24 14:24:15 +00:00
Robert Osfield
7e4d34c57a Added :
osg::PagedLOD::s/getDatabasePath() and support in PagedLOD::traverse().
    osgDB::ReaderWriter::Options::s/getDatabasePath()
    osgDB::Input::s/getOptions()
    setting of osgDB::Input::setOptions() in ReaderWriterOSG.cpp
    src/osgPlugins/ive/DataInputStream::s/getOptions()
    setting of src/osgPlugins/ive/DataInputStream::setOptions() in ReaderWriterIVE.cpp
2004-10-06 09:31:34 +00:00
Robert Osfield
6524fe1293 From Norman Vine, fixes for Mingw 2004-08-02 09:11:31 +00:00
Robert Osfield
aec98259a8 Added support for osgDB::ReaderWriter::ReadResult::FILE_LOADED_FROM_CACHE 2004-05-07 13:43:41 +00:00
Robert Osfield
83bf813e58 Moved the responsibility for finding file to load on to the ReaderWriter plugins,
instead of osgDB::Registry where it original lay.  This has been done to allow
fileName strings to be encode data rather than just file names, such as one
requires when using PagedLOD along with plugins for doing dynamic tesselation.
2003-12-08 11:24:43 +00:00
Robert Osfield
f1c4dc3b0d Updates for osgdem. Including new read/writeHeightField() methods. 2003-10-29 11:11:17 +00:00
Robert Osfield
7b657aed3a Adding support using istream and ostream with the reader writers. 2003-05-26 09:27:16 +00:00
Robert Osfield
c2b4a05825 Minor fixes to ReaderWriter and Paragraph to help work with use of Doxygen.
Fix to CullVisior to handle the new no referenced counted cull and draw traversal.
2003-02-10 13:58:39 +00:00
Robert Osfield
48bda9cc79 Added new Copyright/License notice to header and source files. 2003-01-21 16:45:36 +00:00
Robert Osfield
12226e4371 Converted the instances of const built in types being returned from methods
and passed as paramters into straight forward non const built in types,
i.e. const bool foogbar(const int) becomes bool foobar(int).
2002-09-02 12:31:35 +00:00