Commit Graph

1583 Commits

Author SHA1 Message Date
Robert Osfield
410b90334a From Wojciech Lewandowski, "I have restored MSVC disabled warnings in osg/Export. Difference is they are now disabled only when OSG_DISABLE_MSVC_WARNINGS macro is defined. This macro is set through CMake options and autogenerated in osg/Config. Simon suggested that it would be cool if we had more control over selected warnings. I tried to learn how to make selection of individual warning numbers possible, but had to gave up as my cmake skills were not sufficient. The only way I saw this possible would be adding one define for each MSVC warning number. But many definitions seemed too be to much clutter for osg/Config file so I rejected thar idea. For this it would be cool if autogenerated Config entries could more powerful than simple #define/#undef flags. Maybe Cmake gurus know how to do it.
I have not reverted added Compiler options. I assume that one may want to have warnings enabled for the application but may not want to see them while OSG libraries and examples compile.

Modified files:

osg/Export   - now explicitly includes osg/Config to make sure OSG_DISABLE_MSVC_WARNINGS is read
osg/Config.in  - declares OSG_DISABLE_MSVC_WARNINGS flag to be added to autogenerated osg/Config
CMakeLists.txt - declares OSG_DISABLE_MSVC_WARNINGS as option with default ON setting
"
2008-11-24 16:32:52 +00:00
Robert Osfield
5b15436935 Added mechanism for tracking when interactive images are being rendered to
enable their backends to only rendered them when they are actively being rendered
in the OpenGL window.
2008-11-23 15:51:43 +00:00
Robert Osfield
8264b31fa1 Introduce osg::asciiToDouble/asciiToFloat function. 2008-11-23 11:35:43 +00:00
Robert Osfield
98df67c918 Added DisplaySettings::s/getApplication() to help with gecko plugin initialization when it requires the application name 2008-11-20 12:03:21 +00:00
Robert Osfield
cac16cb590 Added optional bool keep to BarrierOperation to make it more resuable 2008-11-18 15:18:34 +00:00
Robert Osfield
453bbc8608 From Simon Hammett, moved VS #prgama warning disabling from include/osg/Export to CMakeList.txt. 2008-11-14 18:22:01 +00:00
Robert Osfield
11388f3519 Updated version number in prep for 2.5.6 dev release 2008-11-13 10:49:33 +00:00
Robert Osfield
2090fb1450 From Jaromir Vitek, "patch contains extension to fbo and camera. Camera can attach new render buffer for depth and stencil logical buffer in packed form." 2008-11-09 11:55:11 +00:00
Robert Osfield
3455431129 From Tim Moore, removed redundent forward declartion of BoundingBox and BoundingSphere 2008-11-07 13:18:40 +00:00
Robert Osfield
7b9474e33e Fixed constness of getTexture/getRenderBuffer() const and added non cost version. 2008-11-06 14:46:11 +00:00
Robert Osfield
b5aa966d12 From Michael Platings, "I've added functions to get the
texture, renderbuffer and other properties from a FrameBufferAttachment."
2008-11-06 14:29:35 +00:00
Robert Osfield
70e1c60819 Added sendPointerEvent and sendKeyEvent virtual methods to osg::Image to
facilitate the subclassing of Image providing interactive behaviours so as
used in the vnc interactive VncImage class.

osgViewer::InteractiveImageHandler provides an event handler that convertes osgGA 
mouse and keyboard events into the coordinate frame of an image based on ray intersection with geometry in
the associated subgraph.

