Hi Sukender,

I've started to look into the issue, I'll try and fix it before I
review your changes again.  As you have suggested it currently it
looks like a problem with the osgDB::findFileInDirectory()  or
osgDB::findDataFile() paths so this is where I'm looking right now.

Robert.

On Fri, Mar 11, 2011 at 9:47 AM, Sukender <[email protected]> wrote:
> Hi robert,
>
> The 3DS plugin reads:
>  std::string fileName = 
> osgDB::findFileInDirectory(texture->name,_directory,osgDB::CASE_INSENSITIVE);
> and then
>  fileName = osgDB::findDataFile(texture->name,options, 
> osgDB::CASE_INSENSITIVE);
>
> However, when "containsServerAddress()", the original name is used (no case 
> hack here), and the name of the texture is set to the original one 
> ("osg_texture->setName(texture->name);").
>
> I guess there is a problem in osgDB::findFileInDirectory() or 
> osgDB::Registry::findDataFileImplementation(), or osgDB::findFileInPath()...
>
> And unfortunately, no, I don't have access to a Linux system right now (I 
> may, but it will take more than 2-3 days...). Sorry.
> What do you intend to do?
>
> Cheers,
>
> Sukender
> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
>
> ----- "Robert Osfield" <[email protected]> a écrit :
>
>> Hi Sukender,
>>
>> I've just gone back a tested the plugin as it is in svn/trunk, with
>> the intention of then merging your change to dobule check the issue.
>> Rather than find that everything works in svn/trunk with handling the
>> relative file file, I've found that svn/trunk is broken too, so I'm
>> not sure how I thought that it was earlier, I must have made a
>> mistake
>> in changing directories in my various runs.  I therefore have to
>> conclude that you changes don't break the finding of files, as is was
>> already broken ;-)
>>
>> Looking into the model in question, if I run osgviewer on the model
>> for a different directory to the file I get the errors reported:
>>
>> texture 'L-WERK.JPG' not found
>> texture 'T-RING.JPG' not found
>> texture 'TURB-U.JPG' not found
>> texture 'AUFBAU.JPG' not found
>> texture 'A-HECK.JPG' not found
>> texture 'DECK1.JPG' not found
>> texture 'METAL.JPG' not found
>> texture 'A-FRONT.JPG' not found
>> texture 'SKIN2.JPG' not found
>> texture 'RUMPF.JPG' not found
>>
>> But the model itself contains the files in lower case form:
>>
>> > ls -1
>> A-front.jpg
>> A-heck.jpg
>> Aufbau.jpg
>> correct.osg
>> deck1.jpg
>> deckbump.jpg
>> kabine.jpg
>> LAKEREM.jpg
>> LicenseAgreement.txt
>> l-werk.jpg
>> metal.jpg
>> output.txt
>> r_bum.jpg
>> rumpf.jpg
>> skin1.jpg
>> skin2.jpg
>> skin.jpg
>> sub.ive
>> Submarine.3DS
>> Sunset04.jpg
>> t-ring.jpg
>> turb-u.jpg
>>
>> Which may well be why there is a difference between what you are
>> seeing under Windows and what I am seeing unde Unix as Windows is
>> case
>> in-sentive.  I recall there is some hacky code in the 3ds plugin and
>> osgDB for looking for files in a case insentive search, perhaps it's
>> these hacks that aren't coping with the relative file paths.
>>
>> Do you have a linux system to test against?
>>
>> Robert.
>> _______________________________________________
>> osg-submissions mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to