[osg-submissions] Registry seemed to assume that archive files will always use 4 letter extensions like osga
Wojciech Lewandowski
lewandowski at ai.com.pl
Thu Oct 4 03:47:03 PDT 2007
Robert,
Sorry, I screwed this up. I made and tested my changes at work but we are
temporaly stuck on OSG 2.0 for the current project. So when I was at home I
tried to add these changes to current SVN version. It was late, my memory
failed me and I made stupid mistake. I know you are busy and really
apologize for a waste of your time.
Attached is a fixed one. I polished it a little and did field tests this
with OSGA and current SVN.
Regards,
Wojtek
----- Original Message -----
From: "Robert Osfield" <robert.osfield at gmail.com>
To: <lewandowski at ai.com.pl>; "OpenSceneGraph Submissions"
<osg-submissions at lists.openscenegraph.org>
Sent: Thursday, October 04, 2007 12:43 AM
Subject: Re: [osg-submissions] Registry seemed to assume that archive files
will always use 4 letter extensions like osga
> Hi Wojciech,
>
> I have just tried out your change, and in general I'd be in agreement
> with relaxing the assumption but your "fix" breaks the OSG's ability
> to load .osga files, all of the .osga files I have fail with a seg
> fault with your change applied, as soon as I reverted things worked
> pefectly once more. Did you test your changes out on .osga files??
>
> Clearly these changes are not ready to be merged into SVN let alone 2.2.
>
> Could you please do more testing and figure a patch that allows what
> you require whilst still working stably with other setups.
>
> Thanks,
> Robert
>
> On 10/3/07, Wojciech Lewandowski <lewandowski at ai.com.pl> wrote:
>>
>> Hi Robert,
>>
>> Attached is a small fix for an issue I have encountered while trying to
>> create my archive plugin. Fix is made against latest SVN version.
>>
>> Registry method ReaderWriter::ReadResult Registry::read(const
>> ReadFunctor&
>> readFunctor) looks at the list of archive formats and finds proper
>> archive
>> reader / writer plugin. This piece of code used hardcoded assumption
>> that
>> archive files would always use 4 letter extensions. I changed this to use
>> actual extension length.
>>
>> The reason I write my archive is Win32 2 GiB limit of OSGA. We want to
>> use
>> 32 bit OSG but we really need to have some archive format where we can
>> keep
>> thousands of files generated for terrain (11 GiB). When these files are
>> stored in directories, one dir command can take several minutes, not to
>> mention copying....
>>
>> Actually I try to build my plugin based on OSGA format. As you know ;-)
>> OSGA
>> format does not assume that file pos type will be smaller than 64 bit.
>> Its
>> the Visual C++ iostream library which imposes this 32 bit limitations.
>> IMHO
>> main trouble in Win32 OSGA implementation are seekp,seekg,tellp,tellg
>> stream
>> methods which use 32 bit integer. I do not expect that files stored in
>> archive will be greater than 2GiB so 32 bit is okay for writes and reads.
>> Hence, I try to create OSGA plugin using stdio instead of iostreams
>> because
>> Visual C++ stdio file functions do allow to seek and retrieve file
>> positions
>> using 64 bit int.
>>
>> I was not expecting that such solution would be intersting for you as a
>> fix
>> for OSGA plugin so I tried to use different extension to coexist with
>> native
>> OSGA. I picked three letter RKV extension and found the above issue ;-).
>>
>> When I am done with my archive I will post it on the users forum. Maybe
>> others will be interested.
>>
>> Regards,
>> Wojtek Lewandowski
>>
>> _______________________________________________
>> osg-submissions mailing list
>> osg-submissions at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>
>>
>>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Registry.cpp
Url: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20071004/b0fe53ee/attachment.asc
More information about the osg-submissions
mailing list