Re: texture problem

New Message Reply Date view Thread view Subject view Author view

Simon Hui (shui++at++kid.asd.sgi.com)
Fri, 31 May 96 01:56:04 -0700


Someone has already answered this, just thought I'd elaborate.

> From: Torrey Stevens <stevens++at++flanders.tempe.gtegsc.com>
> Subject: texture problem
>
> I am trying to texture a rectangular face with a two component IA texture
> but view the face the texture comes up not aligned to the face and when I
> rotate the face the texture appears to rotate differently within in the
> face.
>
> pfVec2 tcoords[4];

I can't tell from your code fragment whether these texcoords are local
storage on the stack, or statically allocated storage; since the former
is out of the question, I'll assume the latter.

This can only work if

        1. You call the 'set' commands below before you call pfConfig().
           Otherwise pfConfig will fork off the draw and cull processes,
           giving them each their own copy of tcoords.

        or

        2. The draw, cull, and app processes are the same process, in
           which case they all have the same copy of tcoords.

If you allocated tcoords using pfMalloc and the shared arena, that would
avoid these problems.

> tcoords[0].set(0.0, 1.0);
> tcoords[1].set(1.0, 1.0);
> tcoords[2].set(1.0, 0.0);
> tcoords[3].set(0.0, 0.0);

simon w. hui iris performer
shui++at++sgi.com advanced systems div
415.933.3244 silicon graphics inc

=======================================================================
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:56 PDT

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