Commit Graph

57 Commits

Author SHA1 Message Date
Robert Osfield
8f4e62ced0 Further updates to the ReaderWriter support in osgDB, and a fix to a small warning
in Matrix.cpp.
2001-10-30 19:23:24 +00:00
Robert Osfield
f0372817b5 Added support for ReadResult and WriteResult to the osgDB::ReaderWriter
to allo plugins to pass back more information about the success or failure
of a file load.  All plugins have been updated to the new convention.
2001-10-30 14:20:37 +00:00
Robert Osfield
97e4488d80 Changed a #define ... (GLenum) 0x84fe to 0x84FE to fix problems under MacOS9
build.
2001-10-29 19:29:49 +00:00
Robert Osfield
939b12a908 Updates of osgDB/FileUtils to fix compilation problems under Win32 2001-10-24 19:48:58 +00:00
Robert Osfield
573f68c35b Updates to osgText. 2001-10-24 13:46:58 +00:00
Robert Osfield
6ddb40ba70 Updated the osgText implemention, now works under Linux. 2001-10-24 09:08:02 +00:00
Robert Osfield
36d206f40f Updates to the new osgText library to get it to compile under Linux. 2001-10-23 22:08:02 +00:00
Robert Osfield
8e1b1bcfc1 First past integrat of Max Rhiener work on wrapping FTGL to create osgText
library and demo.
2001-10-23 19:51:39 +00:00
Robert Osfield
63bb05e6fd Added new osgGLUT::Window base class which is very basic right now, all it does
is bring up a GLUT window and provide virtual functions from which users should
subclass to add functionality.
2001-10-23 15:55:01 +00:00
Robert Osfield
25c8b05914 Integrated Geoff Michel's updates to Stats code, whilest move all text rendering
back in the viewer from the Statistics header.

Added a osg::State::captureCurrentState(StateSet&) method and a copy constructor
to osg::StateSet.
2001-10-22 22:02:47 +00:00
Robert Osfield
7082abb8ad Added support for an osgUtil::SceneView::init() traversal which is called once
per scene view.  The user can attach a NodeVisitor to do init for them, or
leave it to the default which is to use the osgUtil::DisplayListVisitor
which compiles all display lists and texture objects.  The init traversal
is called automatically by the first call to either app() or cull(), so
should not be called by user code during initialization. This ensures
that a valid graphics context has been established before OpenGL is initialized.

osgUtil::DisplayListVisitor has also been updated to use a bit mask for options, and the addition of
compilation of texture objects (via StateAttribute::compile) has also been
added.
2001-10-20 20:26:36 +00:00
Robert Osfield
ccc3d3fd8a Added osgUtil::Optimizer which contains four visitor each designed for doing
different types of optimization on the scene graph - state optimization,
flattening static transforms, combining LOD's and removing redundent groups.
The new Optimizer replaces the once seperate OptimizerStateVisitor.
2001-10-19 14:22:02 +00:00
Robert Osfield
54d490e24b Added support for specifying whether view frustum and small feature culling
should be applied to a node or its child with the new osg::Node::setCullingActive()
flag.  A mechanism has been implemented so that if child has its culling disabled
then their parents, all the way up to the root are also have their culling
implicitly disabled.

The osg::CullVisitor has updated to take account of
both the explicit control via setCullingActive and the implicit culling
disabling through children being disabled.

This feature is useful for nodes which don't have a bounding volume to cull
against, earth sky implementations and light sources.

