Commit Graph

1405 Commits

Author SHA1 Message Date
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