Changed the ordering of events processing in Viewer and CompositeViewer to allow
scene graph event handlers to take precidence over viewer event handlers and camera manipulators
2008-11-03 15:08:04 +00:00
Robert Osfield
545a5d02c7 Changed version number to 2.7.5 in prep for dev release 2008-11-03 15:03:49 +00:00
Robert Osfield
b28612bce2 Various warning fixes 2008-10-27 13:09:43 +00:00
Robert Osfield
0ff3f48693 Improved the support for no pre compile, and configuring the number of threads in the DatabasePager. 2008-10-26 22:22:38 +00:00
Robert Osfield
10186190f6 Introduced support for controlling mipmapping of osgTerrain::ImageLayer and compression of osgTerrain::HeightFieldLayer. 2008-10-20 08:43:25 +00:00
Robert Osfield
ac975bf79a Added a Refrenced::getGlobalReferencedMutex, and OpenThreads::ScopedPointerLock() and use of this in add/removeParent() codes
to avoid threading problems when using atomic ref counting.
2008-10-14 14:27:41 +00:00
Robert Osfield
af13e84093 UPdated version numbers 2008-10-14 14:25:54 +00:00
Robert Osfield
5e95d6e3b5 Added Texture1D(Image*) and Texture3D(Image*) constructors 2008-10-08 11:30:18 +00:00
Robert Osfield
8c98220878 Added the ability to release OpenGL objects in PagedLOD subgrphs that are no longer being rendered. 2008-10-07 11:35:41 +00:00
Robert Osfield
8147bd4df8 Refactored ImageSequence to provided a cleaner and more robust implementation 2008-10-06 17:02:20 +00:00
Robert Osfield
eb01f3365f Added include <osg/Config> to take advantage of OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION 2008-10-03 16:57:01 +00:00
Robert Osfield
e7bfc59f5a From Neil Groves, addition on a T* implicit output conversion method and removal of comparison methods that are replaced by the single conversion method.
From Robert Osfield, optional compilation of above.
2008-10-03 15:13:11 +00:00
Robert Osfield
eb5a656f4e From Neil Groves, added intrusive_ptr_add_ref and intrusive_ptr_release methods to enable
usage of boost::intrusive_ptr<> with osg::Referenced objects.
2008-10-03 13:34:32 +00:00
Robert Osfield
99fd6ed93a From Neil Groves, "Frequently I would like code that has a signature like: void foo(osg::ref_ptr<osg::Node> node) to work for osg::ref_ptr<osg::Group>, osg::ref_ptr<osg::Geode> etc. The behaviour of osg::ref_ptr does not mimic the behaviour of a raw pointer in this regard.
To facilitate this possibility I have added a template copy constructor and a template assignment operator. These work for safe conversions like those in my previous example, but fail as desired for non-safe conversions since the template instantiation fails during the raw pointer copy/assignment.

The lack of this facility has appreciably handicapped development of generic algorithms applied to the scene graph, and I believe that this alteration will be welcomed by most of the community. If there are issues with antiquated compilers not supporting template member functions then perhaps a small piece of conditional compilation is in order.

I have made the change using the latest release version (2.6) as the base. The full file is attached.

I have not tested building the osg wrappers and the script binding code. I have tested the legal and illegal conversions of both copying and assignment to ensure that behave as expected on MSVC7.1, MSVC8, MSVC9, GCC 4.3."
2008-10-03 09:55:20 +00:00
Robert Osfield
3bbd4bbfd6 Removed unused methods 2008-09-25 15:19:42 +00:00
Robert Osfield
922b85b386 Changed the macro usage so that the quotes are now added inside the .cpp 2008-09-22 13:16:29 +00:00
Robert Osfield
9510df9c2e From Alan Dickinson, change methods to virtual. 2008-09-18 13:54:13 +00:00
Robert Osfield
0969a5384b Improved the constness of parameters the Node::getWorldMatrices(..) method.
Added Drawable::getWorldMatrices(const Node*) method.
2008-09-18 10:38:18 +00:00
Robert Osfield
22eae68e48 From Mathias Froehlich, "This is a generic optimization that does not depend on any cpu or instruction
set.

The optimization is based on the observation that matrix matrix multiplication
with a dense matrix 4x4 is 4^3 Operations whereas multiplication with a
transform, or scale matrix is only 4^2 operations. Which is a gain of a
*FACTOR*4* for these special cases.
The change implements these special cases, provides a unit test for these
implementation and converts uses of the expensiver dense matrix matrix
routine with the specialized versions.

Depending on the transform nodes in the scenegraph this change gives a
noticable improovement.
For example the osgforest code using the MatrixTransform is about 20% slower
than the same codepath using the PositionAttitudeTransform instead of the
MatrixTransform with this patch applied.

If I remember right, the sse type optimizations did *not* provide a factor 4
improovement. Also these changes are totally independent of any cpu or
instruction set architecture. So I would prefer to have this current kind of
change instead of some hand coded and cpu dependent assembly stuff. If we
need that hand tuned stuff, these can go on top of this changes which must
provide than hand optimized additional variants for the specialized versions
to give a even better result in the end.

