Commit Graph

10609 Commits

Author SHA1 Message Date
Robert Osfield
5d48a68cba From Alexander Wiebel, "Documentation of PrimitiveSet" 2010-08-16 09:35:59 +00:00
Robert Osfield
74a9ccb49d From David Fries, merge from a series of related submission emails:
"enable thread locking in libavcodec

This is required for a multithreaded application using ffmpeg from
another thread."

"Prevent the audio from videos from hanging on exit if they are paused.
The video decoder already has similar logic."

"Add a way to retrieve the creation time for MPEG-4 files."

"fmpeg, improve wait for close logic

Both audio and video destructors have been succesfully using the logic,
if(isRunning())
{
  m_exit = true;
  join();
}
since it was introduced,

but the close routines are using,
m_exit = true;
if(isRunning() && waitForThreadToExit)
{
  while(isRunning()) { OpenThreads::Thread::YieldCurrentThread(); }
}
which not only is it doing an unnecessary busy wait, but it doesn't
guaranteed that the other thread has terminated, just that it has
progressed far enough that OpenThreads has set the thread status as
not running.  Like the destructor set the m_exit after checking
isRunning() to avoid the race condition of not getting to join()
because the thread was running, but isRunning() returns false.

Now that FFmpeg*close is fixed, call it from the destructor as well
to have that code in only one location."
2010-08-09 17:02:31 +00:00
Robert Osfield
b1aedf30e0 Aded option for doing a glFlush() after compiling texture objects, with a dedicated compile thread default to issuing the glFlush. 2010-08-09 16:19:50 +00:00
Robert Osfield
acbaf3962c Cleaned up the inline methods 2010-08-09 16:14:25 +00:00
Robert Osfield
3daa56f2b9 From Stephan Huber, "attached you'll find a small enhancement for GraphicsWindowCocoa, so
osgViewer behaves smarter, when the computer will reboot or shutdown. In
older versions the reboot/shutdown got cancelled by GraphicsWindowCocoa,
now it behaves more system conform.
"
2010-08-08 15:45:25 +00:00
Robert Osfield
534af3aeaf Removed the erroneous subclassing from osg::Observer 2010-08-08 15:44:03 +00:00
Robert Osfield
3c3a34d5f6 From Farshid Lashkari, "This patch simply reduces some messages output in osg::Program from NOTICE to INFO, since they are not important for most users." 2010-08-08 15:34:43 +00:00
Robert Osfield
a21a3af2bd From Cedric Pinson, "I used the lod of the texture manager to track the instance, and it
seems that the number of current active texture is wrong. It's because
of the line in Texture::TextureObjectSet::flushDeletedTextureObjects

_parent->getNumberActiveTextureObjects() += numDeleted;"
2010-08-08 15:32:58 +00:00
Cedric Pinson
d86dab2836 From Rob Smith, makes hardware skinning use of the existing stateset 2010-08-04 08:35:49 +00:00
Robert Osfield
83d56b52b5 From Jan Peciva, "I am sending pov plugin for exporting scene to POV-Ray format.
POV-Ray is photorealistic ray tracer."
2010-07-31 10:33:20 +00:00
Robert Osfield
930f5ab620 From Jeremy Moles, "The version of GCC I use (4.4.3-4ubuntu5) gives the following warning
about the Observer header:

/home/cubicool/local/include/osg/Observer: In copy constructor
?osg::ObserverSet::ObserverSet(const osg::ObserverSet&)?:
/home/cubicool/local/include/osg/Observer:66: warning: base class ?class
osg::Referenced? should be explicitly initialized in the copy
constructor

I've been fixing this by hand by using the attached Observer header; it
does exactly what the warning requests. Purely cosmetic, I believe, but
other than that OSG seems to compile w/ -W -Wall just fine."
2010-07-31 10:22:37 +00:00
Robert Osfield
db010219bc From Farshid Lashkari, "I noticed that some of my applications output the following notification message:
no PixelBufferObject 00000000, 00000000 pbo=00000000

It's kind of annoying since there is nothing actually wrong. The message is generated from TextureRectangle::applyTexImage_subload when it fails to create a pbo, even if the Image object is not even requesting to use a pbo. This message is not generated by all the other code in TextureRectangle.cpp & Texture.cpp that also attempts to create pbo's. I've modified TextureRectangle.cpp to remove this message, so it is at least consistent with the other code."
2010-07-31 10:20:31 +00:00
Robert Osfield
c06f34fe32 From Warren Macchi, "While tracing texture artifacts with the 2.9.8 dev release we
uncovered what looks like a type in the "src\osgPlugins\dae\
daeRMaterials.cpp" file. Line 1094 reads:

                   ^^^
 parameters.filter_min = getFilterMode(sampler->getMagfilter()->
    getValue(), false);

