CSB loader - texture matrix bug?

New Message Reply Date view Thread view Subject view Author view

From: Emil Knabe (eknabe++at++vtd.volvo.se)
Date: 03/21/2001 01:32:45


Had some problems maintaining scaled texture mapping (by using texture
matrix), reading CSB into performer (or pfconv). The result was badly
sized mapping of the texture.

Added one row in pfcsb.C, in function load_appearance_bitmask64, and I'm
much more happy:

The current code section:

    if (local.texTransform)
    {
        pfMatrix *tex_transform;
        tex_transform = (pfMatrix *)pfMalloc(sizeof(pfMatrix), csb->arena);
        tex_transform->set(a.tex_transform);
        app->setAttr(PFSTATE_TEXMAT, tex_transform);
    }

Now looks like:

    if (local.texTransform)
    {
        pfMatrix *tex_transform;
        tex_transform = (pfMatrix *)pfMalloc(sizeof(pfMatrix), csb->arena);
        tex_transform->set(a.tex_transform);
        app->setAttr(PFSTATE_TEXMAT, tex_transform);
        app->setMode(PFSTATE_ENTEXMAT, PFTR_ON);
    }

Seems like the missing setMode simply was forgotten, I don't know...

Maybe this helps someone at some point...

/Emil

--
Emil Knabe                               Phone : +46 31 666754
6900  Human System Integration, M1.6     Fax   : +46 31 666450
Volvo Technological Development AB       E-mail: eknabe++at++vtd.volvo.se
S-405 08 Gothenburg, SWEDEN              URL   : http://www.tech.volvo.se


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Mar 21 2001 - 01:44:51 PST

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