An other change included here is a change to rotation matrix from quaterion
code. There is a sqrt call which couold be optimized away. Since we divide in
effect by sqrt(length)*sqrt(length) which is just length ...
"
2008-09-17 16:14:28 +00:00
Robert Osfield
7ec5632bcc Introduce new templated clone(..) methods that return the correct type of object cloned. 2008-09-17 14:21:19 +00:00
Robert Osfield
d71a6f6cab Introduced Geometry::containsSharedArrays() and Geometry::duplicateSharedArrays() to
support a fix to the osgUtil::Simplifier that couldn't handle shared arrays
2008-09-14 10:31:27 +00:00
Robert Osfield
995ead176a Introduced TransferFunction1D::assign(ValueMap&). 2008-09-13 09:09:51 +00:00
Robert Osfield
dc1b52aa7c Updated version numbers in prep for up comming dev release 2008-09-11 16:11:51 +00:00
Robert Osfield
45ccf11161 Added osg::Image::set/getWriteHint() that allows images themselves to control how
they are written to disk, either inline or as an external file.  Added support for
this in the .ive plugin.  Default of WriteHint is NO_PREFERNCE, in which case it's
up to the reader/writer to decide.
2008-09-10 11:26:30 +00:00
Robert Osfield
4a18b9cee1 Updated version for 2.7.2 dev release 2008-09-01 11:09:03 +00:00
Robert Osfield
8fec858b49 Build fixes for Windows 2008-09-01 09:57:35 +00:00
Robert Osfield
c8ef144532 Converted AutoTransform to use doubles. 2008-08-28 09:43:00 +00:00
Robert Osfield
908f49f6e3 Updated version number for 2.7.1 release, and added OSG_FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL Cmake option
that enables the occlusion query workaround for an OpenGL driver crash
2008-08-25 16:44:48 +00:00
Robert Osfield
9c8e44659f From Erik van Dekker,
"I made several modifications:

 

    * The cause of my errors was that my OSG source directory path contains spaces. To fix this issue I wrapped all paths with quotes, as stated in doxygen documentation.

 

    * I also received some warning messages about deprecated doxygen settings, which I fixed by updating the doxygen file, i.e. running \u2018doxygen \u2013u doxygen.cmake\u2018. By running this command deprecated doxygen options are removed, some option comments have changed and quite some options have been added (I kept their default settings unless mentioned).

 

    * I was surprised to find that the doxygen OUTPUT_DIRECTORY was set to \u201c${OpenSceneGraph_SOURCE_DIR}/doc\u201d, which does not seem appropriate for out of source builds; I changed this to \u201c${OpenSceneGraph_BINARY_DIR}/doc\u201d. (On the other hand, maybe a cmake selectable option should be given to the user?)

 

    * Fixed two warnings I received about unexpected end-of-list-markers in \u2018osg\AnimationPath and \u2018osgUtil\CullVisitor due to excess trailing points in comments.

 

    * Fixed a warning in osgWidget\StyleInterface due to an #include directive (strangely) placed inside a namespace.

 

    * Fixed a warning in osg\Camera due to the META_Object macro that confused doxygen. Adding a semi-colon fixed this.

 

    * Removed auto_Mainpage from the INCLUDE option, because I am positive that this file does not belong there; It never generated useful documentation anyway.

 

    * I added the OSG version number environment variable to the PROJECT_NUMBER option so that the version number is now shown on the main page of generated documentation (e.g. index.html).

 

    * Changed option FULL_PATH_NAMES to YES, but made sure STRIP_FROM_PATH stripped the absolute path until the include dir. This fixed an issue that created mangled names for identical filenames in different directories. E.g. osg/Export and osgDB/Export are now correctly named.

 

    * Changed option SHOW_DIRECTORIES to yes, which is a case of preference I guess.

 "
2008-08-18 11:00:40 +00:00
Robert Osfield
87b79bd221 Removed todo entry 2008-08-18 10:47:43 +00:00
Robert Osfield
3de3b2dccc From Maceij Krol, "I have implement frame based expiration of PagedLOD children.
New attribute DatabasePager::_expiryFrames sets number of frames a PagedLOD child is kept in memory. The attribute is set with DatabasePager::setExpiryFrames method or OSG_EXPIRY_FRAMES environmental variable.

New attribute PagedLOD::PerRangeData::_
frameNumber contains frame number of last cull traversal.

Children of PagedLOD are expired when time _AND_ number of frames since last cull traversal exceed OSG_EXPIRY_DELAY _AND_ OSG_EXPIRY_FRAMES respectively. By default OSG_EXPIRY_FRAMES = 1 which means that nodes from last cull/rendering
traversal will not be expired even if last cull time exceeds OSG_EXPIRY_DELAY. Setting OSG_EXPIRY_FRAMES = 0 revokes previous behaviour of PagedLOD.

Setting OSG_EXPIRY_FRAMES > 0 fixes problems of children reloading in lazy rendering applications. Required behaviour is achieved by manipulating OSG_EXPIRY_DELAY and OSG_EXPIRY_FRAMES together.

Two interface changes are made:

DatabasePager::updateSceneGraph(double currentFrameTime) is replaced by DatabasePager::updateSceneGraph(const osg::FrameStamp &frameStamp). The previous method is in #if 0 clause in the header file. Robert, decide if You want to include it.

