Re: fbsubtexload() problem

New Message Reply Date view Thread view Subject view Author view

Hansong Zhang (zhangh++at++cs.unc.edu)
Mon, 27 May 1996 14:47:00 -0400 (EDT)


Thanks for all your replies. Simon is right: fbsubtexload() works
only when TX_FAST_DEFINE is specified.

I have another question on interpolation of texels.
What I'm doing is:
  (1) draw in a 256x256 window a (0,0)-(255,255) square onto which
      the 256x256 texture is mapped
  (2) load the 256x256 image in the window into the texture with
      fbsubtexload(); loop to (1), i.e. draw the sqaure with the
      framebuffer image as a texture map.

I expected a static image of the texture map loaded from a file; and
such I got when TX_MINFILTER is TX_POINT, TX_TRILINEAR etc. But when
TX_MINFILTER is TX_BILINEAR, I got an animation with the texture
gradually blurred and shrinking to the middle of the window. I think
this shouldn't happen since I'm neither minifying or magnifying the
texture. Could anybody explain this to me? Thanks much,

My texture and geometry coordinates are:

  float texcoords[4][2] = {{0,0},{1,0},{1,1},{0,1}};
  float coords[4][2] = {{0,0},{255,0},{255,255},{0,255}};

And the code is:

  for (i=0; i<LOOPS; i++) {
      bgnpolygon();
                for (j=0; j<4; j++) {
                    t2f(texcoords[j]);
              v2f(coords[j]);
          }
      endpolygon();
      gflush();
      fbsubtexload(0,0, TX_TEXTURE_0, SPOT, 0.0f, 1.0f, 0.0f, 1.0f, 0);
  }

Thanks,

Hansong

>
> rany++at++netvision.net.il writes:
> >If I remember correctly, the 'flags' argument in the fbsubtexload() command
> >- which you set to 1, tells fbsubtexload(0 to act in one of a several
> >special cases. flags=1 means that the texture chunk you are loading is a 8
> >bit intensity texture tile of size 64x64. Try settiong 'flags' to zero.
>
> Actually, that's the interpretation of the flags argument to subtexload();
> the flags to fbsubtexload are not used.
>
> The manpage hints that fbsubtexload() is for use with textures that have
> been defined with TX_FAST_DEFINE; try adding that to the list of properties
> in texdef2d().
>
> Simon
>
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer.html
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:55 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.