Commit Graph

147 Commits

Author SHA1 Message Date
Robert Osfield
7dc3ad4b5e From David Callu, "fixed bounding box bug" 2008-06-18 10:46:05 +00:00
Robert Osfield
01c284429b From Paul Melis, "Here's an updated include/osgText/Text3D that forces recomputation of the glyph repr when the character depth is updated, also when the rendering mode is set.
This caused a Text3D object read from a .osg file to not have the correct depth."
2008-06-06 16:25:14 +00:00
Robert Osfield
e869200b3d Refactored the mutex usage in osgText and freetype plugin to prevent multi-thread crash 2008-02-25 12:54:54 +00:00
Robert Osfield
ce5388a8bc Convert osgText and freetype plugin across to keeping the font size as state that
is passed into the getGlyph and getKerning methods rather than a current state of the font itself.
2007-12-23 18:15:54 +00:00
Robert Osfield
f290b75bc9 Moved Font code across to using FontSizePair internally and on Font methods, but
still using original implemetations.
2007-12-23 13:45:37 +00:00
Robert Osfield
dea067050c Renamed osgText::Font::SizePair to osgText::FontSizePair in prep for use this more
widely within osgText/freetype plugin.

Added support for inserting loading models into --mt multithreaded implementation.
2007-12-23 13:18:40 +00:00
Robert Osfield
0cdc3e9506 Added intializers. 2007-12-16 17:01:40 +00:00
Robert Osfield
213a370c25 Added new setFont(ref_ptr<>) variants to Text and Text3D 2007-12-12 17:48:20 +00:00
Robert Osfield
256391c3b4 From Serge Lages, introduce readRef*File() methods which pass back ref_ptr<> rather than C pointers. 2007-12-12 17:04:48 +00:00
Robert Osfield
eef88e7e83 From David Callu, Text3D 2007-12-10 19:49:17 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
f69a48e552 From David Callu, added support of 3D text to osgText and associated plugins. 2007-12-10 15:15:56 +00:00
Robert Osfield
40ded29902 From Dan Minor, "osgText::Text does not currently have a getAxisAlignment method. The
attached code adds this, along with a member variable to keep track of
the setting.  It is based on the latest subversion version, and was
tested by creating a new text object with the same axis alignment as an
existing one (e.g.
new_text->setAxisAlignment(old_text->getAxisAlignment()); )."

From Robert Osfield, " I originally didn't add a getAxisAlignment()
as all setAxisAlignment does is set the Rotation member variable, and
potentially one could apply user defined Rotation setting after the
setAxisAlignment() which would bring it out of sync with the
setAxisAlignment.

Rather than reject your submission on the ground of potentially
getting out of sync and therefore misleading users I've added a
USED_DEFINED_ROTATION to AxisAlignment enum, and set this in the
serRotation and then override this setting of _axisAlignment in the
setAxisAlingment method.  I've also removed the lazy updating
optimization you've added to the top of setAxisAlignment to avoid
potential problems as well."
2007-09-30 15:06:59 +00:00
Robert Osfield
b20d542317 From David Callu, improved consistency of Version strings and add version support
for osgIntrospection and osgManipulator.
2007-09-05 17:12:24 +00:00
Robert Osfield
c9f6a3f7ca Added mutex into osgText::Font::GlphTexture to marshel adding to and reading
from glyph list
2007-09-04 12:32:47 +00:00
Robert Osfield
3304646c4c Changed Font's mutex to become a static mutex shared between all instances of Font.
This ensures single threaded access of the freetype plugin.
2007-09-01 15:24:22 +00:00
Robert Osfield
13faad13e8 Changed mutex reference to a mutex pointer to avoid problems with wrappers 2007-08-31 20:30:45 +00:00
Robert Osfield
5ae1eb711a To solve creations with multi-threaded creation of text, added mutex to Font, and use of this mutex in Text, and added mutex to the reading
of fonts.
2007-08-31 20:16:02 +00:00
Robert Osfield
4f97cdca96 Added thread safe ref/unref by default. 2007-08-22 12:14:15 +00:00
Robert Osfield
19d1a563fe From Csaba Halasz and Robert Osfield, support for passing in ReaderWriter::Options object into readFontFile 2007-07-02 12:30:14 +00:00
Robert Osfield
eac3dc1963 From Paul Melis, "Here is a list of fixes to misspelled APIs. Unfortunately, more than one
of these are public APIs and therefore will break linkage to existing
shared libraries."