The default osg::Node::_cullingActive is true, i.e. culling is enabled by
default.
2001-10-19 12:56:37 +00:00
Robert Osfield
60d33f91f8 Reverted Bryan's changes to FrameStamp w.r.t std::tm structure which doesn't
compile under Win32 and IRIX.  Will need to find another solution.
2001-10-16 21:47:47 +00:00
Bryan THRALL
a203a1b127 *** empty log message *** 2001-10-16 20:56:46 +00:00
Robert Osfield
ada36c3462 Fixes for Win32 compilation. 2001-10-16 16:48:19 +00:00
Don BURNS
747019d0b9 added float *() operator to Vec{2,3,4} so we can pass Vec3's directly to
OpenGL glVertex?fv().
2001-10-16 03:59:37 +00:00
Robert Osfield
de924ca759 Fixes for compilation under IRIX, submitted by Randal Hopper, with mods
from Robert.
2001-10-15 15:50:55 +00:00
Robert Osfield
5de4e8e6d8 Made the new global state attribute instances in osg::State use osg:ref_ptr
to automatically handle the memory deletion.
2001-10-15 14:29:40 +00:00
Robert Osfield
59077fed15 Added support for automatic creation of global StateAttributes to osg::State,
these global attributes are created by cloning any attributes which are
applied during rendering, the clone in a shallow copy, which will set up
default valus for that attribute.  This should prevent attribute bleed
from one stateset to the next when the global StateSet doesn't contain
an attribute used within the scene graph.
2001-10-15 14:07:54 +00:00
Robert Osfield
06dafa487e Added osgDB::ReaderWriter::Options class to the ReaderWriter base class, support
for settings options in osgDB::Registry, and added the paramter to all of the
reaader/writer plugins.  The Options structure by default has an string attached
for packing basic options, however, it also can be subclassed to encapsulate
any users defined option data. In the later case both the client code *and*
the plugin need to be aware of subclass, the plugin will need to use
dynamic_cast<> to assertain its type.
2001-10-14 17:54:25 +00:00
Robert Osfield
39ea16aad7 Added osg::StateSet::merge(const StateSet& rhs) merges merges the modes and
attributes of rhs into 'this' stateset.
2001-10-14 09:58:49 +00:00
Don BURNS
3ecaf3cd6c Fixed a small boo-boo in definition of bit masks in include/osg/Drawable
Fixed incorrect normal conversions for osgconv.
2001-10-14 06:01:31 +00:00
Robert Osfield
1e4a0cadf5 Changed the naming and calling convention of the new Drawable::AttributeFunctor
and have updated GeoSet to use mutable values for the _numverts etc, allowing
osg::GeoSet::computeNumVerts() to be a const operation. osg::GeoSet::getNumVerts
is now a const once more, so avoiding compilation problems.  Also chaned the new
osgconv orientation code to use a Drawable::AttributeFunctor so it can work on
other Drawables other than just GeoSets.
2001-10-13 11:16:10 +00:00
Don BURNS
79a992ac72 Updated osgconv to be able to handle orientation swapping. 2001-10-13 07:24:25 +00:00
Don BURNS
5b3a52547a Removed personal note in Matrix header file 2001-10-13 01:28:33 +00:00
Robert Osfield
9db63dfd5d Added != method to Vec2,Vec3,Vec4 and did further work on the
AttributeUpdateFunctors.
2001-10-12 20:05:55 +00:00
Robert Osfield
96085619ee Added support for DYNAMIC/STATIC osg::Transform types and added new osg::Drawable::getStats
and supportsAttributeUpdate(..) and applyAttributeUpdate(...) methods which will
be to enable hooks into Drawable subclasses.
2001-10-10 20:20:14 +00:00
Robert Osfield
3c5b9c813d Fixed spelling of osg::GeoSet::getNumInterleavedIndices, was missing a 'n'! 2001-10-10 14:38:12 +00:00
Robert Osfield
22aef83a8f Updated MSVC Workspace files to fix build problems. 2001-10-09 20:03:51 +00:00
Robert Osfield
3da57d6d22 Added a osg::DegreesToRadians() and osg::RadiansToDegrees() method to osg/Math,
updated the ReaderWriterBMP.cpp (mods sent in my Geoff Michel) and
moved the osgUtil::Statistics to osg::Statistics in preperation to adding it
to the the Drawable base class.
2001-10-06 20:29:42 +00:00
Robert Osfield
1fc623ad15 Added the Copyright message to the top of osgWX, with Ben Disoe's name as
he wrote all the code.
2001-10-04 16:49:13 +00:00
Robert Osfield
9917b6500d Added a copyright notice to all core headers, which all begin with
//C++ header to help scripts and editors pick up the fact that the
file is a header file.
2001-10-04 15:12:57 +00:00
Robert Osfield
d5ed4e2305 Added an implemention of basic state sorting to the RenderBin, but have commented
out the sort operation as Peformance benifit is currently negligable, will need
to improve on the sort functor to see real benifits.
2001-10-04 14:35:42 +00:00
Robert Osfield
4be1324b8c Changed the numeric ordering of StateAttributes Types, as part of an
investigation into state sorting.
2001-10-04 14:10:20 +00:00
Robert Osfield
2c6e85442b Integrated changes for MacOSX, submitted by Phil Atkin, with small mods by
Robert Osfield to maintain compatability under Linux.
2001-10-03 21:44:07 +00:00
Robert Osfield
7a7a26c2ea Added include/osg/EarthSky and src/osg/EarthSky to cvs.
Also move osg across to using radians for angular paramters by default.
By defining USE_DEGREES_INTERNALLY you can get the OSG to revert to
the old style degrees. This later feature is deprecated and only meant
for helping comptability in the interim.
2001-10-02 15:59:49 +00:00
Robert Osfield
430c8606e9 Added osg::EarthSky node to the core osg library, and added support for it into
osgUtil::SceneView, osg::CullVisitor, osgPlugin/osg and updated the hangglide
demo to use the new earth sky node.
2001-10-02 11:36:14 +00:00
Robert Osfield
fc1fa57275 Added support for osg::StateSet comparison operators and using this new feature
added support in osgUtil::OptimizeStateVisitor for removing duplicate
StateSet's from the scene graph, previously only duplicated StateAttributes
we're removed.
2001-10-01 23:02:14 +00:00
Robert Osfield
7359d33d53 Made spelling corrections, the spelling mistakes picked up by a script
written by Neil Salter.

script
2001-10-01 11:15:55 +00:00
Robert Osfield
ef3217cfde Interegrated changes to Timer from Neil Salter to fix compilation problems which had been introduced by doing #include's within the osg namespace. 2001-09-30 20:41:20 +00:00
Robert Osfield
8e2f1bdb72 Modified the Matrix multiple method added by Don so it is safer and added comments explaining why it shouldn't be needed as other more efficient methods should be doing the work for us.
Also added Matrix::ensureRealized() to support the lazy initialization of Matrix, whilest keeping the implementation robust so that external calls to Matrix which get values do so on an initialized matrix.
2001-09-29 09:37:43 +00:00
Don BURNS
4ba58ca29b Added operator * (Matrix &) to Matrix (header) and
operator [] to reference matrix elements.
2001-09-29 02:48:31 +00:00
Robert Osfield
ef2e9236bd Made spelling corrections to osg include files, spelling mistakes detected by a script written by Neil Salter which analyses comments for mistakes. 2001-09-28 20:10:41 +00:00
Robert Osfield
12f77f141e *** empty log message *** 2001-09-28 16:56:19 +00:00
Robert Osfield
57fd2b4bcb *** empty log message *** 2001-09-28 12:36:40 +00:00
Robert Osfield
2a9848ea95 *** empty log message *** 2001-09-27 16:34:41 +00:00
Robert Osfield
ba47264c5e *** empty log message *** 2001-09-27 09:44:55 +00:00
Robert Osfield
9fd1706e3c *** empty log message *** 2001-09-25 17:56:56 +00:00
Don BURNS
7ae58df42a Synch with 20010921 2001-09-22 02:42:08 +00:00