There is a small bug with your change and SubloadCallback, the texture object is destroy at each call of Texture2D::apply because the modified count is never updated when using SubloadCallback.
I have made a small fix to avoid that, see attachement."
From Robert Osfield, added an if (_image.valid()) before the getModified() that Fabien added to avoid problems when no _image is assigned but an subload callback is.
> loader to un-premultiply the alpha (now in the codebase).
Applying the code brightens the semi-transparent portion, but the black edges are still there (same on both osgviewer and FlightGear).
Therefore I believe that the alpha channel is completely ignored (on png, gif, tiff, etc...). I tweaked and tweaked and finally got a workaround.
Please commit the enclosed file to fix these issues.
My workaround is a bit tricky (and some lines are even weird for me), but it resolves the black edges.
These workarounds also work on GIF, TIFF, TGA, and PSD as long as I've tested so far.
Please read this for more info on this issue:
http://macflightgear.sourceforge.net/home/development-notes/devnote-dec-02-2009http://macflightgear.sourceforge.net/home/development-notes/devnote-dec-03-2009
I'm very happy if some of you guys find a better means of solving the black edges.
"
"Here is our freshly baked 3DS reader/writer (named 'v0.5' to differentiate from previous one). Changes are against trunk rev. 10819.
Short changelog (from rev 10819):
- Added 3DS writer
- Sync'd with latest lib3DS
- Added options, especially "flattenMatrixTransforms" to get the "old" behaviour (else the reader correctly maps to OSG the transforms from the 3DS file).
What should be done:
- Check with pivot points, with and without "flattenMatrixTransforms" option.
- We ran tests on it, but we can never be 100% sure there is no bug. Testing from the community would of course be helpful."
(de)allocation going on in OverlayNode::cut().
So instead creating inner-loop variables 'distances' and 'newVertices'
every time, I moved the creation out of the loop and just do a clear() +
reserve() inside the loop. This allows std::vector<> to reuse the old
memory instead allocating new when the new size <= oldsize."
Currently osg2cpp removes "\n" line endings to replace them with a textual equivalent ("\\n") in order for the string representing the shader to contain line endings in the string. But if the file that was read contained Windows line endings ("\r\n"), the resulting file looked really weird (the \r were left there and editors interpreted that as an additional newline). Also, I can imagine that if the shader file that was read had Mac line endings ("\r") then the output shader would all end up in one long line since there are no "\n"...
What I've done:
I've added a search and replace of "\r\n" to "\n", and then "\r" to "\n" (note that the order is important).
I've also changed the filename handling so that the output file will be put in the same directory as the input file in case it was specified with a path. Previous functionality is retained for files specified with the filename only.""
fixed a small bug then:
ReaderWriterPDF.cpp, line 133, change:
std::string uri = std::string("file:") + foundFile;
to:
#if defined(WIN32) && !defined(__CYGWIN__)
std::string uri = std::string("file:///") + foundFile;
#else
std::string uri = std::string("file:") + foundFile;
#endif
That's because glib accepts "file:///C:\\data\\file.pdf" as URIs on
Windows, as well as "file:/home/data/file.pdf" on Unix, but
"file:C:\\data\\file.pdf" is not recognized.
Now I could read my Chinese translation of OSGQSG with osgpdf. :P"
I have added the missing call to FreeLibrary in osgDB::FileUtils., and now my the runtime unload of MY dll is working properly. It has also cured some related problems I was having with memory leak checks being reported.
I have attached a fix to osgDB/FileUtils.cpp based on version 2.9.5 svn revision 10374
"
and so, if the .dot plugin was loaded, it would happily handle any file
name extension.
To reproduce the bug, first save a scene to a dot file (to load the dot
plugin), then try to write the scene to an osg file. If you look at the
osg file, you will see that it is a dot file."
osgcamera -r 5 --vbo cow.osg
Which repeats construction of the viewer 5 times in a row, and enables VBO, and on each repeat a new model is loaded.
osgcamera -r 2 --vbo --shared cow.osg
Which repeats construction of the viewer 2 times in a row, and enables VBO, and on each loads the model once and shares it between each instance of the viewer.
The texture in data/Images should be copied to osg-data. I created the texture myself with the help of an explosion generator, so no license issues there.
"
"I've attached a small fix to osgUtil::SceneView so that is uses a scissor test when clearing the stencil buffer for stencil based stereo."
and
"I've added another small change for stencil based stereo, so please use this newer version. This newer version simplifies the calls to glOrtho and glRecti when drawing the stipple pattern. This change also happens to fix an issue where the stencil stereo would not work with certain viewport settings. I'm not exactly sure why this was happening, it might be a graphics driver issue, but either way I think the changes should be fine."
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg33967.html
, interpolating through HSV space gives a rainbow color effect which
does not mimic the simple RGB color interpolation that OpenGL does.
It's overkill and causes unexpected visual artifacts. In the attached
files I've removed the conversion to HSV so that interpolation happens
in RGB space."
.dds texture files from internally-embedded textures during IVE writes."
From Robert Osfield, fixed a bug in the above submission, and changed the way that the filename of the file is passed into DataOutputStream to avoid issues with the .ive's plugins ability to read from istreams.