John Rohlf (jrohlf++at++tubes)
Fri, 22 Sep 95 10:37:01 PDT
> int i, j, r, c;
> unsigned long img[64][64][3];
>
> tex = pfNewTex(arena);
>
> xsize = ysize = 64;
>
> /* make check image : from openGL book */
> for ( i = 0; i < ysize; i++ )
> for ( j = 0; j < xsize; j++ )
> {
> c = ((((i&0x8)==0)^((j&0x8))==0)) * 255;
> img[i][j][0] = (unsigned long) c;
> img[i][j][1] = (unsigned long) c;
> img[i][j][2] = (unsigned long) c;
> }
>
> pfTexImage(tex, img, 2, xsize, ysize, 1);
pfTexImage expects a packed image. In the above example
your image is of type 'long' but it should be of type 'char' and the
number of components you specify to pfTexImage should be 3, not 2.
I speak for IrisGL only - I don't know exactly how pfTexImage behaves
in OpenGL.
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:54 PDT