[info-performer] en/disable texturing in multiple pfPipeWindows

New Message Reply Date view Thread view Subject view Author view

From: Jürgen Gotschlich (juergen.gotschlich++at++dlr.de)
Date: 03/03/2003 09:52:32


Hi performers,

I'm developing a multipipe/multichannel application and would like to
enable/disable texturing.
But my texture toggling is only working on the last of any pfPipeWindows
!

Thanks for any help

Juergen

***** texture toggling code:
*******************************************************

  if( texMode!=texModeOld ) {

    texModeOld = texMode;

    if( !texMode ) {
      pfOverride(PFSTATE_ENTEXTURE | PFSTATE_TEXTURE | PFSTATE_ENTEXGEN,
0);
      pfDisable(PFEN_TEXTURE);
      pfDisable(PFEN_TEXGEN);
      pfOverride(PFSTATE_ENTEXTURE | PFSTATE_TEXTURE | PFSTATE_ENTEXGEN,
1);
    }
    else {
      pfOverride(PFSTATE_ENTEXTURE | PFSTATE_TEXTURE | PFSTATE_ENTEXGEN,
0);
    }
  }

******code to generate pipes, windows and channels
**********************************************

  //---- create pipes, windows and channels ----
  for( ip=0; ip<vs.pipeMax; ip++ ) {

    //---- create pipe ----
    vs.pipe[ip].pipe = pfGetPipe( ip );

    //---- loop to create pipeWindows ----
    for( iw=0; iw<vs.pipe[ip].pwinMax; iw++ ) {

      vs.pipe[ip].pwin[iw].pwin = new pfPipeWindow( vs.pipe[ip].pipe );
      vs.pipe[ip].pwin[iw].pwin->setName( vs.progName );
      if( iw==0 ) vs.pipe[ip].pwin[iw].pwin->setWinType( PFPWIN_TYPE_X |
PFPWIN_TYPE_NOXEVENTS );
      else vs.pipe[ip].pwin[iw].pwin->setWinType(
PFPWIN_TYPE_SHARE );
      if( vs.noBorder ) vs.pipe[ip].pwin[iw].pwin->setMode(
PFWIN_NOBORDER, 1 );

      //---- specify config function
-------------------------------------
      vs.pipe[ip].pwin[iw].pwin->setConfigFunc( vsOpenPipeWin );

      //---- loop to create channels ----
      for( ic=0; ic<vs.pipe[ip].pwin[iw].chanMax; ic++ ) {

        //---- Initialize and attach the channels ----
        vs.pipe[ip].pwin[iw].chan[ic].chan = new pfChannel( vs.pipe[ip].pipe );
        vs.pipe[ip].pwin[iw].pwin->addChan( vs.pipe[ip].pwin[iw].chan[ic].chan
);

              //---- form channel group ----
              if( (ip+iw+ic)==0 ) {
          //---- set first channel as master channel ----
          vs.masterChan = vs.pipe[0].pwin[0].chan[0].chan;
          //---- get default share mask ----
          share = vs.masterChan->getShare();
          //---- disable attributes in share mask ----
          share &= ~(PFCHAN_VIEWPORT|PFCHAN_VIEW_OFFSETS|PFCHAN_FOV);
          //---- enable attributes in share mask ----
                share |= PFCHAN_VIEW;
          //---- set share mask ----
          vs.masterChan->setShare( share );
              }
              else {
          vs.masterChan->attach( vs.pipe[ip].pwin[iw].chan[ic].chan );
        }

        //---- Attach the scene to the channel ----
        vs.pipe[ip].pwin[iw].chan[ic].chan->setScene( vs.scene );
      }

    }

  }

}

*******************************************************

-- 
________________________________________________________________________

Jürgen Gotschlich email: juergen.gotschlich++at++dlr.de __/|_ Phone: +49(531)295-3248/2778 /_/_/_/ Fax : +49(531)295-2640 |/ DLR

Deutsches Zentrum für Luft-und Raumfahrt | German Aerospace Center in der Helmholtz-Gemeinschaft | Institut für Flugsystemtechnik | Inst. of Flight Research Abt. Flugsimulation | Flight Simulation Dep. Lilienthalplatz 7 | Lilienthalplatz 7 D-38108 Braunschweig | D-38108 Braunschweig, Germany ________________________________________________________________________


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Mar 03 2003 - 09:50:06 PST

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