PagedLOD::removeExpiredChildren(double expiryTime, NodeList &removedChildren) is deprecated (warning is printed), when subclassing use PagedLOD::removeExpiredChildren(double expiryTime, int expiryFrame, NodeList &removedChildren) instead. "
2008-08-17 16:52:35 +00:00
Robert Osfield
b6886cdbb2 Updated version numbers in prep for next dev release 2008-08-15 17:26:06 +00:00
Robert Osfield
38f6cddc2c Changed osg::ImageSequence::set/getDuration to set/getLength() to be in keeping with the
osg::ImageStream's getLength().
2008-08-15 16:21:44 +00:00
Robert Osfield
927942a0f8 Further work on osg::ImageSequence, improving pause functionality, and introducing new seek(double time) method 2008-08-15 12:45:20 +00:00
Robert Osfield
49e7358bf6 Added initial looping and pause play support 2008-08-14 16:29:12 +00:00
Robert Osfield
7f8183f64c Merged changes to OpenSceneGraph-2.6 into trunk using :
svn merge -r 8729:8734 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6 .
2008-08-05 11:17:48 +00:00
Robert Osfield
fe207a09c1 From Sherman Wilcox, "Minor change to bool setGLExtensionFuncPtr(T& t, const char* str1) and
setGLExtensionFuncPtr(T& t, const char* str1, const char* str2) -
functions returned false even on success."
2008-08-04 17:08:28 +00:00
Robert Osfield
02f131c7fe From Philip Lowman, workaround of Centos 5's missing definition of GL_MAX_SAMPLES_EXT. 2008-08-04 14:01:42 +00:00
Robert Osfield
5b5e3e5f78 Updated version numbers to 2.6.0 2008-07-25 21:01:57 +00:00
Robert Osfield
65d5ef608d Reverted back to using std::list<std::String> 2008-07-25 17:42:37 +00:00
Robert Osfield
d0890ab250 Updated wrappers, and further refined the ImageSequence API 2008-07-25 16:11:51 +00:00
Robert Osfield
ec4d189b64 Added ImageSequence to .ive plugin, added support for multiple ImageThreads in osgDB::ImagePager 2008-07-25 13:45:07 +00:00
Robert Osfield
daa3d2381a Implemented ImagePager internals 2008-07-23 19:04:46 +00:00
Robert Osfield
6488ff23a5 Fixed unitialized variable 2008-07-23 15:42:02 +00:00
Robert Osfield
cc2af85c96 Further work on ImageSequence 2008-07-22 20:20:16 +00:00
Robert Osfield
c9dc578186 Added support for pruning old images, recording the Duration in the .osg file, and -o filename output support in osgimagesequence. 2008-07-22 16:44:49 +00:00
Robert Osfield
5ab73e9f80 Added support for ImageSequence to all Texture classes 2008-07-22 12:28:46 +00:00
Robert Osfield
041a06b89d Further work on osg::ImageSequence/osgDB::ImagePager 2008-07-21 21:00:57 +00:00
Robert Osfield
73bcc2613c Upated version number for dev release 2008-07-21 20:44:37 +00:00
Robert Osfield
acd7e65687 Added basic image sequencing 2008-07-21 17:28:22 +00:00
Robert Osfield
ac61676368 Initial cut of osgimagesequence example 2008-07-21 10:57:06 +00:00
Robert Osfield
d17a255d8e First cut of osg::ImageSequence class 2008-07-21 09:46:53 +00:00
Robert Osfield
4aed0a7eac From Ulrich Hertlein, "attached are some minor tweaks:
- fixed typos in osgViewer/ViewerBase
- const-ness in include/osg/View findSlaveIndexForCamera
- supported options for STL reader, fixed return values to reflect proper errors
- supported options for DirectX reader, fixed return values
- normals pseudo-loader: scaling normals to a const (but variable) fraction of the bounding sphere radius
"
2008-07-17 13:51:14 +00:00
Robert Osfield
5f0f80cab2 Changed int's to unsigned int's to avoid warnings 2008-07-16 13:26:06 +00:00
Robert Osfield
f4cb039a3c Updated version number to 2.5.5 in prep for dev release 2008-07-15 19:24:48 +00:00
Robert Osfield
35bc9c7dd2 From Art Trevs, Removed GLeunm version setAttachment() to avoid ambigiuity with
whether to enable MRT.
2008-07-15 14:24:21 +00:00
Robert Osfield
a3e28a795f Added an OSG_EXPORT 2008-07-12 17:30:17 +00:00
Robert Osfield
de33a031d4 Updated version numbers for dev release 2008-07-11 20:01:12 +00:00
Robert Osfield
a856459a86 Moved the building and intersecting of the KdTree into the .cpp, and cleaned up
the header to ready it for wider usage
2008-07-11 16:48:39 +00:00
Robert Osfield
d3fd43cc6f Streamlined KdTree implementation 2008-07-10 15:50:10 +00:00
Robert Osfield
7be3d1ae02 Reordered KdLeaf/KdNode so that the first element to be accessed is first in the data structure 2008-07-09 19:41:36 +00:00
Robert Osfield
134c86c2d5 Implement hierachy culling in KdTree::intersect(..) 2008-07-07 20:27:56 +00:00
Robert Osfield
d05236bfb4 Implemented intial KdTree triangle intersection code, but without culling implemented 2008-07-07 13:21:37 +00:00
Robert Osfield
682be50e2a Changed types to avoid warnings under Windows 2008-07-07 09:40:30 +00:00
Robert Osfield
c4e8d6ee42 Changed the DatabasePager so that it bypasses the Registry::readNode() method and calls
readNodeImplementation() directly to avoid calling the KdTreeBuilder.   

