[gl2ps] gl2psBeginViewportNoBackground
    barrand 
    barrand at lal.in2p3.fr
       
    Mon Apr 30 10:08:41 CEST 2007
    
    
  
    Hello
   In my software, I have to handle multiple regions / viewports  
within the
  same page. For the moment, in the gl2psBeginViewport, drawing
  the background or not is controlled over a global "page" option
  GL2PS_DRAW_BACKGROUND passed in the gl2psBeginPage.
   I have now situations where I want that some of the regions /  
viewports
  within a page, visualize their background whilst others do not.
  And with the today API, I can't do that (right ?).
   To bypass the problem, I have introduced the below function.
  Then I ask "DRAW_BACKGROUND" in the glBeginPage and use
  the below in case of visualizing a region/viewport without background.
    Will it be possible to include it a further version ? Or, else, some
  mechanism to control the back/no-back per viewport would be  
welcome....
     Regards
       Guy Barrand
/*G.Barrand*/
GL2PSDLL_API GLint gl2psBeginViewportNoBackground(GLint viewport[4])
{
   GLint opts;
   if(!gl2ps) return GL2PS_UNINITIALIZED;
   opts = gl2ps->options;
   gl2ps->options = 0; //No GL2PS_DRAW_BACKGROUND
   (gl2psbackends[gl2ps->format]->beginViewport)(viewport);
   gl2ps->options = opts;
   return GL2PS_SUCCESS;
}