texture matrix

New Message Reply Date view Thread view Subject view Author view

AnitaKishore (kishore++at++electrogig.com)
Thu, 29 Feb 1996 18:00:41 -0800


I am using gl commands to download texture matrix. I was not able to localize
the texture matrix effect to the textures I wanted. Once downloaded, it
effected
all geometry textures following the current node. I used node trav callback.
Every download, the texture matrix was first upodated for texture coord.
translation, then downloaded. This would translate all textures following
the one I wanted.

So I thoigh of using a post-trav callback as follows:

        myNode->setTravFuncs(PFTRAV_DRAW, downloadTexMatrix, restoreTexMatrix);

downloadTexMatrix :

        get texMat from userData
        long matMode = getmmode();
        mmode ( MTEXTURE );
        loadmatrix(texMat);
        mmode(matMode);

restoreTexMatrix :

        long matMode = getmmode();
        mmode ( MTEXTURE );
        loadmatrix(identityMatrix)
        mmode(matMode);

But now, this doesn't do any translation at all to any of the textures.
Any one knows why? and how to get the effect that I want?

Thanks for any help

-anita

------------------------------------------------------------------
Anita Kishore
kishore++at++electrogig.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:29 PDT

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