Commit Graph

46 Commits

Author SHA1 Message Date
Robert Osfield
2773d45f2a From Wang Lam,"The changes allow users of OpenSceneGraph to call a new function
readFontStream() to load fonts from a std::istream, rather than from the
local filesystem by name.  Such a call may be used, for example, if the
user has a font fetched over a network, or a font available in memory
without a correspondng filename.

The changes implement the new function by following the corresponding code
for readFontFile().  readFontStream() reads a stream into memory, and
holds that memory for FreeType.

As a basic test, I mangled the osgtext example to use
readFontStream(std::ifstream("font")) in lieu of a readFontFile call, and
the modified example ran completely."
2005-11-07 11:05:16 +00:00
Robert Osfield
b0d19b0b66 From Farshid Lashkari, "I need the ability to check for a font file without actually loading
the font object.  I've modified font.h/cpp of osgText so that it
exports the findFontFile function."
2005-11-02 10:57:42 +00:00
Robert Osfield
9e5eed280d From Joran Jessurun, comments explaining font search rules 2005-09-28 13:45:32 +00:00
Robert Osfield
668aada787 From Marco Jez, fixes to/and for osgIntrospection. 2005-05-15 20:32:10 +00:00
Robert Osfield
538ced579e Removed deprecated API in preparation for 0.9.9 release. 2005-05-09 13:09:07 +00:00
Robert Osfield
d1a1b1d95c Added more comprehensive releaseGLObjects(State*=0) throughout Nodes,
Drawables,StateSet, and osgDB::Registry.

Added cleanup_frame() from to osgProducer::OsgCamerGroup to help with proper
clean of OpenGL objects before exit, and modified osgviewer, osghangglider,
osgwindows examples to do the extra frame call to cleanup_frame() before exit.
2005-05-07 20:47:09 +00:00
Robert Osfield
08d5f9f85a From Tim Daoust/Robert Osfield, added Font::releaseGLobjects(State*state=0) to
facilate clean up of scene when a graphics context is deleted/reused.
2005-05-07 09:17:55 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
a086a6d01b Changed Font::setSize to Font::setFontResolution 2005-01-27 11:10:50 +00:00
Robert Osfield
5747773096 From Tree, changes to better support Java binding generation 2004-09-28 09:14:04 +00:00
Robert Osfield
7eb3f2646e From Norman Vine (with small tweaks by Robert Osfield), build fixes for Cygwin 2004-08-04 08:27:43 +00:00
Robert Osfield
aa833acfd3 Added support for releasing GLObjects, and renamed DisplayListVisitor the
GLObjectVisitor to better fit its function, and added support for releasing
objects as well as compiling them.
2004-07-20 05:37:59 +00:00
Robert Osfield
6f61b34590 Added className() method to GlyphTexture for debugging purposes. 2004-01-27 14:47:41 +00:00
Robert Osfield
ffec17c6bf Removed redundent , from enum. 2004-01-24 20:50:33 +00:00
Robert Osfield
bbde1b2ae7 Fixes for optional compile of GL_LUMINANCE_ALPHA and GL_ALPHA texture usage
in fonts.  Default to GL_ALPHA.
2003-12-09 12:04:14 +00:00
Robert Osfield
4c3f6004df Moved osgText across to create GL_ALPHA textures instead of GL_LUMINANCE_ALPHA 2003-12-09 11:31:33 +00:00
Robert Osfield
8bbbd1fc70 Made getWidth and getHeight const. 2003-11-07 09:00:22 +00:00
Robert Osfield
8d4ab4668e From Tree, updates to osgText and freetype plugin to support are kerning paramter. 2003-06-26 16:21:49 +00:00
Robert Osfield
895a722842 Addd support for maximum screen text size into osgText when auto scale to
screen is active.

Added osgautotransform demo.
2003-05-01 21:06:18 +00:00
Robert Osfield
5ae998dbc2 Added missing osg:: to StateAttribute. 2003-03-11 21:42:55 +00:00
Robert Osfield
78de76f17f Bug fixes to osgText to handle the osgUtil::Optimizer being used on a scene
graph containing text.

Fixed warning in MD2 plugin.
2003-03-11 13:30:03 +00:00
Robert Osfield
efea365412 Moved the remain inline osg::Font methods into Font.cpp to avoid problems with the
impossibly stupid visual studio compilers.
2003-03-10 09:15:59 +00:00
Robert Osfield
a78600af67 Removed the OSGTEXT_EXPORT symbol from FontImplementation to avoid problems under
VisualStudio.
2003-03-08 09:51:41 +00:00
Robert Osfield
fab6f24f4e Changed the osgText::Font implementation so it used a facade us abstract away
the actual implemention. This has been done so that when a freetype font is
created the implementation can unloaded when the freetype plugin is unloaded
without breaking the main font.

