Submitted with fixes by Julian Valentin

This commit is contained in:
Cedric Pinson
2016-06-25 07:49:56 +01:00
committed by Robert Osfield
parent 295da33cdf
commit 0ecb52ff82
26 changed files with 298 additions and 189 deletions

View File

@@ -16,6 +16,23 @@
using namespace osgDB;
static long long prev_tellg = 0;
void InputIterator::checkStream() const
{
if (_in->rdstate()&_in->failbit)
{
OSG_NOTICE<<"InputIterator::checkStream() : _in->rdstate() "<<_in->rdstate()<<", "<<_in->failbit<<std::endl;
OSG_NOTICE<<" _in->tellg() = "<<_in->tellg()<<std::endl;
OSG_NOTICE<<" prev_tellg = "<<prev_tellg<<std::endl;
_failed = true;
}
else
{
prev_tellg = _in->tellg();
}
}
void InputIterator::readComponentArray( char* s, unsigned int numElements, unsigned int numComponentsPerElements, unsigned int componentSizeInBytes)
{
unsigned int size = numElements * numComponentsPerElements * componentSizeInBytes;