It solves the problem on XP and Win7 on Qt 4.5 and 4.62
It isn't necessary on Linux (ubuntu 8.10/9.04 Qt 4.5/4.6.2) but doesn't cause any harm.
But I have #ifdef'ed it with WIN32. I can't test it on 64bit windows (not sure if x64 defines WIN32?)"
up vector to setViewMatrixAsLookAt(..) codes in osgShadow. This will addresses previous issues that occured when look vectors
co-incided with the hard coded up vectors.
Fixes in StandardShadowMap.cpp & MinimalShadowMap.cpp were made for spotlight issues. There were cases when further located spotlights were not shadowing properly.
Small tweak in DebugShadowMap & StandardShadowMap.cpp to not limit shadow maps to texture2D (which should also allow texture2D arrays and cube maps). I simply replaced ptr to osg::Texture2D with pointer to osg::Texture. Interpretation of this member could be now changed with change of shaders in derived classes. This may be useful for guys who override LispSM or MinimalBoundsShadowMaps techniques. Could be useful for implementation of PerspectiveCascadedShadowMaps technique for example.
ConvexPolyhedron.cpp & DebugShadowMap.cpp contain debug HUD tweaks.
Change in ConvexPolyhedron.cpp overcomes the regression problem with color per primitive binding which caused that shadow volume outlines stopped to draw. I simply changed PER_PRIMITIVE to PER_PRIMITIVE_SET and it works again.
Other adition is dump method I added to DebugShadowMap which can be used in shadow debugging mode to dump current frame shadow volumes & scene to osg file. It could be then loaded into viewer and freely examined from different angles (which is difficult inside the application if shadow adopts to view and projection). "
options->setPluginStringData("captureVideoDevice", "0");
Lines added in getDevice() are:
int deviceId = atoi(name.c_str());
if(deviceId >= 0 && deviceId < (int)_listDevice.size())
return _listDevice[deviceId];
This makes it easy to use a capture device without knowing it's name. Attached is the whole file against rev 11044"
osgAnimation. It's been tested with the majority of the samples in the
COLLADA test repository and works with all of them either as well as, or
better than, the version of the plugin currently in SVN.
Known issue: vertex animation (AKA morphing) doesn't work at present,
but that's a relatively unpopular method of animating so it's not high
on my priority list."
Follow up email:
"I've been informed that the previous DAE submission didn't build on
unix, so here's the submission again with the fixes. Thanks to Gregory Potdevin and Benjamin Bozou.
Also, my apologies to Roland for not crediting his part in making DAE
animation happen, my work was indeed built on top of his work. Thanks
also to Marius Heise and of course Cedric Pinson."
Changes by Robert Osfield, fixed compile issues when compile without C* automatic conversion enabled in ref_ptr<>
and constructor initialization fixes to address some warnings under gcc.
* Change OcclusionQueryNode::getPassed to take a NodeVisitor rather than the distance from BS center to the eye point. Change where CullVisitor calls this method to use the new parameters.
* getPassed now exits early and returns true to avoid blinking / blink-in of geometry for the first frame or for out-of-range LOD children coming back into view.
* getPassed now considers the distance from the near plane to the bounding sphere (rather than eye point to bounding sphere) when determining if the viewer is "inside" the bounding sphere or not."
The fix is basically as follows:
if( GL3 )
Query indexed extension strings.
else
Query the old way.
The "else" branch is re-indented but otherwise shouldn't contain any changes."
From Robert Osfield, added #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) to new block to prevent it
being compiled under GLES where no glGetStringi exists.
The fix is basically as follows:
if( GL3 )
Query indexed extension strings.
else
Query the old way.
The "else" branch is re-indented but otherwise shouldn't contain any changes."
png_set_expand_gray_1_2_4_to_8() with the 1.2.9 release. This
submission fixes builds of the OSG against versions of libpng < 1.2.9
that don't have the new symbol available. This affects platforms like
Red Hat Enterprise Linux 4 which come with libpng 1.2.7."
Text and Text3D:
1. A new line should be started after a line's last hyphen or before
its last whitespace.
2. If no suitable place to break a line is found, just start new line
after the last character that fits on the line.
3. Whitespace should be removed from the beginning of the new line
(already worked in Text, but not in Text3D).
Line wrapping looks a lot better now with no more lone periods
appearing at the beginning of lines.
Also, right-justified text is more accurate now (slashes would hang
off the end of lines before). With this new code I spotted one
instance where a hyphen stuck out too far, but in general it looks
better. Centered text was not perfect before and still isn't, but I
can't see any significant increase or decrease in quality. The casual
observer would probably never notice a problem.
Also fixed a whitespace problem in Text3D. Not all whitespace was
being removed from the beginning of lines. Now it is all being
removed in the same manner as in Text."
To reproduce, on win32:
-Run osgViewer in a windowed mode, with the cursor off, as such:
osgViewer::Viewer::Windows windows;
viewer.getWindows(windows);
for(osgViewer::Viewer::Windows::iterator itr = windows.begin();
itr != windows.end();
++itr)
{
(*itr)->useCursor( false );
}
-Quickly move the cursor into the window (cursor it should be hidden)
-Resize the window by dragging the border (notice the cursor changes to "resize" cursor)
-Move the cursor back to the inside of the window (notice the cursor is not hidden anymore)
The attached SVN patch will set the cursor to a "NoCursor" during useCursor(false). This correctly stores the no cursor state, so it can be rejuvenated after a future cursor change. This patch also fixes a couple instances where a hidden cursor should show itself, like when it's on the title bar, or the window close button."
of OSG. I modified the osgDB::InputStream and OutputStream and the
PagedLOD wrapper as well. Now all seems to work fine with paged
scenes. I've tested with the puget terrain data and the osgdem
application from VPB:
# osgdem --xx 10 --yy 10 -t ps_texture_4k.tif --xx 10 --yy 10 -d
ps_height_4k.tif -l 8 -v 0.1 -o puget.osgb
As the ive plugin does, The PagedLOD wrapper now automatically add the
latest file path to PagedLODs' databasePath member, to help them find
correct child positions. I also changed the image storage strategy of
the OutputStream class, to store them inline by default. The osgt
extension should also work, in case the image files are also written
to the disk.
"
I create a compositeviewer with two views that share a context. One view is deleted. Texture::TextureObjectSet::discardAllTextureObjects is called, but this does not reset _tail. Now the texture object is again created and addToBack is called from Texture::TextureObjectSet::takeOrGenerate. In addToBack (line 612) _tail is now not 0 (although the list should be empty) and a loop is created from the texture object to itself. Then when the second view is deleted, Texture::TextureObjectSet::deleteAllTextureObjects loops forever. Setting _tail to 0 fixes it for me (see attached)."