whereas it should read

                   ^^^
 parameters.filter_mag = getFilterMode(sampler->getMagfilter()->
    getValue(), false);
"
2010-07-31 10:18:41 +00:00
Robert Osfield
6798fe4c25 From Brad Christiansen, "To build OSG using Visual Studio 2010 Terrain.cpp requires #include <iterator>. This is a very common fix when using 2010 due to changes in Microsoft STL.
"
2010-07-31 10:17:06 +00:00
Robert Osfield
1379a91fc9 Fixed build 2010-07-31 09:21:50 +00:00
Robert Osfield
34e611a64c From Ryan Kawicki, "I found a memory leak within the Terrex plugin.
Out application has the ability to switch to different types of terrains on the fly.  This problem only exists in this type of situation.

The TXPArchive is held by the ReadWriterTXP class.  When the TXPNode, which is the top level node, is released from memory, the archive associated to that TXPNode is also released.  The issue is that the reference count on the TXPArchive never gets to zero.

The reason why the reference count never gets to zero is because the TXPParse, which is owned by the TXPArchive, stores a ref_ptr to the TXPArchive.  You can then see why this becomes a problem.  The TXPParser's ref_ptr cannot be unreferenced since the TXPArchive has not released the TXPParser.

Since the TXPParser is fully contained within the TXPArchive, I don't see the reason to have the TXPParser have a ref_ptr to the TXPArchive.  I've made this change locally and have had no problems and our memory leak has been fixed.
"
2010-07-31 09:04:18 +00:00
Robert Osfield
4e7d6cab81 From Ryan Kawicki, fixed indentation 2010-07-31 09:03:04 +00:00
Robert Osfield
effd8919ad From Stephan Huber,
"changed the CmakeFiles for OpenThreads and the
osg-frameworks, so they are versioned by OPENSCENEGRAPH_SOVERSION. "

And from a later email:

"Attached you'll find a fixed version of ModulInstall.cmake. Hopefully it
works for old CMake-versions. I removed the offending line, and the
compile went fine on my end."
2010-07-31 08:57:52 +00:00
Robert Osfield
959cfc680f Added output of triangles at problem vertices 2010-07-31 08:56:44 +00:00
Robert Osfield
075b1b769c Beginning of crease angle support for SmoothingVisitor to all it duplicate vertices are creases
thus enabling separate normals for triangles adjacent to the creases.
2010-07-30 19:39:38 +00:00
Robert Osfield
a71877bf2f Changed emit() to emitParticles() to avoid collision with Qt. 2010-07-30 16:06:22 +00:00
Robert Osfield
de955d2ed8 From Wang Rui, fixes to handling of indentation. 2010-07-29 16:09:49 +00:00
Robert Osfield
9296391f1e Added bevel geometry 2010-07-26 11:12:45 +00:00
Robert Osfield
63ea6ae979 Clean up boudnary code 2010-07-26 11:06:45 +00:00
Robert Osfield
5d163b8248 Added a os<<std::endl; to work around a problem with the ascii serializers doing a negative seek that eats characters 2010-07-26 08:41:05 +00:00
Michael PLATINGS
90ec036c0e From Sukender: polygon tessellation 2010-07-21 17:34:28 +00:00
Robert Osfield
35fbe3ffb4 Implemented boundary polygon creation based on the refined boundary segments 2010-07-20 10:46:27 +00:00
Robert Osfield
0290405166 Added boundary bisector computation, bisector intersection thickness and segment removal. 2010-07-19 20:34:15 +00:00
Robert Osfield
41157e4dd8 Added computeIntersectionPoint and computeBisectorNormal functions 2010-07-17 12:03:17 +00:00
Robert Osfield
f2de3468ef Added handling of duplicate vertices 2010-07-15 11:32:31 +00:00
Robert Osfield
18ad93b7cd Fixed duplicate vertices in Font3D outline generation 2010-07-15 11:31:07 +00:00
Robert Osfield
777763bc55 Added raw primitive and vertex data into the osgText::Font3D and FreeTypePlugin to aid development of new 3D text functionality.
Added new test for original 3D text support and new experimental code for exploring approaches to new 3D text support.
2010-07-14 18:50:41 +00:00
Robert Osfield
00f004fc38 From Mathias Froehlich, "I have now put together what I have for the order independent transparency or
short oit. This rendering technique is also known as depth peeling.

Attached is the example that makes depth peeling work with the fixed function
pipeline. Ok, this is 'old fashioned' but required for our use case that
still has to work on older UNIX OpenGL implementations as well as together
with a whole existing application making use of the fixed function pipeline.
I can imagine to add support for shaders when we have that shader composition
framework where we can add a second depth test in a generic way.

This does *not* implement the dual depth peeling described in a paper from the
ETH Zurich.