Note from Robert Osfield, updated wrappers.
2007-06-27 20:36:16 +00:00
Robert Osfield
dadb92ea64 Reorganised the managment of margins around glyphs so that is done entirely
with src/osgText/Font.cpp rather than the font plugins or Text.cpp
2007-05-04 12:05:29 +00:00
Robert Osfield
272ab99767 Reorganised the text comments so that they are shorter length, and hopefully will
avoid VS2003's silly text string limits when compiling osgIntrospection wrappers
2007-02-15 14:53:54 +00:00
Robert Osfield
77b9a7ae19 From Eric Sokolwsky, "osgText is a useful node kit, but when longer paragraphs are displayed
on the screen, it looks more aesthetically pleasing to have a larger
gap between lines than is given by default. I added a new parameter,
lineSpacing, in the Text class to allow the line spacing to be adjustable
by the application. The default value is 0 meaning there is no extra
spacing given. The value should be given as a percentage of the character
height. A good value for longer paragraphs is 0.25 (25%) or more."
2007-01-30 14:32:12 +00:00
Robert Osfield
9168d1130e From Mike Wittman, "This file removes the virtual destructor of osgText::String. It seemed wrong that osgText::String should have a vtable since it is treated like a value type, and any subclasses containing additional data would effectively be subject to slicing during standard usage. This stuck out as an anomaly when classifying the OSG types for C# bindings." 2007-01-28 09:17:10 +00:00
Robert Osfield
7f5aaa8424 Improved resizeGLObjectBuffers support 2007-01-08 20:46:56 +00:00
Robert Osfield
709d2fa435 Improved the handling a releaseGLObjects() and add setThreadSafeRefUnref and resizeGLObjectsBuffers methods 2007-01-08 20:40:29 +00:00
Robert Osfield
d23c04018b Updated wrappers 2006-11-08 11:49:35 +00:00
Robert Osfield
85dc696c09 Added FadeText::setFadeSpeed and made internal data structures protected. 2006-10-24 09:06:28 +00:00
Robert Osfield
def74d3471 Introduced new osg::View, and osg::RenderInfo classes into the core OSG to help
handle scenes with multiple views with elements that need coordinating on a per view basis.

Added beginings of new osgText::FadeText class (not functionality yet).
2006-09-18 20:54:48 +00:00
Robert Osfield
96e1630cc7 Removed the String inhertiance from osg::Referenced. 2006-09-01 12:46:45 +00:00
Robert Osfield
6be6bc2eaa Added TexEnv object into Font and apply this in Text::drawImplementation to make
sure that a valid TexEnv is applied
2006-08-28 19:37:40 +00:00
Robert Osfield
98cdf9b3c7 From Eric Wing, fix for compute of the bounding box when handling outline/backdrop text. 2006-08-22 10:23:58 +00:00
Robert Osfield
9e7b07fbcf Reworked the state management within osgText::Text and osgText::Font so that it
only applies textures locally rather than whole StateSet.
2006-08-02 21:05:56 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
419e185895 From Eric Wing, add alternate backdrop implementations.
From Robert Osfield, updated naming  and copy constructor methods.
2006-07-18 12:24:04 +00:00
Robert Osfield
3ad5140942 Change osgText so that the Text drawable now can have its own StateSet
that users can assign to it without it being overriden.  If none is
assigned externally it now uses a StateSet associated wit the Font assigned
to the Text.
2006-07-04 13:56:29 +00:00
Robert Osfield
710adfd698 From Eric Wing, added support for outline/shadow and colour gradient effects. 2006-06-27 13:09:00 +00:00
Robert Osfield
a1cfdca94d From Eric Wing, made getLineCount() const. 2005-12-19 11:18:26 +00:00
Robert Osfield
7d4acba022 Changed constructors to use unsigned int to get round VS6.0 + wrapper problems. 2005-12-09 16:00:01 +00:00
Robert Osfield
479af6e825 Build fix for VS6.0 in the template constructors 2005-12-09 14:52:19 +00:00
Robert Osfield
49301347e8 From Eric Wing, fix to comment. 2005-12-08 08:57:16 +00:00
Robert Osfield
8d8229cc05 From Marco Jez, hack/fix for VS compile/link problems related to STL containers. 2005-12-02 00:25:40 +00:00
Robert Osfield
8289eecb7e From Roger James, reworked the export of std::vector<> on standard types to prevent
problems with .lib being built for all targets under VS7.x
2005-11-21 13:51:24 +00:00
Robert Osfield
9c93332c03 From Rodger James, changed the Win32 static library compilation support to use
OSG_LIBRARY_STATIC to avoid problems with building libs when not required.
2005-11-18 09:52:24 +00:00
Robert Osfield
35fcaf7bde Convert tabs to spaces. 2005-11-17 17:44:48 +00:00
Robert Osfield
258425d649 Bumped the version numbers up to 1.0 in preparation for 1.0-rc1. 2005-11-09 10:49:56 +00:00
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
be07f48884 From Geoff Michel, compile fixes for VS6.0 2005-10-26 09:22:13 +00:00