[info-performer] Jpg textures in pfa and in pfTexture ( complete post )

New Message Reply Date view Thread view Subject view Author view

From: Devrim Erdem (devrim++at++machsim.com)
Date: 04/20/2003 11:38:27


First message was accidentialy sent, here is the complete message.
=====

Hello,

Recently I had a issue with jpg texture files with Performer for
Windows. Both 3.0.0 and 3.0.1 reacted in the same way.

Disclaimer : jpg textures are a bad idea as Mr Baker has said before and
here http://www.sjbaker.org/steve/omniv/jpegs_are_evil_too.html

The problem is when loading a pfa file which refers to a jpg file with
perfly, perfly complains :

PF Notice: pfdLoadFile_pfa: Loading "flint.pfa"
iopen: bad magic in image file 77e91856

The file is flint.pfa ( which is pfconv'ed from flint.sv ) and the
texture file is jpg'ed from marble.rgb. Both files are available here.
http://www.machsim.com/xfer/the_case_of_the_jpg_texture.zip

The second appereance of the problem is when a pfTexture is created for
use in a pfdBuilder.

      pfTexture* pfTex = static_cast<pfTexture*> ( pfdGetTemplateObject (
pfTexture::getClassType() ) ) ;

      pfdResetObject ( pfTex ) ;

      // Settting the name is enough, pfdBuilder will load
      // texture with this name from PFPATH
      pfTex->setName( tex->getFileName ().c_str () ) ;

      pfdBldrStateAttr ( PFSTATE_TEXTURE, pfTex ) ;

The last line ( pfdBldrStateAttr ) causes an immediate exit, there are
no crashes, returned error code and exception. It looks like pf simply
exits. ( this could be an incorrect misinterpretation )

The code above is tested to work with rgb files.

I would appreciate if someone could identify this issue.

Best Regards,

Devrim Erdem


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sun Apr 20 2003 - 11:38:16 PDT

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