Updated wrappers.
2008-07-06 18:27:10 +00:00
Robert Osfield
3965fe357b Moved KdTree build code into osg::KdTree 2008-07-06 12:14:19 +00:00
Robert Osfield
44d144997e Added prelimnary KdTree data structure and automatic kdtree build support
into osgDB::Registry/osgTerrain so that newly created subgraphs can have 
KdTree built on all osg::Geometry automatically on load/creation.
2008-07-04 15:57:48 +00:00
Robert Osfield
bc1032653c Moved vertex indicies method into a single block with deprecated doc lines 2008-07-04 11:51:55 +00:00
Robert Osfield
1057d74a11 Simplified the MixinVector class so that it no longer supports custom allocators,
instead just uses std::vector<>'s default allocators.
2008-06-27 12:44:41 +00:00
Robert Osfield
34f58482e6 Moved the apply(&) default implementations from the header into the NodeVisitor.cpp,
and changed the casts to use static_cast<>.
2008-06-27 12:35:56 +00:00
Robert Osfield
260d0d384f From Mathias Froehlich, build fixes for various unices 2008-06-26 12:08:37 +00:00
Robert Osfield
5a4ce5a387 From Mathias Froechlich, "Attached is a change to that atomic stuff to move the win32, msvc
implementation of the atomic increment and decrement into a implementation
file.
This way inlining and compiler optimization can no longer happen for these
implementations, but it fixes compilation on win32 msvc targets. I expect
that this is still faster than with with mutexes.

Also the i386 gcc target gets atomic operations with this patch. By using an
implementation file we can guarantee that we have the right compiler flags
available."
2008-06-26 10:27:16 +00:00
Robert Osfield
af271f99ec Added support for X11's overrideRedirect functionality 2008-06-21 17:50:58 +00:00
Robert Osfield
a71939c5bb From Mathias Froehlich, moved optional config variables into include/osg/Config file that
is automatically created by cmake according to its own settings.
2008-06-20 15:50:53 +00:00
Robert Osfield
bc6e5b5da2 Updated version numbers for dev releases 2008-06-20 11:11:47 +00:00
Robert Osfield
2011028ee7 From Neil Groves,
"I have taken the liberty of updating a few files so that there is no longer any derivation from std::vector. I have done this by adding a new file osg/MixinVector and by updating only two others: osg/PrimitiveSet and osg/Array. You will notice that this actually removes what is acknowledged as a \u2018hack\u2019 in osg/PrimitiveSet.

With the original code I did manage to find memory leaks with some compiler options on VC 8 and 9, as well as Intel compiler. I determined the leak existence by instrumenting the destructor code, and by use of a garbage collector as a leak detector (in a similar manner to the Firefox project). Hence in contrast to what I said originally, it is exhibiting symptoms on at least some platforms.

