of an osgWidget::Label with an osgText::String. I had to do this on a
project I'm working on, because I needed UTF-8 strings on my labels,
and using setLabel with std::string was not working.
"
checking _gl_get_query_objectuiv_arb which is a different function
pointer. Changed to check the function being called.
This is against the subversion trunk."
I attach a modified ReaderWriterZIP.cpp (based on version 2.9.5 revision 10374).
This includes a little bit of code tidying, but the only functional change is a test of the return value of OpenZip and the addition of a call to CloseZip."
It adds new PrimitiveSet constants for the specific geometry shader primitive types :
- LINES_ADJACENCY
- LINE_STRIP_ADJACENCY
- TRIANGLES_ADJACENCY
- TRIANGLE_STRIP_ADJACENCY
It also adds some missing features to the glsl reader plug'in.
"
The Texture Pool can be enabled by setting the env var OSG_TEXTURE_POOL_SIZE=size_in_bytes.
Note, setting a size of 1 will result in the TexturePool allocating the minimum number of
textures it can without having to reuse TextureObjects from within the same frame.
Finally, I have fixed TemplateTarget<osg::Quat>::lerp() as it was giving incorrect results when interpolating between some small rotations.
From Cedric Pinson, i renamed the method in channel to be more general. Adjusted the CubicBezier key constructor to use a single value as input.
Update Timeline.cpp to add current layer to the ActionVisitor, use correctly the priority
Add accessors in Action.cpp to retrieve protected data
Split files and rename them to classname
Change de default color of UpdateMaterial to FFOOFF to detect unset value
Add accessors in LinkVisitor instead of accessing data directly
Update osganimationtimeline example to fit the api callback
- Animations with equal priority are now weighted correctly relative to each other
- (minor) Channels no longer store their weight as the only time it's used is in update() when Animation can pass in the weight directly
From Cedric Pinson,
- I adjusted the quaternion blending to keep the commutativy property
Note from Robert Osfield, I've temporarily re-enabled the old focing of of color and depth attachment to avoid regressions on some OpenGL driver. We'll revist this once
we have a mechanism for controlling this override at runtime.
#define FORCE_COLOR_ATTACHMENT 1
#define FORCE_DEPTH_ATTACHMENT 1
associated <stdlib.h> header. This breaks the build on my Solaris setup.
Rather than adding the missing <stdlib.h> include, I have changed the
atof() calls to osg::asciiToDouble(). This is the same as was done
throughout the other plugins recently, for locale independance.
I've attached updates to the svn trunk, the fix is also appropriate for
the 2.8.* branch."
dragger="box" or dragger="trackball"
and
technique="light" or technique="isosurface" or technique="iso" or technique="mip"
and
tf="transferfunctionfile.tf"
i.e.
<volume dragger="box">CardiacCT</volume>
<volume tf="colour.tf">CardiacCT</volume>
<volume technique="isosurface">CardiacCT</volume>
Note that this technique will require ARB_texture_env_crossbar (or NV_texture_env_combine4), as it mixes two textures in the first texture unit, and just does the lighting in the second. I doubt this will be a problem for any card that can already handle GLSL programs, though."
panning for left-right drags, but was zooming for up-down drags. I
changed it to pan both directions as I believe that is the correct
behaviour. If the original combination pan-zoom behaviour was
intentional, please let me know."
behind osgText::Text. I made it so the box would get drawn using
whichever BackdropImplementation was selected. However, I did not
implement STENCIL_BUFFER. In that case it defaults to drawing the
bounding box using POLYGON_OFFSET instead.
Also made it so the BOUNDINGBOX and FILLEDBOUNDINGBOX are drawn with a
settable color and margin size.
While I was at it I tightened up the values applied with DEPTH_RANGE
and POLYGON_OFFSET, not just for drawing the bounding box but also for
drawing backdrop text (these values must be coupled since the bounding
box has to be drawn deeper in Z than the backdrop text). The values
in use before seemed like overkill and I was seeing some z-clipping
with my background scenery in the case of DEPTH_RANGE. If there was a
good reason for the large values please let me know...."
even if they have had DataVariance DYNAMIC explicitly specified. Then
when an application attempts to dynamically update the geometry in the
frame loop the primitive sets and data arrays are no longer as
expected, leading to display and/or memory corruption.
Attached is a simple fix. "
Note from Robert Osfield, tweaked Colin's changes to that it use != DYNAMIC as the the test rather than == STATIC.
When using more than one view logosCullCallback function is called without checking context ID from the cull visitor is equal to logo _contextID variable. It involves updating logo's viewport with different sizes.
So I made a fix well working, at least the way I use the plugin."
Note, from Robert Osfield, changed code to return true to signal culling of logo when being applied to a window that it wasn't assigned to.
while in an else clause. When if is true the phase changes and the
while condition will always by false, so might as well put the while
in the else to skip the check. There's also a benefit to having the
code logic similar between platforms.
"
Barrier operations. The error is with atomic operations in the
win32 condition implementation. The attached sample program will
reliably trigger with as few as three threads and a dual core system,
though sometimes it will take 65,000 iterations.
2.8.1 was the base for these changes
Win32ConditionPrivateData.h
Win32ConditionPrivateData::wait does two operations to decrement
waiters_ then read, when InterlockedDecrement decrements and returns
the value in one operation. The two operations allows another thread
to also decrement with both getting 0 for an answer.
Win32ConditionPrivateData::broadcast is using waiters_ directly
instead of using the w value read earlier, if it was safe to use
waiters_ directly there would be no need for InterlockedGet or w.
overview of deadlock in barrier with three threads
one thread in broadcast, 2 threads in wait,
release semaphore 2, waits on waiters_done_
both threads wake, decrement waiters_, get 0 for w,
<logic error here>
one calls set waiters_done_,
broadcast thread comes out of waiters_done_,
other thread calls waiters_done_, (which leaves waiters_done_ in the
signaled state)
<sets the trap>
broadcast thread returns releases mutex, other threads get
mutex and also return,
next barrier, first two threads enter wait, one goes to broadcast, release
semaphore 2, skips waiters_done_ as it had been released last time
returns, processes, enters the barrier for the next barrier operation
and waits,
three threads are now in wait, two have the previous barrier phase,
one the current phase, there's one count left in the semaphore which a
thread gets, returns, enters the barrier as a waiter, sleeps, and the
deadlock is completed"
GraphicsWindowCocoa-implementation, which enhances multithreaded
stability, it ensures that modifications to the size of an openglcontext
is done only from one thread.
"
Selection is now just a typedef of osg::MatrixTransform, and is deprecated
CommandManager is shell class that just sets values directly on Dragger, and is deprecated
Dragger now has list of DraggerCallback that takes over the roll of tracking changes to the Dragger, and
allows users to track the dragger in any way they wish.
Dragger now has a convinience method making MatrixTransforms track a dragger.
Selection and CommandManager are no longer required for use of osgManipulator and are kept around for backwards compatibility.
dependent on the complexity of the geometry. For complex scenes this
meant that it looked like you were "throwing" the display into molasses.
For simple geometry things get over-excited once thrown.
The fix is to factor in the frame rendering time to the caluclated
motion. I've implemented this for rotation and panning.
Now when things are thrown they maintain a rate very close to what was
happening when the mouse button was released."
Therefore I have changed all the occurances of atof by asciiToFloat or
asciiToDouble.
I believe that it is safe to do so at least for all the plugins.
Included here are also asciiToFloat conversion of environment variables. One
might argue that these should be locale dependent. But IMO these should be
set and interpreted by osg independent of the current locale.
"
I found that changing the alignment of a text object does not work properly if the text contains newline characters. I've attached a simple test case that shows the problem. If I set the text AFTER setting the alignment, everything works fine. But if I set the text BEFORE setting the alignment then the text is displayed incorrectly.
The fix is very simple. Instead of calling computePositions() in TextBase::setAlignment(), it calls computeGlyphRepresentation(). I've attached the modified TextBase.cpp."
f 15939/9999/16177 15941/10000/16178 15940/10001/16179\
15938/10002/16180
In the OBJ loader the newline would be interpreted as follows
f 15939/9999/16177 15941/10000/16178 15940/10001/1617915938/10002/16180
However, for correctly loading the model it should be interpreted as
f 15939/9999/16177 15941/10000/16178 15940/10001/16179 15938/10002/16180
Thus, the escaped newline should be interpreted as a space.
I tried to lookup what the correct interpretation for a backslash-newline was in the OBJ spec but did not find anything useful. Nevertheless, my suggestion would be to adopt replacing the escaped newline by a space in order to avoid problems as stated above. I cannot imagine a meaningful usage of a newline within a numerical literal so I do not foresee cases where replacing a backslash-newline by a space would be harmful. The fixed obj.cpp is zipped and attached to this mail."
- osg::Texture sets GL_MAX_TEXTURE_LEVEL if image uses fewer mipmaps than
number from computeNumberOfMipmaps (and it works!)
- DDS fix to read only available mipmaps
- DDS fixes to read / save 3D textures with mipmaps ( packing == 1 is
required)
- Few cosmetic DDS modifications and comments to make code cleaner (I hope)
Added _isTextureMaxLevelSupported variable to texture extensions. It
could be removed if OSG requires OpenGL version 1.2 by default.
Added simple ComputeImageSizeInBytes function in DDSReaderWrites. In
my opinion it would be better if similar static method was defined for
Image. Then it could be used not only in DDS but other modules as well (I
noticed that Texture/Texture2D do similar computations).
Also attached is an example test.osg model with DDS without last mipmaps to
demonstrate the problem. When loaded into Viewer with current code and moved
far away, so that cube occupies 4 pixels, cube becomes red due to the issue
I described in earlier post. When you patch DDS reader writer with attched
code but no osg::Texture yet, cube becomes blank (at least on my
Windows/NVidia) When you also merge osg::Texture patch cube will look right
and mipmaps will be correct."
"The dragger's corner tabs are no longer in the corners."
this fix places the cornertabs back in the corners.
(the manipulator does not make sense otherwise)."
platform:
1 - osgAnimation/StatsHandler includes <cmath>, but on Cygwin only std::isnan
is defined that way. I changed it to <math.h> as it is done in the rest of
the OSG.
2 - Pulling some osgViewer headers from the same file in osgAnimation makes
the former a new dependency. Thus, I got errors at osgAnimation linking time.
I wonder why nobody noticed this on other platforms. I have updated the
CMakeLists.txt file in order to link to the needed libraries, and
3 - I have updated the openscenegraph-osgAnimation.pc.in file accordingly."
database options like recently added to PagedLOD.
Also there is a change to the traverse method:
The previous ProxyNode checks the VisitorType to be a CULL_VISITOR and the
presence of a request handler to submit a database request.
In contrast to that PagedLOD uses the request handler if it is there - even if
the visitor type is not a cull visitor.
The change removes the cull visitor test from the ProxyNode so that it behaves
like the PagedLOD.
I believe that the presence of a request handler in a visitor might be
sufficient to trigger the requests as this is done in the PagedLOD anyway.
Based on rev 10332."
proper functioning when running the osgViewer run-loop in a secondary
thread (e.g. when embedding GraphicsWindowCocoa-windows in a full blown
cocoa application).
OS X is picky when you want to change the user-interface from another
thread than the main thread, not all UI stuff is thread-safe. So now
window closes and showing / hiding the menu bar is done in the main
thread via Cocoa's performSelectorOnMainThread-mechanism.
These changes don't affect the normal osgViewer usage pattern."
Those two additional options can now be set using the Options::setOptionsString() function (just like the already existing OSG_CURL_PROXY & OSG_CURL_PROXYPORT options).
This is a convient solution to limit the freezing effect one may face in case the targeted server is down or too slow.
I successfully compiled and used this updated version on Windows in my application.
And by default those settings are not set (so no change in the behavior if you don't need them).
"