Fixed --images commandline parsing
This commit is contained in:
parent
2f541fc076
commit
bc2e8034fe
@ -1981,10 +1981,12 @@ int main( int argc, char **argv )
|
|||||||
images.push_back(readRaw(sizeX, sizeY, sizeZ, numberBytesPerComponent, numberOfComponents, endian, raw_filename));
|
images.push_back(readRaw(sizeX, sizeY, sizeZ, numberBytesPerComponent, numberOfComponents, endian, raw_filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
while (arguments.read("--images"))
|
int images_pos = arguments.find("--images");
|
||||||
|
if (images_pos>=0)
|
||||||
{
|
{
|
||||||
ImageList imageList;
|
ImageList imageList;
|
||||||
for(int pos=1;pos<arguments.argc() && !arguments.isOption(pos);++pos)
|
int pos=images_pos+1;
|
||||||
|
for(;pos<arguments.argc() && !arguments.isOption(pos);++pos)
|
||||||
{
|
{
|
||||||
// not an option so assume string is a filename.
|
// not an option so assume string is a filename.
|
||||||
osg::Image *image = osgDB::readImageFile( arguments[pos]);
|
osg::Image *image = osgDB::readImageFile( arguments[pos]);
|
||||||
@ -1995,6 +1997,8 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
arguments.remove(images_pos, pos-images_pos);
|
||||||
|
|
||||||
// pack the textures into a single texture.
|
// pack the textures into a single texture.
|
||||||
ProcessRow processRow;
|
ProcessRow processRow;
|
||||||
images.push_back(createTexture3D(imageList, processRow, numComponentsDesired, s_maximumTextureSize, t_maximumTextureSize, r_maximumTextureSize, resizeToPowerOfTwo));
|
images.push_back(createTexture3D(imageList, processRow, numComponentsDesired, s_maximumTextureSize, t_maximumTextureSize, r_maximumTextureSize, resizeToPowerOfTwo));
|
||||||
|
Loading…
Reference in New Issue
Block a user