Since I am trying to be a good OSG citizen I got out my editor and started hacking! I have built and tested on Linux (Ubuntu) with GCC 4.x and Windows VC 8 SP1. It appears that nothing is broken, and that I\u2019m using less memory J"
2008-06-19 20:38:38 +00:00
Robert Osfield
936edacc92 From Mathias Froehlich, added support for using OpenThreads::Atomic for thread safe ref/unref. 2008-06-19 17:30:38 +00:00
Robert Osfield
061be3d084 In Program::PerContextProgram changed const Uniform* to osg::ref_ptr<const Uniform*> to avoid the possibility of a uniform being deleted
and another being created and assigned at the same address which previously confused the uniform tracking code and introduced a bug.
2008-06-19 11:58:34 +00:00
Robert Osfield
174f9bbfe0 From Michael Platings and Robert Osfield, added support for controlling,
via StateSet::setNestedRenderBin(bool) whether the new RenderBin should be nested
with the existing RenderBin, or be nested with the enclosing RenderStage.
2008-06-19 11:09:20 +00:00
Robert Osfield
f06d50a7eb From Michael Platings, implemented check against max number of supported samples to ensure that the number of samples is safely capped to what the hardware is capable of, avoiding GL errors and graceful fallback 2008-06-18 20:24:12 +00:00
Robert Osfield
90ea0bd95f From Michael Platings and Paul Palumbo, multi-sample FBO support 2008-06-18 14:09:11 +00:00
Robert Osfield
7cfe00d3d9 Added overriding of CullSettings::inheritCullSettings() into osg::Camera to
properly inherit the clear colour.
2008-06-16 20:22:16 +00:00
Robert Osfield
3585375d59 Updated versions for 2.5.2 dev release 2008-06-06 17:45:33 +00:00
Robert Osfield
abfb5bbb8d Added accep(Shape&) 2008-06-05 13:46:19 +00:00
Robert Osfield
65772e451c Added applyMaskAction(CLEAR_COLOR) to Camera::setClearColor() to enable proper inheritance 2008-05-30 20:15:31 +00:00
Robert Osfield
0cc38108a5 Fixed cirular reference in DatabaseRequest 2008-05-30 11:43:04 +00:00
Robert Osfield
f07d106366 Moved enum to public scope and rebuilt wrappers to fix wrapper build error 2008-05-29 13:54:59 +00:00
Robert Osfield
8677c4d6d6 From Michael Platings, "On nvidia cards mipmap generation for non-power-of-two textures with
GL_GENERATE_MIPMAP_SGIS is very slow (over half a second for a 720*576
texture). However, glGenerateMipmapEXT() performs well (16ms for the
same texture), so I have modified the attached files to use
Texture::generateMipmap() if glGenerateMipmapEXT is supported, instead
of enabling & disabling GL_GENERATE_MIPMAP_SGIS."

Notes, from Robert Osfield, I've tested the out of the previous path using
GL_GENERATE_MIPMAP_SGIS and non power of two textures on NVidia 7800GT and
Nvidia linux drivers with the image size 720x576 and only get compile times
of 56ms, so the above half second speed looks to be a driver bug.  With
Muchael's changes the cost goes done to less than 5ms, so it's certainly 
an effective change, even given that Michael's poor expereiences with
GL_GENERATE_MIP_SGIS do look to be a driver bug.
2008-05-28 11:19:41 +00:00
Robert Osfield
b41404546e Updated version numbers in prep for 2.5.1 release 2008-05-27 12:07:58 +00:00
Robert Osfield
804c91c8c1 From Art Tevs, "I've attached a patch for the Texture2DArray which solves problems of loading image data into the texture array. So here are a small description:
- Solves issues of loading image data into the texture memory
- Print a warning if images are of different dimensions or have different internal formats (GL specification requires images to be the same)


Patch is tested and seems to work fine. It shouldn't break any other functionality. It should go into include/osg and src/osg
"
2008-05-26 21:53:57 +00:00
Robert Osfield
1f8ff7916c Fixed copyright notice typo 2008-05-26 21:44:14 +00:00
Robert Osfield
cac6e2facb Added continuous recording of the animation path to the RecordAnimationPathHandler 2008-05-26 17:30:43 +00:00
Robert Osfield
a88567a852 Added #define's for PixelBufferObject extensions.
Added docs for Camera::DrawCallback
2008-05-24 11:05:10 +00:00
Robert Osfield
7b003b24ea Refactored DatabasePager and related classes to introduce support for
multi-threaded paging, where the Pager manages threads of reading local
and http files via seperate threads.  This makes it possible to smoothly
browse large databases where parts of the data are locally cached while
others are on a remote server.  Previously with this type of dataset 
the pager would stall all paging while http requests were being served,
even when parts of the models are still loadable virtue of being in the 
local cache.

Also as part of the refactoring the DatabaseRequest are now stored in the
ProxyNode/PagedLOD nodes to facilitate quite updating in the cull traversal,
with the new code avoiding mutex locks and searches.  Previous on big 
databases the overhead involved in make database requests could accumulate
to a point where it'd cause the cull traversal to break frame.  The overhead
now is negligable.

