Commit Graph

195 Commits

Author SHA1 Message Date
Robert Osfield
2ef59b73e9 Change Unit to Units to keep consistent with OpenGL naming. 2006-07-17 11:43:26 +00:00
Robert Osfield
f16a78ad97 Increased the unit multiplier to 3 to avoid z fighting. 2006-07-17 10:25:01 +00:00
Robert Osfield
4bae225d39 Added s/getFactorMultiplier(), s/getUnitMultiplier(), areUnitAndMultipliersSet() and
setFactorAndUnitMultipliersUsingBestGuessForDriver() static methods to
osg::PolygonOffset to help implement workarounds for lack of portablity of
settings between different hardware.
2006-07-14 14:08:33 +00:00
Robert Osfield
abe6260da4 Fixed management of Text's StateSet so that it works correctly when the DefaultFont is active. 2006-07-13 09:01:24 +00:00
Robert Osfield
88609a5eee Updated version numbers for 1.1 release 2006-07-06 10:28:12 +00:00
Robert Osfield
30d32133b8 Tweaked polygon offset 2006-07-06 10:27:40 +00:00
Robert Osfield
2c2083db72 From Vivek Rajan, "Rotated text in SCREEN_COORDS was looking a little squished especially
in orthographic projection. Performing the rotation before the scaling
fixed the problem. I've attached Text.cpp with the fix."

From Robert Osfield, in keeping with Vivek's change moved the auto rotate to screen befor the scale as well.
2006-07-06 08:36:12 +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
4d35807a54 From Matt Green, fix to handling of centering of multi-line text entries. 2006-06-08 13:34:29 +00:00
Robert Osfield
2792c6c2fb From Colin MacDonald, fixed handling of an adding a graphics context after the creating of the osgText::Text. 2006-05-01 16:20:26 +00:00
Robert Osfield
3f2c419db6 From Paul Martz, changed Vec3 to Vec3d to ensure that the lazy evaluation of computeBound work properly. 2005-12-08 20:32:06 +00:00
Robert Osfield
0e16b64665 Coverted tabs to space in core libraries. 2005-11-17 13:35:53 +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
6c31d05172 Added a setSupportsDisplayList(false) to constructor to prevent end users
enabling display lists, something that can break the osgText's managment
of state.
2005-11-02 12:22:12 +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
a312b0451e From Farshid Laskari, changed the compute of the text bounding box to include the spaces. 2005-10-14 09:29:13 +00:00
Robert Osfield
b5c4605d1c From Joran Jessurun, added font search fallbck that strips the leading path from the font file and then looks again. 2005-09-28 13:39:26 +00:00
Robert Osfield
141f8a70d7 From Farshid Lashkari, append "\fonts" to end of windows font search path. 2005-09-11 19:08:41 +00:00
Robert Osfield
1e9fb4ab03 From Marco Jez (with tweaks by Robert Osfield) : clean up of inheritance from std::vector<> classes 2005-07-20 19:42:59 +00:00
Robert Osfield
1c88914e5f From Yuri Vilmanis, improved multi-line justifaction support and new alignment modes 2005-07-15 16:22:53 +00:00
Robert Osfield
1dd553ed0e Bumped version numbers to 0.9.9 in rediness for 0.9.9 release. 2005-05-16 17:17:53 +00:00
Robert Osfield
e82a63ca81 Cross platform build fixes. 2005-05-13 11:11:52 +00:00
Robert Osfield
bf4d63f6ea Added new Node/Drawable::s/getInitialBound and Node/Drawable::s/getComputeBoundCallback
methods and reimplement computeBound so that it passes back a bounding volume rather
than modifying the local one.
2005-05-12 14:03:22 +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
178a0b5c7e Reduced the verboseness of the notifaction messages 2005-04-28 19:50:07 +00:00
Robert Osfield
bf13c8ca14 Changed the default texture size to 512x512 to reduce the number of textures
required when rendering text.
2005-04-28 19:24:09 +00:00
Robert Osfield
84aef32552 Removed old LUMINANCE_ALPHA code pathways since they are no longer used. 2005-04-28 19:08:44 +00:00
Robert Osfield
7f3d46e110 Added check to see if autoTransformCache had been initialized before
using it in the computeBound.
2005-04-28 05:58:20 +00:00
Robert Osfield
38bf740ef4 From Vivek Rajan, "osg::Text was getting stretched when the CharacterSizeMode was set to
SCREEN_COORDS and the SceneView's projection matrix was set to an
Ortho2D matrix (sceneView->setProjectionMatrixAsOrtho2D(-1,1,-1,1)).

Computing the pixel size separately vertically and horizontally, and
setting the scaling factors appropriately based on that fixed the
problem."
2005-04-26 07:49:18 +00:00
Robert Osfield
3ab9867264 Removed increment of the cursor position by the bearing value in the compute
last character code as this should not be used when moving the cursor.
2005-04-20 09:55:24 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
816df3a1d0 Fixes for VS6.0 build 2005-04-04 12:24:18 +00:00
Robert Osfield
c3f40e2e67 Added improved handling of center justificaion of multiline text 2005-03-03 12:33:07 +00:00
Robert Osfield
117c791a3b Added osg::BufferObject and a made a number associated to accomodate this
new class. osg::BufferObject wraps up OpenGL pixel and array buffer objects.
Currently implementation is work in progress.
2005-02-09 10:39:45 +00:00
Robert Osfield
a086a6d01b Changed Font::setSize to Font::setFontResolution 2005-01-27 11:10:50 +00:00
Don BURNS
1771cdbcc7 Update version numbers in files 2004-12-04 23:38:24 +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
a6369da4f4 Moved Registry::CacheHintOptions into ReaderWriter::Options 2004-11-22 14:10:12 +00:00
Robert Osfield
2718058173 Removed the font cache from the FreeType plugin, moving the support across to
osgDB::Registry.
2004-11-02 11:10:44 +00:00
Robert Osfield
7e5c87de6a Changed the version strings to use OpenSceneGaph rather than "Open Scene Graph" 2004-09-27 12:07:34 +00:00
Robert Osfield
54b45ce3bc Updated to DatabasePager support 2004-09-21 21:33:52 +00:00
Robert Osfield
255c27d552 Added a new osgDB::appendPlatformSpecificLibraryFilePaths() method to FileUtils.cpp
Includes a new OSX code from Eric Wing
2004-08-27 16:14:21 +00:00
Robert Osfield
ddb7423e46 Set version numbers for 0.9.7 release 2004-08-05 08:02:48 +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
1ae521981e From David Fries, divide by zero fix on text with a pixel size of 0.0 2004-07-28 07:24:13 +00:00
Robert Osfield
422aab8e3f Added handling of the case when texture objects are released from underneath
the osgText::Font::GlyphTexture - something which requires a full rebuild
of the texture object.
2004-07-19 14:34:12 +00:00
Robert Osfield
4ee909d217 Added better handling of number of graphic context size changes. 2004-03-16 21:03:37 +00:00