This example could serve as a test case for the feature that you can on the
fly remove pre render cameras that you made work a few time ago.
It is also a test case for the new TraversalOrderBin that is used to composite
the depth layers in the correct blend order.
This example also stresses your new texture object cache since you can change
some parameters for the oit implementation at runtime.

You can just load any model with osgoit and see how it works.
Use the usual help key to see what you can change.

There is already an osgdepthpeeling example that I could not really make sense
of up to now. So I just made something new without touching what I do not
understand."
2010-07-12 11:30:15 +00:00
Robert Osfield
64b26ebeb5 Added debug State::print(std::ostream&) method and extra debug messages in ShaderComposer and ShaderAttribute.
Added better shader composition testing in the osgshadercomposition example.
2010-07-10 17:14:59 +00:00
Robert Osfield
d45cb5f7a1 From Pierre Bourdin, "just a small typo in debug messages of Viewer.cpp..." 2010-07-10 10:07:59 +00:00
Robert Osfield
f697988586 From Michael Platings, "Autodesk have re-released 2011.3 of the FBX SDK with Visual Studio 2010 support ( http://images.autodesk.com/adsk/files/fbx20113_fbxsdk_win_static.exe ). I've attached an updated FindFBX.cmake that supports this latest version but also retains support for FBX 2011.2 for those who don't want to update." 2010-07-10 09:56:06 +00:00
Robert Osfield
3cd08d7730 From Wang Rui, "I've found a minor bug in the cmake script of src/osgPresentation when testing the osgIntrospection project. It missed the Export header file and thus will not install this file while 'make install'. Add a line to the LIB_PUBLIC_HEADERS variable will fix the issue." 2010-07-08 10:56:34 +00:00
Robert Osfield
bc3578cf16 From Jean-Sebastien Guay and Martin Scheffler, "First are Martin's changes:
* Added support for floating windows and context menus in QMDIAreas.
* Protected the size (_width and _height) by a mutex to prevent threading problems.

Then my own:
* Made sure the embedded widget's size follows the graphicsView's size at all times so that window resizes will resize the widget as expected in fullscreen mode."
2010-07-08 10:51:37 +00:00
Robert Osfield
d50bf88bc0 Added some debugging to investigate issue of global default ShaderAttribute not being automatically assigned. 2010-07-07 11:02:15 +00:00
Robert Osfield
46b221a832 Added compile/release and resize of GL objects to ShaderAttribute.
Removed the StateAttribute::compose() method.

Fixed the default type value in ShaderAttribute
2010-07-06 12:19:26 +00:00
Robert Osfield
74ae526bb5 Added support for passing on uniforms from StateAttribute 2010-07-06 10:55:54 +00:00
Robert Osfield
751b0498fe Added basic code injection fields to osg::Shader,
creation of main shader to ShaderComposer and
collection of ShaderComponent to osg::State.
Also added very basic shader set up in osgshadecomposition example.
2010-07-05 16:32:58 +00:00
Robert Osfield
9f8670f50d Implement basic cache in ShadeComposer 2010-07-02 14:18:59 +00:00
Robert Osfield
a55c4b7d70 Added basic ShaderComponent class and beginnings osgshadercomposition example 2010-07-02 12:04:20 +00:00
Robert Osfield
aef5e36cf1 From Stephan Huber, fixed typo. 2010-06-28 17:27:56 +00:00
Robert Osfield
42a2f2dcf9 Added skipping of newlines in AsciiStreamOperator.h 2010-06-28 09:52:18 +00:00
Robert Osfield
e0d8e0a5c7 From Wang Rui, "A solution for serialziers to call static functions at the end of reading/writing is to use a user serializer. The serialziers/osgManipulator/Draggers.cpp uses a DefaultGeometry serializer to run setupDefaultGeometry() once the reading process is finished, and this can also be applied to load the TerrainTileCallback.
I've attached the modified serializer/osgTerrain/TerrainTile.cpp for tracing and solving current problem."
2010-06-28 08:27:30 +00:00
Robert Osfield
9d9a36f6af From Brad Christiansen, "The small change I have made (against this morning's trunk) enables subclasses to register and unregister windows via protected methods. I need this access as I have a subclass that handles some of the oddities of mixing a native OpenGL window with Java's windowing system. I doubt there will be much general benefit of the modification but it should also not be harmful in any way to others." 2010-06-28 08:24:53 +00:00
Robert Osfield
fec23cb098 From Torben Dannhauer, "I have extended the attached zipped file to recognize some more filenames and versions.
I added support to find libxml2 in the 3rdparty package if available.

Now this file can find all libraries from the 32/64bit VS2008sp1 dependency package except collada. I will add that later.
"
2010-06-28 08:20:59 +00:00
Robert Osfield
0119eec3fe Checked in missing source file. 2010-06-26 09:55:18 +00:00