Commit Graph

123 Commits

Author SHA1 Message Date
Robert Osfield
7290f793f1 Added osgText::Paragraph which is a subclass from Geode which composes a
list of text drawables as a paragraph block, handles breaking of text into
individual lines automatically.

Changed the osg::Node::setUserData so that the data type has to be an
osg::Referenced, and removes the dependancy on osg::MemoryAdapter.  I have
done this since it simplifies the OSG side of the interface and makes it
less like that the user might abuse the memory managment of the data. It
does however mean that user data will have by subclassed from Referenced,
and therefor may require users to have their own adapter to do this.
However, this little nuasance is worth the extra cleaness and robustness
afforded by going the osg::Referenced route.
2001-11-09 15:06:01 +00:00
Robert Osfield
e35f5ec286 Fixed the findFileFile routine which had been broken by a fix of a dlopen
problem - './' was added to all files which which directly found without
requiring a search path rather than just locally found files, this broke
file loads which had wern't local but had a valid path.  I have moved the
'./' work around to inside fileDSO and made it only apply to Linux as I
presume this is all it was needed for. Don?
2001-11-09 15:01:42 +00:00
Robert Osfield
52bc6c2f13 Fixed the IntersectVisitor which was broken by a recent patch to catch parallel
line and traingle combinations.
2001-11-08 13:50:32 +00:00
Robert Osfield
e725547a8a Added a dirtyBound() to osgUtil::Optimizer.
Corrected mispelling of alignment is osg::Text and the osgtext demo.
Added guards for divide bu zero's to osg::IntersectVisitor.
2001-11-07 12:42:08 +00:00
Robert Osfield
5e6153b428 Added methods to support isNaN,isInfinte and valid to osg::Vec* and osg::Math,
and added a guard to IntersectVisitor which uses these new methods to prevent
invalid segments being added.
2001-11-06 10:34:51 +00:00
Robert Osfield
b45aa55555 Integrated updates to stats sent in my Geoff Michel. 2001-11-04 19:29:20 +00:00
Don BURNS
c10d22d729 Fixed findFileInPath to prepend ./ if file is in local directory. This was
needed by dlopen() for dso's in the current directory
2001-11-02 21:20:32 +00:00
Robert Osfield
06abf2266b Updates to Makefiles to include osgText.
Also a couple of undefined methods in osgText::Text have been added.
2001-11-02 20:11:37 +00:00
Robert Osfield
42faf78b47 Updated index.html with dependacy info about the new osgText library.
Modified osg/Drawable::draw(..) so that it uses display list COMPILE
rather than COMPILE_AND_EXECUTE to solve performance problems under
NVidia drivers.  The old behavior is still available by comments out
a #define.
Fixed the default compilation list src/osgPlugins/Makefile so that it
compiles by defalt png and gif.
2001-11-02 12:26:33 +00:00
Robert Osfield
aa725e899a Updates to the flt loader from Brede Johansen. 2001-11-01 16:35:26 +00:00
Robert Osfield
f7a2567bca Updates to osgText to fix a crash on ikart.tff font available under Linux, the
bug was related to texel padding of the height not be accounted for in texture
size calculation, but was used during populating the image data causing a
mismatch.
2001-11-01 15:13:31 +00:00
Robert Osfield
b462845857 Added missing config.h file to src/osgPlugins/lib3ds. 2001-10-31 22:35:44 +00:00
Robert Osfield
4d4ff39ff9 Added a bool paramter to osg::StateSet::compare(const StateSet& rhs,bool compareAttributeContents=false) const;
to allow it to use different comparison schemes, now it can use checking for pointer equality (the default)
or attribute contexts.  This has been added to assist optimization of databases within the flt loader, but
also could be useful for other operations too.
2001-10-31 20:04:32 +00:00
Robert Osfield
78372a5a62 Updated the lib3ds plugin with the new 1.1 version of lib3ds. 2001-10-31 18:33:27 +00:00
Robert Osfield
94ce36f9a3 Update to osgText to get things compiling under Windows. 2001-10-31 12:27:48 +00:00
Robert Osfield
254268030d Updated the FTGL implemention in osgText to FTFL1.1. 2001-10-31 10:20:50 +00:00
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
915aad95a0 Added missing src/osgText/Version.cpp file. 2001-10-29 12:19:14 +00:00
Bryan THRALL
b0e1b21f5b Changed the int to a GLint because of the differences within mac/win32/linux versions of gl.h. 2001-10-25 00:49:28 +00:00
Robert Osfield
0551da3613 Completed work on osgText compilation under Win32. We now
have fonts under Wndows and Linux :-)
2001-10-24 23:15:15 +00:00
Robert Osfield
573f68c35b Updates to osgText. 2001-10-24 13:46:58 +00:00
Robert Osfield
a30a4132b8 Updates to osgText and osgDB so that the loading of text fonts can use
osgDB::findFile() to locate font files from the OSGFILEPATH environmental
variable.
2001-10-24 12:53:27 +00:00
Robert Osfield
5853215f1c Updated FTGL version to 1.0 and removed a couple of warnings in the osgText demo. 2001-10-24 09:41:42 +00:00
Robert Osfield
6ddb40ba70 Updated the osgText implemention, now works under Linux. 2001-10-24 09:08:02 +00:00
Don BURNS
12826653b1 Added stat.c 2001-10-23 23:23:51 +00:00
Don BURNS
49b7219058 Fixed pfb loader functionality for IRIX 2001-10-23 23:10:47 +00:00
Don BURNS
6316d19df8 Fixed pfb loader so that it works for both Linux and IRix with dynamic
libraries, and provides support to load (almost) all that Performer loads.
2001-10-23 22:59:54 +00:00
Robert Osfield
a4e26d447b Further work on getting osgText compiling. 2001-10-23 22:28:41 +00:00
Robert Osfield
b90a734810 Removed old .cc versions of FT font code. 2001-10-23 22:12:07 +00:00
Robert Osfield
9d73c2d22d Adding in new .cpp versions of FT font code. 2001-10-23 22:09:21 +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
aac507e119 Moved all #include "osg/.." references to #include <osg/..> to aid port to
MacOS.
2001-10-21 21:27:40 +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
489ef2d035 Added #ifdef to Performer ReaderWriterPFB so that pfdLoadFile is used under
IRIX and pfdLoadFile_pfb is used under Linux.
2001-10-20 09:48:22 +00:00
Robert Osfield
067619d1fb Removed Lighting.cpp from repository, it is nolonger used and was just hanging
around erroneously.
2001-10-19 15:53:59 +00:00
Robert Osfield
20e5751a4a Updated the osgUtil::Optimize so that the call to Optimize::StateVisitor is
#ifdef out under Win32 and STL port isn't being used. This prevents crashes
due to MS's flacky STL implementation.
2001-10-19 15:30:54 +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
Don BURNS
e467f44575 Fixed static libraries in madefs.linux and error in ReaderWriterPFB.cpp 2001-10-17 22:17:23 +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
2ce6cdd6b2 Fixes for IRIX build - submitted by Randall Hopper. 2001-10-16 18:39:57 +00:00
Robert Osfield
8aefce4524 Fixed then normal smoothing function in the .3ds loader and the
osgUtil::SmoothingVisitor so that unused normals at left at 0,0,0 insead
of being normalized, which results in (nan,nan,nan).
2001-10-16 15:03:10 +00:00
Robert Osfield
0bce843960 Completed implementation of a the new CombineLODsVisitor, ideal for use with
the .flt loader.  Code is stuff currently in sgv, but will be moved out once
more testing has been done.
2001-10-16 14:24:38 +00:00
Robert Osfield
a9564008f3 Added support for transforming LOD and Billboard centers to the
OrientationConverter and the flattenTransformVisitor in sgv.
2001-10-16 10:04:26 +00:00
Robert Osfield
659f7ad1ab Modified Veiewer.cpp so that when toggling the light with 'l' the light can
be overrided to off and overrided to on, previoulsy it only overrided to off.
2001-10-16 10:03:19 +00:00