Also add image margin around founds to prevent any image boundaries appearing.
2003-03-06 17:11:24 +00:00
Robert Osfield
ba9fbd371f Updates to the new osgtext example and fix to the friend usage. 2003-03-04 17:14:42 +00:00
Robert Osfield
1c34c0981e Further improvements to osgText and the freetype plugin, handling different
font sizes better and plugin removal safely.
2003-03-04 12:34:42 +00:00
Robert Osfield
e433b42bc0 Updates osghud demo.
Compile fixes for VisualStudio6.0 because its a hideous pile of junk and can't
compile its way out of a paper bag.
2003-03-03 22:18:33 +00:00
Robert Osfield
5d84c10c8f Changed the ownership of Glyph's so that GlyphTexture's own a reference to
Glyph's as well as Font's so keeping the Font valid even after the Font
itself has been desctructed.
2003-03-03 16:12:00 +00:00
Robert Osfield
fbe674b321 First cut of new osgText implementation. 2003-03-02 21:05:05 +00:00
Robert Osfield
8f1ba9d21b Removed include/osg/Types header defining osg::ubyte, osg::ushort etc. Changed
any reference to these in the distribution across to using unsigned char,
unsigned short etc.  This has been done to keep the OSG code more opaque
to what types are.
2003-02-12 19:20:47 +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
c5d3c860d8 From Tree, support for encoded text added into osgText. 2003-01-08 15:22:17 +00:00
Robert Osfield
3bd400130c Name change and const change of Drawable::drawImmediateMode(State&) to
Drawable::drawImplementation(State&) const.   Various updates to the
rest of the OSG to accomodate this.
2002-11-06 15:43:11 +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
Robert Osfield
609a9ebf21 Updates to osgParticle form Macro. 2002-07-22 16:01:00 +00:00
Robert Osfield
3a964a6b93 Updated docs and added osgGA 2002-07-16 20:07:32 +00:00
Robert Osfield
247cb3ff7e Checked in Macro Jez's additions to osgText to support .osg IO make it
a fully functioning NodeKit.

Also reimplement notify() to try an prevent a crash which has been caused by
to objects in notify.cpp being initiliazed twice, the second time the auto_ptr
holding the dev/null ofstream was being initilized to 0.
2002-06-11 18:41:57 +00:00
Robert Osfield
99580f2212 Addd libraryName() method to osg::Object in preperation for the osgDB support
for node kits plugins.
2002-06-06 13:25:36 +00:00
Robert Osfield
c999dfb154 Updates to docs and fixes to a few warnings. 2002-02-09 14:29:58 +00:00
Robert Osfield
4c5fcd3f61 Fixes for IRIX and Boris Bralo's TerraPage loader. 2002-02-08 09:30:02 +00:00
Robert Osfield
c1283c23e8 Removed the trailing ; after namespace {...} declariations in headers
which was being picked as a warning under Codewarrior.
2002-02-03 12:33:41 +00:00
Robert Osfield
02ef10fcfa Moved all references to osg::Cloner to osg::CopyOp. 2002-01-29 14:04:06 +00:00
Robert Osfield
f612924a45 Added support for shallow and deep copy of nodes, drawables and state, via a
copy constructor which takes an optional Cloner object, and the old
osg::Object::clone() has changed so that it now requires a Cloner as paramter.
This is passed on to the copy constructor to help control the shallow vs
deep copying.  The old functionality of clone() which was clone of type has
been renamed to cloneType().

Updated all of the OSG to work with these new conventions, implemention all
the required copy constructors etc.  A couple of areas will do shallow
copies by design, a couple of other still need to be updated to do either
shallow or deep.

Neither of the shallow or deep copy operations have been tested yet, only
the old functionality of the OSG has been checked so far, such running the
viewer on various demo datasets.

Also fixed a problem in osg::Optimize::RemoveRendundentNodesVisitor which
was not checking that Group didn't have have any attached StateSet's, Callbacks
or UserData.  These checks have now been added, which fixes a bug which was
revealled by the new osgscribe demo, this related to removal of group acting
as state decorator.

method
2002-01-28 21:17:01 +00:00
Robert Osfield
4fbf4db42e Added support for multiple graphics contexts, submission from Max Rhiener.
Alas changed the indenting to use 4 spaces instead of tabs, this irons out
differences when working under Windows and Unix, keeping the identing
consistent.
2002-01-18 22:25:51 +00:00
Robert Osfield
1fb8f9cb86 First batch of changes required for MacOS X build. Orignal submission from
Phil Atkin, merged by Robert Osfield.
2002-01-16 10:36:20 +00:00
Robert Osfield
34555f61d6 Added new files to cvs. 2001-11-12 10:04:57 +00:00