Global Attribute Setting with 2 GL contexts

New Message Reply Date view Thread view Subject view Author view

Serge Couvet (couvet++at++pobox.oleane.com)
Wed, 30 Nov 1994 12:46:34 +0100


Hello there:

Here is an easy question (I am a beginner in Performer):

My application opens 2 windows and creates a pfState for each one:

        win1 = winopen();
        state1 = pfNewState();

        win2 = winopen();
        state2 = pfNewState();

I now want to draw a same pfGeoset in the 2 windows with different rendering
modes:

        winset(win1);
        pfSelectState(state1);
        if (mode1 == WIREFRAME)
        {
            pfDisable(PFEN_TEXTURE);
            pfEnable(PFEN_WIREFRAME);
        }
        else
        if (mode1 == FLAT)
        {
            pfDisable(PFEN_TEXTURE);
            pfDisable(PFEN_WIREFRAME);
        }
        else
        {
            pfEnable(PFEN_TEXTURE);
            pfDisable(PFEN_WIREFRAME);
        }

        pfDrawGeoset(gset);

I do the same for win2,state2,mode2.

But I get strange results. Sometimes it works, more often it does not.
What happens ??

P.S> I don't want to attach a pfgstate to my pfGeoSet and I don't want to
set the rendering mode
     (through pfGSetDrawMode) because I have many pfgeosets to draw and
doing this would be time-consuming and useless since in my case
the rendering mode is a global attribute.

Thanks in advance

Serge COUVET
Advanced studies manager
THOMSON CSF TTS
26,chaussee Jules Cesar /BP 226 / 95523 CERGY-PONTOISE CEDEX/FRANCE
TEL:34.22.86.63/TELEX 616 780 F / FAX: 34.22.87.00
e-mail: couvet++at++pobox.oleane.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:50:42 PDT

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