Hi,
I use osgdem with a dummy tile of height zero and the --whole-globe flag set
to get the whole earth generated. If I add a texture with parameter -t the
black parts of the texture will be translucent and in the resulting texture the
color (light grey) of my dummy tile is used instead. See the result in the
attached picture "srtm_L3_X3_Y3_incorrect.jpg".
I found the reason for this in the following if statement in line 796 of
SourceData.cpp:
…
else if (sourceColumnPtr[0]!=0 || sourceColumnPtr[1]!=0 ||
sourceColumnPtr[2]!=0)
{
destinationColumnPtr[0] = sourceColumnPtr[0];
destinationColumnPtr[1] = sourceColumnPtr[1];
destinationColumnPtr[2] = sourceColumnPtr[2];
if (destination_hasAlpha)
destinationColumnPtr[3] = 255;
}
…
The if statement causes the color value only be taken, if it is not black (r=0,
g=0, b=0). Commenting out the condition yields in the correct result, shown in
picture "srtm_L3_X3_Y3_correct.jpg".
Now, I wonder what the purpose of this if statement was?
Regards,
Alex
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30688#30688
Attachments:
http://forum.openscenegraph.org//files/srtm_l3_x3_y3_correct_163.jpg
http://forum.openscenegraph.org//files/srtm_l3_x3_y3_incorrect_598.jpg
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org