[info-performer] (sub)loading textures in pf3.1

Date view Thread view Subject view Author view

From: Bram Stolk (bram++at++sara.nl)
Date: 06/16/2004 04:33:43


pfHello(everybody),

Did something change with respect to texture loading in performer 3.1
compared to performer 3.0 ?

On performer 3.0, this worked on both IRIX and LINUX:

  texturedata = (unsigned int *) pfMalloc(txtw * txth * sizeof(int), pfGetSharedArena());

  texture = new pfTexture();
  texture->setName("videotexture");

  texture->setImage(texturedata,4,txtw,txth,1);
  texture->setFormat(PFTEX_FAST_DEFINE, PF_ON);
  texture->setLoadMode(PFTEX_LOAD_SOURCE, PFTEX_SOURCE_IMAGE);
  texture->setFormat(PFTEX_EXTERNAL_FORMAT, GL_UNSIGNED_SHORT_5_5_5_1);
  texture->setFormat(PFTEX_SUBLOAD_FORMAT, PF_ON);
  texture->setLoadMode(PFTEX_LOAD_BASE, PFTEX_BASE_AUTO_SUBLOAD);
  texture->setFilter(PFTEX_MINFILTER, PFTEX_BILINEAR);
  texture->setLoadOrigin(PFTEX_ORIGIN_SOURCE, 0, 0);
  texture->setLoadOrigin(PFTEX_ORIGIN_DEST, 0, 0);
  texture->setLoadSize(txtw, txth);

Changes to the shared memory texture data would be visible automatically.

Since pf3.1, I do not see the changes.
On linux, adding this helped:

  texture->subload
  (
    PFTEX_SOURCE_IMAGE, // source
    texturedata, // image
    0,0, // xsrc, ysrc
    -1, // srcwidth
    0,0, // xdst, ydst
    txtw, txth // txtw, txth
  );

On IRIX with 3.1, I only see pixelnoise on the texture, which never
changes, regardless wether I do the subload or not.

I suspect a fundamental difference on texture handling between
pf3.0 and pf3.1
What should I do to fix this for IRIX systems on 3.1?

Thanks,

   Bram Stolk

-- 
------------------------------------------------------------------------------
 Bram Stolk, VR Engineer.
 SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP  AMSTERDAM
 email: bram++at++nospam.sara.nl   Phone +31-20-5923059  Fax +31-20-6683167

"Software is math. Math is not patentable." OR "Software is literature. Literature is not patentable." -- slashdot comment ------------------------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jun 16 2004 - 04:34:10 PDT