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).
"
First Submission email from Gustav:
"This submission adds a --cache option to osgconv and osgviewer that enables setObjectCacheHint(osgDB::Options::CACHE_ALL); It greatly reduces memory usage when a .osg file has lots of external references with ProxyNode:s that points to the same file.
Options are also added to the osg plugin. The code was already mostly implemented but there was no way to change the options.
includeExternalReferences
writeExternalReferenceFiles
A counter is added to keep track if an external file has already been written down to avoid writing the same file over and over again. If it has already been written once then it is not written again.
The counter is added to the Output class in osgDB.
"
Second Submission email from Gustav:
"This is a continuation to my previous submission.
I noticed that the same problem that I fixed in ProxyNode.cpp for the osg plugin (external files being written over and over again) also existed in the ive plugin. I attached a submission where the ive plugin remembers which external files that have already been written and do not write them again."
Changes to the above done by Robert Osfield,
changed command line parameter to --enable-object-cache
changed set/get methods in osgDB::Output and ive/DataOutputStream.cpp to be s/getExternalFileWritten(const std::string&)
cleaned up set up of osgDB::Options.
At the moment it outputs DXF for whatever geometry is contained in the node it would be nice to draw the model as it is rendered (points/lines/surface)
If people could also test against other apps that need to read DXF, the format is a bit of a black art and not all importers support all features so it might need some options to tweak the output.
It has some rather clever colour lookup stuff to match real colours against the limited DXF palette. I cracked the code of the Autocad indexed colours!"
GL_EXT_framebuffer_blit extension is available. This is due to the early
return from the constructor if this is missing.
As far as I read the standard extension documents, this blit call is not
required to have packed depth stencil fbos.
The change fixes this and allows packed stencil attachments on machines
without the multisample blit command."
of these methods in src/osgViewer/Renderer.cpp to make sure that the draw thread keeps references to all in scene graph Cameras
that are being used by the drawing threads, to keep the Camera's alive even when the main thread removes these Cameras from the scene graph.
1. I've implemented an option controlled route by which users can still access the old method of extracting the zip content to the local filesystem. This is in response to Ulrich's comments about zip files encorporating files other than those that OSG knows about, but which an application may require.
To access this the user makes the following call on their options object that they pass to the reader. Without it, the plugin will extract by default to memory.
local_opt->setPluginStrData("zipextract","filesystem");
2. The second change is that I've moved the declaration of one of the variables to within the numitems loop so that if loading of a specific file within the zip fails, subsequent files still load correctly. This was the issue that Ulrich raised."
constructor issues:
Within the NullStream & NotifyStream classes the base class objects
(ostream) were being initialised before the class member _buffer objects
which they referenced, causing a crash.
I had to move the file scope g_NullStream & g_NotifyStream initialisation
into a function to get them to work.
Also there was a missing osg:: qualifier on getNotifyHandler."
-Changed the addition of lights to add the lightsource directly into the scenegraph (instead of below a switch node)
-All added lights are enabled in the root stateset and replace the head- or skylight.
(if no lights are available the head- or skylight will remain active)
-Ambient in osg::LightModel is zeroed out. All ambient now comes from separate ambient only light sources.
-Lights can now be written properly
-Replaced strings by constants defined in the Collada DOM"
The fix is to remove the call to bs.expandBy(v) and compute the radius directly. I believe this call was intended to be bs.expandRadiusBy(v), but it is superfluous when the radius is computed directly."
Two implementations of NotifyHandler are currently available:
- StandardNotifyHandler, calls fputs(message, stderr) for severity <= WARN and fputs(message, stdout) for severity > WARN
- WinDebugNotifyHandler, windows users can redirect notifications to windows debug output, notifications can be viewed in output window of the debugger i.e. MSVC or DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) (see screenshot).
I have seen on osg-users that some people do std::cerr.rdbuf(otherStream.rdbuf()) to redirect notifications. This trick will no longer work since osg::notify() returns internal osg::NotifyStream not std::cout or std::cerr. You can use osg::notify().rdbuf(otherStream.rdbuf()) to do this instead.
Additionally I've made some minor fixes:
- Minor imrovements to osg::notify documentation
- NullStream could crash by deleting stream buffer other than default NullStreamBuffer in the destructor i.e. after osg::notify(osg::DEBUG_FP).rdbuf(otherStream.rdbuf())"
Windows doesn't define F_OK and access() is in io.h, rather than stdio.h
These are fixed in FileUtils.cpp, so I copied the fix from there - might be better to move this to FileUtils header and include it here and in FileUtils.cpp?"
implementation of GraoicsWindowCocoa:
Enhancements/Bugfixes:
+ now it's possible to integrate osgViewer better into existing
cocoa-applications:
* create one or more NSOpenGLView(s) and add these to your window(s)
* create one or more NSWindows
* disable the integrated event-polling of osgViewer, and let the work be
done by Cocoa / NSApplicationRun. You'll have to run the osgViewer's
runloop in a separate thread
+ missing menu-event-handling implemented
+ added NSAutoReleasePools where necessary, this fixes some memory-leaks
+ fixed some crashes and thread-issues"
_beginthreadex() fails but OpenThreads still waits on the startup
Block before returning to the caller of OpenThreads::Thread::start().
This causes a deadlock. The return value of _beginthreadex() is
actually checked, but after the call to OpenThreads::Block::block() so
it is basically useless.
Attached is a fix to move the check for the return value of
_beginthreadex() before the call to block(), so that start() can
return to the caller with a non-zero error code. This solves the
problem for me."
Introduced a new callback osgDB::FindFileCallback that overrides the default behavior of findDataFile/findLibraryFile.
Introduced support for assigning ReaderWriter::Options directory to PagedLOD.
Introduced new osgDB::FileLocationCallback for assistancing the DatabasePager to know when a file is hosted on a local or remote file system.
Introduced a new FindFileCallback to Registry to compliement the existing ReadFileCallback and WriteFileCallback.
Added support for assign Find, Read and WriteFileCallbacks to osdDB::Options to enable plugins/applications to override the callbacks just for that
read/write call and any nested file operations
Original email from Frederic at start of thread:
"he patch attached, made from r10068, fix two things, in other of importance :
- the selected cursor is never shown ( second change in file ). Only the left arrow is always displayed.
- remove the arbitrary ( in my sense ) limitation that the user cannot choose a cursor with the same shape that one used when resizing the window. This limitation doesn't exist for X11, and we have a diverging behaviour there ( first change in file ). Flightgear use the LeftRightCursor in look around mode."
Follow up email from Frederic (with changes that finally made it into this check in:
"I've just tested Mark's suggestion and it works perfectly, even when the
cursor goes to the border then come back inside the window.
But his patch doesn't seem to be based on the last revision of the
files, or at least not on the trunk, and there are more changes than
expected in them, including some loss from the previous patches.
The patch attached is based on r10068 of
src/osgViewer/GraphicsWindowWin32.cpp and r10067 of
include/osgViewer/api/Win32/GraphicsWindowWin32"
the conditional directives for setting the prepend-string in
createLibraryNameForExtension were not in effect, because of the mixture
of different #ifdef styles.
I removed the conditional part for __APPLE__ completely to be more
standard-conform with other platforms (plugins should be located in
osgPlugins-X.X.X/). Because of the wrong syntax of the conditional
compile the old code was not used anyway -- so no functional change.
"
So, might be a bit fiddly to try and prevent frame update in all situations that SwapBuffers retuns false.
I wondered if we could address this issue by only reporting the error if GetLastError is also non zero. Works for me!
The value returned by GetLastError is zero when SwapBuffers is called for a minimized or off screen window, so we could just add a check for this.
Just say the word, and I'll post my modified GraphicsWindowWin32.cpp to the submissions list. ;-)
Cheers.
Chris.
e.g.
//------------- OSG- 2..8 ----------
void GraphicsWindowWin32::swapBuffersImplementation()
{
if (!_realized) return;
if (!::SwapBuffers(_hdc))
{
reportErrorForScreen("GraphicsWindowWin32::swapBuffersImplementation() - Unable to swap display buffers", _traits->screenNum, ::GetLastError());
}
}
//------------- Modification to remove redundant warnings ----------
void GraphicsWindowWin32::swapBuffersImplementation()
{
if (!_realized) return;
if (!::SwapBuffers(_hdc) && ::GetLastError() != 0)
{
reportErrorForScreen("GraphicsWindowWin32::swapBuffersImplementation() - Unable to swap display buffers", _traits->screenNum, ::GetLastError());
}
}
"
"the latest SVN revision cannot be build under Windows if ?OSG_USE_UTF8_FILENAME? config option is enabled. The error occurs in ?FileUtils.cpp? file, line 663, since there is no UNICODE-capable version of the ?GetProcAddress? function. The ?OSGDB_WINDOWS_FUNCT_STRING? makro is defined as follows in that case
#define OSGDB_WINDOWS_FUNCT_STRING(x) L ## #x L"W"
Thus the second parameter cannot be converted from wchar_t to LPCSTR. Should we convert the second parameter from wchar_t* to LPCSTR or use the same definition for the ?OSGDB_WINDOWS_FUNCT_STRING? makro in both cases?
The second error occurs in the same file, line 669. The second parameter for the ?pGetModuleHandleEx? function should be defined as wchar_t, but it?s defined as ?static char static_variable? in the line 667."
Converted Present3D across from using libxml2 to using the new osgDB::XmlNode/XmlNode::Input classes from Xml Parsing.
This changes removes the dependency on libxml2, and allows the present3D application and p3d to work on all platforms.
This fix reverses the vertex order and sets up proper OpenGL facing. I didn't notice this problem until I started using the plug-in in my own code (osgviewer seems to not enable backface culling)."
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg23734.html
The change is source compatible with current osg code and will not affect current users, it simply adds an additional parameter to the GraphicsWindowWin32::WindowData struct constructor and defaults to the current behavior.
Attached are the files "include/osgViewer/api/Win32/GraphicsWindowWin32" and "src/osgViewer/GraphicsWindowWin32.cpp" with my changes, based on svn revision 10045. In addition, I have provided an svn patch file with the same changes for your convenience.
I have discussed the matter with my supervisor, and agreed that my company makes no copyright claim over this extremely trivial change (or to put it another way, we assign copyright to the open scene graph community.)"
"Attached is the osg-plugin for reading ply ( Stanford Triangle Format ) file. I have written the plugin according to OSG standard and have also added cmake build system. The plugin is working fine on both Linux and Windows and should behave similarly on other OS as well."
"I developed this plugin while working on a project based on Equalizer. So VertexData which I am using is taken from equalizer and modified to make them work as separate OSG plugin.
Before contributing this plugin to OSG community, I asked project manager of Equalizer project Stefen regarding potential licensing issues and this is what he has said
"The kd-Tree (VertexBuffer*) is LGPL-licensed, and the base ply loader (ply*) is BSD. As long as you leave the copyright notices intact, there is no issue."
so I think using these files in OSG should not be a problem.
As far as author of ReaderWriterPLY.cpp is concerned I am the author. I am working for Darshan3d which is a subsidiary of VizExperts thats why I have put VizExperts copyright."
From Robert Osfield, refactor of the above code to retain a bit more of the original funcionality, and to avoid the need to hand maintained XCode projects from being updated.
I have attached a fixed file where the traits are checked in the PrimitiveShapeFunctor where appropriate. They are checked for Box, Cone Capsule and Cylinder. These just mirror the checks that were already done in the DrawShapeVisitor.
(another instance where if the ShapeDrawable had just been osg::Geometry, there wouldn't have been a problem... :-) )
I also fixed a small typo in the file in two places ("implementated" --> "implemented")."
TrackballManipulator. The purpose of this is to disable throwing when
you release the mouse button while moving the mouse. The default
settings is true (ie, allow throw). The two source files are attached.
"
(http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg23098.html)
Background: when you access a file over HTTP, you cannot rely on a file extension being present; instead the file's mime-type is conveyed in the HTTP Content-Type response header. This facility adds a mime-type-to-extension map to the registry to handle this.
There are two new osgDB::Registry functions which are pretty self-explanatory:
void addMimeTypeExtensionMapping( mime-type, extension )
ReaderWriter* getReaderWriterForMimeType( mime-type )
I also added the file osgDB/MimeTypes.cpp which houses a hard-coded list of built-in types. I took the list from here (http://www.webmaster-toolkit.com/mime-types.shtml) and then pared it down to include mostly image and video types, editing them to map to existing plugins where possible.
In addition, I updated the CURL plugin to a) install a set of built-in mime-type mappings, and b) use them to look up an extension in the event that the target filename does not have an extension.
Here is a test case. This URL pulls down a JPEG (without a file extension):
osgviewer --image "http://us.maps3.yimg.com/aerial.maps.yimg.com/ximg?v=1.8&s=256&t=a&r=1&x=0&y=0&z=2"
"
The osgViewer::CompositeViewer had partial support for Producer Camera
config files, but it was not working completely. Here is the completed
implementation. File: src/osgViewer/CompositeViewer.cpp.
"
linked with system libraries using LINK_INTERNAL instead of
LINK_EXTERNAL. This caused it to try to link with libXrandrd instead of
libXrandr, which failed. Attached is the fixed CMakeLists.txt."
It adds two options:
Accuracy(x) - ensures the polyline will be within x units from the ideal arc/curve
ImproveAccuracyOnly - do not use the given accuracy 'x', if it would result in a worse curve than with the previous (2.8.0) implementation for a particular arc/curve.
As an added bonus there was a small bug in the existing implementation whereby the primitives were line strips but the vertices generated were actually suitable for GL_LINES, so the improved accuracy doesn't even have to come at a performance cost :-)"
-Added copying of shaders and attributes in osg::Program copy constructor.
-Changed StateSet::compare function to compare Uniforms and their
override values. Previously it compared a RefUniformPair."
The problem is in SpatializeGroupsVisitor::divide(osg::Geode*, unsigned int) where the code creates a new Group and divides up the input Geode into one Geode per Drawable.
I fixed the problem by assigning the Geode's stateset to the new parent group.
To replicate the bug, see attached osg/dds files:
osgviewer b.osg -- model renders correctly
set OSG_OPTIMIZER="SPATIALIZE_GROUPS"
osgviewer b.osg -- textures are missing."
to make is easier to write code that can work on DrawElementUByte, UShort or UInt.
Changed the osgTerrain::GeometryTechnique so that it automatically chooses
the use of DrawElementUShort or DrawElementsUInt accordining to the size of the tile.
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function \u2018int osgFFmpeg::FFmpegDecoderVideo::convert(AVPicture*, int, AVPicture*, int, int, int)\u2019:
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error: invalid conversion from \u2018int\u2019 to \u2018PixelFormat\u2019
/Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:245: error: initializing argument 3 of \u2018SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)\u2019
It expects 'src_pix_fmt' and 'dst_pix_fmt' to be of type 'PixelFormat' rather than int. The attached cast fixes this (for me).
I've also added Matroska video to the list of supported extensions"
Please look at the .diff files for details. I have already enjoyed the latest Chinese *big* movie "Red Cliff" with the fixed ffmpeg plugin and osgmovie. :D"
the condition around a #pragma warning that is specific to visual
studio as _WIN32 is also defined for mingw compile but the #pragma is
not applicable there."
order, and not in the order they are listed in the constructor. To
avoid possible trouble, gcc warns about this. Attached modification
fixes the initializer order to silence this warning."
Also, there was also a small bug in osgDB's CMakeLists.txt that was causing an error when I tested with CMake 2.4.4.
IF(${OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX} STREQUAL "quicktime")
was changed to
IF(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX STREQUAL "quicktime")
"
Very simple cases of state configuration are supported (all the ones I really need):
- single per pixel not attenuated non spot light source ON/OFF
- exp2 fog ON/OFF
- diffuse texture in rgb + optional specular gloss in alpha (Texture unit 0) ON/OFF
- normal map texture (Texture unit 1 and Tangent in VertexAttribArray 6) ON/OFF
- blending and alpha testing (not in shader pipeline)
To view fixed function pipeline files and paged databases simply run >osgshadergen myfile.osg"
the filename extension is "vert" or "frag" but still lets this be
overridden by the Options (for those crazy people who store their
fragment shaders in .vert files :) )."
ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H})
which gives them .so extensions. Since ".so" != ".dylib" osgDB::listAllAvailablePlugins finds no plug-ins. I believe the correct solution is to use CMAKE_SHARED_MODULE_SUFFIX instead. This builds and runs correctly on OS X but I have not tested on other platforms.
Attached is an updated src/osgDB/CMakeLists.txt based on rev 9915. The change is at line 108. To validate: build and then run bin/osgconv --formats. You should get many screenfuls of plug-in features, extensions and options."
At the company where I work we model literally thousands of 3DS models for all types of objects. Most don't have transparent textures applied to them, but a few do. The issue is that a texture may have an alpha channel defined, yet its 3DS material definition is not marked as being an alpha source, or transparent. This can happen for any number of modelling reasons (so I'm told) but the net effect is that when a 3DS object is loaded with such a material applied, the stateset creation for the 3DS geometry omits to add the GL_BLEND attribute as neither of the conditions that it currently tests for are satisfied under this scenario.
However, one thing that is apparently an indication of transparency/alpha information that we do make use of when modelling, but that the 3DS reader omits to test, is that we assign to the transparent texture to the opacity_map of the 3DS material structure.
Now, having discussed with our modellers the theory behind the opacity map, it seems that it is safe to say that if an opacity map is specified, then the reader should really apply the GL_BLEND attribute as it is an indication of some form of blending being required between materials.
With this in mind, I have made a minor change to the function createStateSet below, from the ReaderWriter3DS.cpp file, that checks for an opacity map having been specified, and in such a scenario the GL_BLEND attribute is applied to the geometry. This fixed our issue, and thought it might be helpful to others."
When 2 geometries are merged, the primitive sets of the second geometry
are copied to the first geometry.
The primitive sets were copied with a std::insert into the first geometry
primitive set vector. It doesn't work when the geometry is using VBOs (because
the element buffer object of the primitive set is not updated).
The correction replaces
lhs.getPrimitiveSetList().insert( lhs.getPrimitiveSetList().end(),
rhs.getPrimitiveSetList().begin(),
rhs.getPrimitiveSetList().end() );
by
for( primItr=rhs.getPrimitiveSetList().begin();
primItr!=rhs.getPrimitiveSetList().end();
++primItr )
{
lhs.addPrimitiveSet(primItr->get());
}"
Node::Node(Node &node, copyop) :
_stateSet(copyop(node.getStateSet()),
It doesn't call the setStateSet method of osg::Node (or osg::Drawable). So the parent
list of the state set is not updated with the new node (drawable)."
some stuff out into DarwinUtils.h/.mm so both implementations can share
some of the code. There's even a bugfix for GraphicsWindowCarbon, which
fixes some issues with multiple windows on different screens."
On destruction of some static variables, the global referenced mutex is used
to lock access to the parent lists of state attributes, nodes and so on.
This even happens past the mutex is already destroyed.
This change to Referenced.cpp revision 9851 uses the same technique like the
DeleteHandlerPointer already in Referenced.cpp to return an zero pointer for
the global referenced lock if it is already destroyed."
"There is error in WoW shader, you can see it by this simple example:
osgviewer cessna.osg --wowvx-42 --clear-color 0,0,0
Clear color may be choosed any with at least one component equals to 0
or 1. In my case I see weird blinking between normal image and image
with depth map at right side on the screen."
Arbitrarily zooms 10% in/out for each click."
Note from Robert Osfield, flipped the orienation of the zoom to make the right mouse key zoom and the scroll wheel work in the same direction.
Single features are implemented as bits asother enums in ReaderWriter class already does, so that combinations are possible and fast comparison operations are possible
By default all features are enabled.
I have added this virtual method to the dot plugin to get an idea how to use these features.
With this patch osgconv --formats shows an additional line 'features' for each plugin"
Because there already exists the option to convert slow path geometry to the fast path by computing an internal fast path alternative, I added a new optimizer option that automatically does this. To check the results I also made some changes to the statistics gathering and rendering.
Somewhat unrelated, but also part of the optimizer I disabled removal of CameraView nodes during RemoveRedundantNodes optimization.
As discussed on the ML, CameraViews were removed from the scenegraph. This solves that issue.
Summary:
-Geometry::areFastPathsUsed now also looks at internalOptimizedGeometry
-Added Optimize option to make all slow path geometry compute their internal fast path alternative
-Added fast geometry counter to the statistics
-Disabled removel of CameraViews in optimizer
"
"Attached you'll find a proposal for using different
protocols. The idea behind the new code is:
1.) plugins/apps register protocols which they can handle. This is done
via osgDB::Registry::registerProtocol(aProtocolName). Plugins register
supported protocols as usual via ReaderWriter::supportsProtocol(..), the
Registry is updated accordingly.
2.) osgDB::containsServerAddress checks first for an appearance of "://"
in the filename and then checks the protocol against the set of
registered protocols via Registry::isProtocolRegistered(aProtocollName)
3.) the other getServer*-functions changed as well, there's even a
getServerProtocol-function
With these changes filenames/Urls get routed to loaded plugins even with
different protocols than 'http'."
osgText::Text and osgText::Text3D use the same font file.
The first really load the file and obtain an osgText::Font object,
the second use the cache created during the first load of the
font file, and so obtain an osgText::Font object instead of
osgText::Font3D object. To obtain an osgText::Font3D object,
osgText::Text3D call osgDB::readObjectFile(...) with an option
to specify the plugin we want an osgText::Font3D instead of
osgText::Font.
Generalised Problem:
In osgDB::Registry, loaded file cache is referenced by the name
of this file, so if I load a file with some options, and the cache
already contain object for this filename, I obtain an object
potentially not loaded with my options.
Behaviours:
Cache management is delegate to osgDB::Registry, but cache
coherence (load a file with option then reuse it, deactivate the
cache when load a specific file or don't cached the loaded file)
is user's responsibility.
Text3D solution:
Postfix the font file name by .text3d or something similar and then have the freetype plugin return
osgText::Font3D when it detects this.
This operation is done by osgText::readFont3DFile() which unsure the filename have .text3d as extension.
This is totaly transparent for user, and backward compatible.
BTW, I fix the bug about the Normal of 3D text. Currently, the front and wall face have
the same normal (0,0,1) in the Text3D object coordinate. Now the wall face have its own
normal array computed by the plugin.
BTW 2, I implement
- void Text3D::accept(osg::Drawable::ConstAttributeFunctor& af) const
- void Text3D::accept(osg::PrimitiveFunctor& pf) const
so now statistics are well reported.
"
"Summary of changes:
From Roland
-Added MorphGeometry
-Bone Bindmatrix is only calculated if needed
-osgAnimation plugin now supports all available channel types (before only linear vec3 or quat channels)
-osgAnimation plugin now supports MorphGeometry
-osgAnimation plugin now supports animation and channel weights, animation playmode, duration and starttime
-removed osgAnimationManager.cpp from CMakeList
From Cedric
-fixed the last_update field (it was only updated at the first update) in BasicAnimationManager.cpp
- Refactore some part of MorphGeometry minor changes
- Add osganimationmorph as example
"
first email:
"in the current implementation of osgUtil::RenderStage::drawInner() method, there is some wrong assumptions made. The problem is, that whenever one does use multisampling functionality, the Blit operation (which suppose to copy the content of multisampled FBO into the usual one) doesn't perform well in some cases.
I've attached a corrected version of the RenderStage. It do just add one line, which enables the multisampled FBO as a readable just before the usual FBO is set as writable. With these corrections the Blit operation performs now correct and allows using of multisampled rendering results further."
second email:
"There was a problem when blitting the multisampled FBO with internal formats. The default internal format of color buffered multisample FBO was GL_RGBA. This has converted the color values whenever the FBO content was copied. I've added couple of lines, which do just enable the multisampled FBO internal format in respect to the attached color texture's internal format. This makes it possible to blit even float valued texture, so make HDR with multisampling possible ;)"
DisplaySettings.cpp: OSG_COMPIlE_CONTEXTS -> OSG_COMPILE_CONTEXTS
AnimtkViewer.cpp: is a 3d poker game client -> is an example for viewing
osgAnimation animations"
It's really just a cut-paste job from the existing LINE support.
The current dxf plugin architecture isn't very efficient, especially if you
are loading large point clouds (LIDAR)
eg. it makes multiple lookups of the layer name for each vertex.
I don't know if I can improve this for the general case or if I have to add a
special large point cloud dxf reader."
It\u2019s a one line change against OSG 2.8.0 (see line 196). I\u2019ve already tested the change, and confirmed it\u2019s fixing the crashes described above."
It basically removes the static init() and exit() functions,and move them inside the observer class (the one that cleans everything up when the last media is unloaded).
It also add an extra check to clean up on exit if the QuickTime env is initialized, but no media is succesfully loaded / written (it might happens with streaming resources).
I tested it under WinXP with zero, one and multiple videos.
Stephan reads in copy: could you kindly check if everything runs smooth under OSX as well? Also, have you got a chance to test it with streaming media?
"
-I changed the SET of COLLADA_BOOST_INCLUDE_DIR to use findpath, so users may override this setting if they choose not to build against to precompiled boost libraries delivered with the Collada DOM.
-Changed daeRMaterials.cpp to prevent a compiler warning about a potentially uninitialized variable."