Phil Keslin (philk++at++cthulhu.engr.sgi.com)
Tue, 02 Feb 1999 18:05:15 -0800
After opening the file using iopen, the zsize field in the header (see
<gl/image.h>) will allow you to determine the color model. If zsize == 3
then the image is rgb and for zsize == 4, rgba. If you are using
pfTexture then you can use pfGetTexImage (or pfTexture::getImage for
C++). The comp argument will return the number of components.
> > 2) When I load a SGI file, without setting the internal format first,
> > wil it
> > know to set the internal format for rgb files to RGB and for rgba files
> > to RGBA_8 ?
For RGB it will choose (I believe) RGB5 and for RGBA, RGBA4 with the
default internal format. You can always change the internal format, you
must ensure that the texture gets reloaded (not quite sure if its
automatic). The pfTexture man page lists the defaults for various
component types.
- Phil
-- Phil Keslin <philk++at++engr.sgi.com>
This archive was generated by hypermail 2.0b2 on Tue Feb 02 1999 - 18:05:19 PST