Finally OSG_FILE_CACHE support has been moved from the curl plugin into
the DatabasePager.  Eventually this functionality will be moved out into
osgDB for more general usage.
2008-05-21 21:09:45 +00:00
Robert Osfield
1d2bd834a4 Updated version number for 2.5.0 dev release 2008-05-12 11:01:54 +00:00
Robert Osfield
965c72f5bd From Eric Sokolowski and Robert Osfield, moved command line option usage setup
from osgviewer example into osg::ArgumentParser and osgViewer::Viewer to make
them more universally available.
2008-05-12 10:55:55 +00:00
Robert Osfield
db2cf75b23 From Mathias Froehlich, fixed typo 2008-05-12 10:16:40 +00:00
Robert Osfield
dd1a2bcaec From Roland Smeenk, "Small typo and implementation fix for setInitialDrawCallback." 2008-05-08 13:22:52 +00:00
Robert Osfield
14a7b5dd08 Added doxygen comments for attach 2008-05-07 11:59:15 +00:00
Robert Osfield
9e725b438e Updated Version number for 2.4 stable release 2008-04-25 09:46:25 +00:00
Robert Osfield
765a7d2455 From Stephane Lamoliatte, "Here is the fix of a very little typed error in BoundingBox : I replace "doulbe" by "double"." 2008-04-25 09:35:51 +00:00
Robert Osfield
1bd8bb9b00 Updated version number 2.3.11 2008-04-23 20:54:28 +00:00
Robert Osfield
77b98eb5f8 Removed the mutable from the _image variable 2008-04-23 20:49:19 +00:00
Robert Osfield
221b2a3c01 Updated version number for 2.3.10 dev release 2008-04-22 11:47:17 +00:00
Robert Osfield
13173ff680 Updated BufferComponent enum to list COLOR_BUFFERi entries up to 15. 2008-04-18 14:51:21 +00:00
Robert Osfield
196a550cda Added write(ostream&) method to allow one to print out the current state 2008-04-18 13:57:08 +00:00
Robert Osfield
648199cb2b Changed the FrameBufferObject::setAttachment() methods so it now use osg::Camera::BufferComponent
to enable it to distinguish between MRT and non MRT paths
2008-04-18 13:25:14 +00:00
Robert Osfield
c10acfcc47 From Bob Kuehne, "he attached are conversions of the 3 main places i found in osg where tokens are used to represent bitmasks with 'magic' numbers, like 32. i've changed these to a more representative bitshift representation, showing clearly in which bit you can expect this token to manifest. ie, converted things like:
from:            DEEP_COPY_STATESETS         = 8,
to:              DEEP_COPY_STATESETS         = 1<<3,

showing clearly that this isn't the _value_ 8, but the _bit_ 8. this is an old pattern i see (and like to promulgate) to make code a bit more readable and maintainable. 
"
2008-04-16 15:23:12 +00:00
Robert Osfield
3ef40a2301 Updated version number for nex dev release 2008-04-16 15:22:03 +00:00
Robert Osfield
9724303f38 From Art Trevs, moved multile render targets support from RenderStage into FrameBufferObject.
From Robert Osfield, refactored the FrameBufferObejcts::_drawBuffers set up so that its done
within the setAttachment  method to avoid potential threading/execution order issues.
2008-04-15 19:36:40 +00:00
Robert Osfield
b12d209463 Added docs explaining units 2008-04-14 10:38:37 +00:00
Robert Osfield
f85ced09a6 Changed bias parameter to scale 2008-04-12 10:02:28 +00:00
Robert Osfield
e0a780b404 Updated wrappers, and version numbers in prep for next release 2008-04-11 14:43:22 +00:00
Robert Osfield
2a54ff3e4a Introduced CMake build option for compiling double or float versions of osg::BoundingSphere and osg::BoundingBox.
Introduced code in BoundgingSphere, BoundingBox, ProxyNode and LOD to utilise the above settings.

