Commit Graph

39 Commits

Author SHA1 Message Date
Robert Osfield
dd996a3289 Introduced CMake option OSG_PROVIDE_READFILE option that defaults to ON, but when switched to OFF disables the building of the osgDB::read*File() methods,
forcing users to use osgDB::readRef*File() methods.  The later is preferable as it closes a potential threading bug when using paging databases in conjunction
with the osgDB::Registry Object Cache.  This threading bug occurs when one thread gets an object from the Cache via an osgDB::read*File() call where only
a pointer to the object is passed back, so taking a reference to the object is delayed till it gets reassigned to a ref_ptr<>, but at the same time another
thread calls a flush of the Object Cache deleting this object as it's referenceCount is now zero.  Using osgDB::readREf*File() makes sure the a ref_ptr<> is
passed back and the referenceCount never goes to zero.

To ensure the OSG builds when OSG_PROVIDE_READFILE is to OFF the many cases of osgDB::read*File() usage had to be replaced with a ref_ptr<> osgDB::readRef*File()
usage.  The avoid this change causing lots of other client code to be rewritten to handle the use of ref_ptr<> in place of C pointer I introduced a serious of
templte methods in various class to adapt ref_ptr<> to the underly C pointer to be passed to old OSG API's, example of this is found in include/osg/Group:

    bool addChild(Node* child); // old method which can only be used with a Node*

    tempalte<class T> bool addChild(const osg::ref_ptr<T>& child) { return addChild(child.get()); } // adapter template method

These changes together cover 149 modified files, so it's a large submission. This extent of changes are warrent to make use of the Object Cache
and multi-threaded loaded more robust.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15164 16af8721-9629-0410-8352-f15c8da7e697
2015-10-22 13:42:19 +00:00
Robert Osfield
d14a602a59 From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14882 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:11:49 +00:00
Robert Osfield
9b03b3f8ce Moved TextureCubeMap::Extension functionality into GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14576 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 20:05:18 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
a9dd08c3ba Removed redudent set up of GL_ cubemap defines as these are now also in include/osg/Texture 2010-10-09 11:27:45 +00:00
Robert Osfield
f6517d2f8b From Alexander Wiebel, "I did some spell checking in my spare time. Here come 20 files." 2010-09-24 14:53:10 +00:00
Robert Osfield
5e83ae4821 From Art Trevs, "Features of the patch are:
- Implementation of integer textures as in EXT_texture_integer

- setBorderColor(Vec4) changed to setBorderColor(Vec4d) to pass double values
as border color. (Probably we have to provide an overloading function to
still support Vec4f ?)

- new method Texture::getInternalFormatType() added. Gives information if the
internal format normalized, float, signed integer or unsigned integer. Can
help people to write better code ;-)

"

Futher changes to this submission by Robert Osfield, changed the dirty mipmap
flag into a buffer_value<> vector to ensure safe handling of multiple contexts.
2007-09-11 12:04:58 +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
174e3b3dc3 Fixed RenderToTexture bug which occured when the viewport dimensions where
different than the texture being written to.
2006-08-03 15:57:39 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
4915259878 Improved support for texture subload/render to texture in various Texture classes
and RenderStage.
2005-11-04 12:08:16 +00:00
Robert Osfield
4e69d46289 Further work on trying to get glGenerateMipMapEXT working in conjunction with
frame buffer objects.  Still don't work under Linux yet through :-|
2005-07-27 11:27:44 +00:00
Robert Osfield
3c23a42f17 Added support for TextureCubeMap into osgUtil::RenderToTextureStage. 2005-07-25 13:05:57 +00:00
Robert Osfield
a1bda0dab8 Added support for per context extension string.
Note, this required adding a unsigned int context ID to the osg::isGLUExtensionSupported(,)
and osg::isGLExtensionSupported(,) functions.  This may require reimplementation
of end user code to accomodate the new calling convention.
2005-04-26 13:15:27 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
d268cf46fa Renamed SG_LIBRARY and SG_EXPORT macro's to OSG_LIBRARY and OSG_EXPORT 2005-04-11 17:14:17 +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
ee67127279 From Eric Hammil, typo and spelling fixes 2004-09-13 15:14:11 +00:00
Robert Osfield
bb5576bef8 Added support s/getImage(uint i) and getNumImages(). 2004-07-27 10:11:45 +00:00
Robert Osfield
c8b8a81052 Changed StateAttribute::getAssociatedModes(std::vector<GLMode>&) across
to StateAttribute::getModeUsage(StateAttribute::ModeUsage&).
2004-03-03 15:38:22 +00:00
Robert Osfield
0ab467483f Added support for automatic scaling of text to screen coords. Optimized
the text implementation to provide better speed, especially by using the
alignement to screen option.

Deprecated the Text::setFontSize(,) method, which is now being replaced
by setFontResolution(,)

Fixed typos in Texture*.cpp.

Removed old deprecated methods from osg headers.
2003-04-30 11:40:17 +00:00
Robert Osfield
8b03d59be3 Added support for modifying the osg::Texture*:Extensions stuctures.
Added an example modifying osg::Texture::Extensions to osgtext.  Optionally
compiled out by default.
2003-04-10 13:41:45 +00:00
Robert Osfield
9f0fa75484 Added support for unref image data after apply in the osg::Texture*
classes.  Only unref's after all graphics context have been applied.
2003-04-07 12:51:00 +00:00
Robert Osfield
7e58786b11 Moved the modified tag's from osg::Texture into the osg::Texture1D,2D,3D and
CubeMap classes.
2003-04-07 09:46:06 +00:00
Robert Osfield
bf184ef7a3 From Tree, added SG_EXPORT to the inner classes for Java binding work. 2003-03-18 19:42:34 +00:00
Robert Osfield
bd506b53da Removed last of the uint references. 2003-02-14 11:41:52 +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
478f736f63 Added missing osg::TextureCubeMap::getAssociatedMode(). 2002-10-07 11:06:37 +00:00
Robert Osfield
91df37b5c8 Further work on multiple context extensions. 2002-09-16 20:58:05 +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
cf9e9e2b5b Fixes to Math for MacOSX build.
Converted TextureCubeMap to unix file endings.
2002-08-30 15:32:59 +00:00
Robert Osfield
8353fc0ed6 Removed deprecated code from the distribution.
Added .osg support for Texture1D and Texture3D.
2002-08-28 15:28:11 +00:00
Robert Osfield
239068f223 Added new osg::TextureBase, osg::Texture1D, osg::Texture2D, and osg::Texture3D
classes, and changed osg::Texture and osg::TextureCubeMap so that they now derive
from osg::TextureBase.
2002-08-24 19:39:39 +00:00
Robert Osfield
3a964a6b93 Updated docs and added osgGA 2002-07-16 20:07:32 +00:00
Robert Osfield
0801b363f5 Work on supporting multitexturing in State/StateSet/StateAttribute/Geoemtry. 2002-07-07 14:40:41 +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
9836af1055 Added osg::TextureCubeMap which encapsulates OpenGL's cube texture mapping. 2002-03-20 22:39:51 +00:00
Robert Osfield
0b27e5c381 Updates to Texture and TextureCubeMap to clean up the code so they share
much more of the core texture setup code. This largely invloved paramterizing
the applyImmediateMode, which has also been rename applyTexImage to reflect
its functionality better.
2002-03-20 11:24:47 +00:00
Robert Osfield
8f02db61e5 Added osg::TextureCubeMap. submission from Brede Johansen. 2002-03-18 23:10:33 +00:00