Hi Mathias, On 11/7/06, Mathias Froehlich <[EMAIL PROTECTED]> wrote:
It would be interresting to see if lines beyond that line in question are shifted by some amount?
With you workaround in place the textures look fine. It is the right hand pixels that are being dropped.
I cannot see any problem with Flightgear but may be a 3 pixel shift in a huge texture is invisible for the first cut.
These extra supurious pixels are beyond the end of the row, they wouldn't have any affect on the output anyway. OpenGL texture can't have different number of pixels per row so I can't see how they would be useful in any way.
Note that the 'after' printout is allways zero, may be we need to switch to the next line not only at a zero length but also if the line end is just reached?
The RGB loader keeps file pointers to the start of each row so I believe each new row start from scatch without any problem of carry over.
Ok. If you have an other fix for that. I would like to test that on our rgb files.
I have pondered on adding the a check later, but there is two seperate loops later in the code, which would make it better to do the check/modify above this - and right where you added your workaround. I now think the only problem with your workaround is the assumption of 1 byte per colour channel.
When I tested the loaders with the Flightgear models I run a script doing a osgconv to ive on any 3d model I could find in the data directiory. Just to see that that it does not crash. If I remember well, this osgconv crashed on about 20% of the 3d models due to crashes in the rgb loader. So there are plenty of them out there. Past that change in my private tree the models are converted without crash. Not sure if they are also correct ...
I'm not against adding an extra check, similiar to your workaround, but looking at the data in the file it looks very much like that the files themselves are suspect. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