Added Matrix::value_type, Plane::value_type, BoundingSphere::value_type and BoundingBox::value_type command line 
options that report where the types of floats or doubles.
2008-04-03 18:36:50 +00:00
Robert Osfield
3e94d93a66 Changed the Camera::BufferComponent::COLOR_BUFFER0 from being equal to COLOR_BUFFER
to being COLOR_BUFFER+1 to enable differentation between non MRT and MRT paths.
2008-04-02 13:47:45 +00:00
Robert Osfield
73b87274b0 Updated version numbers for 2.3.7 dev release 2008-04-01 10:33:01 +00:00
Robert Osfield
64f8631d9d Added Camera::s/getClearAccum, s/getClearStencil and s/getClearDepth. 2008-03-31 11:44:31 +00:00
Robert Osfield
88ba7cc0d6 Updated version and ChangeLog for 2.3.6 dev release. 2008-03-19 17:10:38 +00:00
Robert Osfield
027b4b0986 Introduced InheritanceMaskActionOnAttributeSetting member to CullSettings, and associated applyMaskAction method that is
now used in all CullSettings::set*() methods, which by default helps disable the inheritance mask associated
with settings that are made locally.
2008-03-19 11:40:08 +00:00
Robert Osfield
1d1dcf2cf3 To osg::AutoTransform added support for MinimumScale, MaximumScale and AutoScaleTransitionWidth parameters
and a new scheme for computing the scaling when using autoscale that introduces smooth
transitions to the scaling of the subgraph so that it looks more natural.
2008-03-18 15:37:38 +00:00
Robert Osfield
7a7c197af3 Added minimum and maximum scale support to osg::AutoTransform 2008-03-17 15:22:03 +00:00
Robert Osfield
457a28d40e Improved the indenting 2008-03-14 11:06:54 +00:00
Robert Osfield
1be388c705 Changed the const get(), operator*() and operator->() methods to return non const T versions 2008-03-14 11:06:35 +00:00
Robert Osfield
292be66ecc Removed gl and glu prefixes from SceneGraphBuilder methods to avoid problems under Solaris 2008-03-13 19:44:10 +00:00
Robert Osfield
f1fe11f5a9 Added double versions of intersect methods 2008-03-13 16:05:40 +00:00
Robert Osfield
1b9cefa10f Added extra constructors 2008-03-12 20:15:45 +00:00
Robert Osfield
c4d07194a2 From Art Trevs, add support for saving external shader files.
From Robert Osfield, adding missing member variable initializes and Output::getShaderFileNameForOutput() implementation
2008-03-04 14:04:48 +00:00
Robert Osfield
f7c33bb2e8 Change the setViewAsLookAt method to use Vec3d rather than Vec3 for better precision 2008-03-04 11:53:09 +00:00
Robert Osfield
d42eee693f Added OSG_EXPORT 2008-03-01 13:40:57 +00:00
Robert Osfield
75d35b6ba1 Fixed typo 2008-03-01 12:50:54 +00:00
Robert Osfield
aa43b3c8a6 Added Camera::g/setIntialDrawCallback and g/setFinalDrawCallback(), and added
screen snapshot example code to osghud.
2008-02-29 15:25:57 +00:00
Robert Osfield
a4a39d32ff From Paul Martz, "Per the discussion in osg-users, this change adds code comments to the Matrix* headers to document assumptions in the getRotate() method." 2008-02-27 11:46:05 +00:00
Robert Osfield
3b4af26136 From Paul Martz, fixed get/set methods API 2008-02-27 11:43:58 +00:00
Robert Osfield
75b9a9c809 From Robert Osfield and Carlo Camporesi, took submission from Carlo for adding LoadingExternalReferenceMode to ProxyNode and extended it
to include a wider range of options, also completed implementation
2008-02-25 15:07:35 +00:00
Robert Osfield
55de8b03d9 From Wojciech Lewandowski, "----1----
Attached is a fixed version of OverlayNode.cpp. I fixed CustomPolytope::cut( osg::Plane ) method.  Bug was apparent in such scenario:
 
Let P1 be some random frustum polytope
Let P2 be the polytope that was created from P1 bounding box (P2 contains P1 entirely)
 
Then ignoring precision errors: P1.cut( P2 ) == P2.cut( P1 ) == P1.  But this condition was not always met. Cut failed when some of the polytope reference points happened to lie exactly on some intersecting planes in both P1 & P2  (plane distance was = 0).
 
I only use CustomPolytope for my shadowing stuff so I did not test how this affects rest of OverlayNode.cpp.
 
----2----
 
Also attached is a minor precision improvement for osg::Plane intersect method (double version). 
 
----3----
 
I have also one observation regarding osg::Plane - There are two intersect vertices methods (float and double flavour):
 
inline int intersect(const std::vector<Vec3>& vertices) const
inline int intersect(const std::vector<Vec3d>& vertices) const
 
I guess osg::Plane won't compile when someone changes default vec3 typedef to vec3d. Shouldn't the first method be changed to use vec3f explicitly ? Ie:
 
inline int intersect(const std::vector<Vec3f>& vertices) const"
2008-02-25 14:15:27 +00:00
Robert Osfield
d003972a5f From Wojciech Lawandowski, "Fixed EllipsoidModel::computeLocalUpVector to use Vec3d instead of Vec3 for
normal computation. Its really small issue, maybe not even worth submitting
;-). But one never knows when inadequate precision hits him.
"
2008-02-25 13:17:30 +00:00
Robert Osfield
3333ca2b46 From Mathias Froehlich, "I have extended the X11 pbuffer code to use either the complete set of glx 1.3
pbuffer functions or exactly ask for the extensions we need to call the
apropriate glx extension functions for and around pbuffers extensions.
The glx 1.3 version of this functios are prefered. If this is not pressent we
are looking for the glx extensions and check for them.
Prevously we just used some mix of the glx 1.3 functions or the extension
functions without making sure that this extension is present.
"
2008-02-22 18:38:30 +00:00
Robert Osfield
67f1503c7d Refactored osgTerrain so that the interface for setting up layer is more straight forward, and added support into GeometryTechnique for handling multiple layers 2008-02-22 11:52:23 +00:00
Robert Osfield
6516bf4910 Added TextureUnit entry to osg::TransferFunction and osgTerrain::Layer 2008-02-20 12:34:13 +00:00