glXChannelRectSGIX(3G)

glXChannelRectSGIX - specify area of frame buffer to resize to video resolution

Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.

NAME
     glXChannelRectSGIX - specify area of frame buffer to resize to video
     resolution


C SPECIFICATION
     int glXChannelRectSGIX( Display *dpy,
                             int screen,
                             int channel,
                             int x,
                             int y,
                             int w,
                             int h )


PARAMETERS
     dpy      Specifies the connection to the X server.

     screen   Specifies the screen of the X server.

     channel  Specifies the video channel number.

     x, y, w, h
              The origin and size of the area of the window that will be
              converted to the output resolution of the video channel.  (x,y)
              is relative to the bottom left corner of channel specified by
              the current video combination.


DESCRIPTION
     glXChannelRectSGIX sets the rectangular area of the frame buffer that
     will be resized to match the output resolution of channel. The specified
     frame buffer area is not resized until glXSwapBuffers is called for the
     window that is bound to channel. Call glXBindChannelToWindowSGIX to bind
     a window to a channel.

     Note that the origin and size of the specified area must conform to the
     precision constraints returned by glXQueryChannelDeltasSGIX.

     glXChannelRectSGIX returns True if it succeeds. If it fails, False is
     returned and the frame buffer area remains unchanged.

EXAMPLE

          XSGIvcChannelInfo   *pChanInfo = NULL;

           ... open display and screen ...


          XSGIvcQueryChannelInfo( display, screen, channel, &pChanInfo );

          X = pChanInfo->source.x;
          Y = pChanInfo->source.y;
          W = pChanInfo->source.width;
          H = pChanInfo->source.height;

           ... open an X window (preferably with no borders so will not get ...
           ... moved by window manager) at location X,Y,W,H (X coord system) ...

          glXBindChannelToWindowSGIX( display,screen,channel,window );

          glXQueryChannelDeltasSGIX( display,screen,channel, &dx,&dy,&dw,&dh );

          while( ... )
          {
              ... determine area(width,height) that will be drawn ...
                  ... based on performance requirements.  Make ...
              ... area smaller if application is fill limited ...

              w =  width - ( width % dw );
              h =  height - ( height % dh );

              glViewport( 0,0,w,h );

              glXChannelRectSGIX( display,screen,channel, 0,0,w,h );

              ... draw scene ...

              glXSwapBuffers( display,window );
          }



NOTES
     glXChannelRectSGIX is part of the SGIX_video_resize extension.


ERRORS
     glXChannelRectSGIX returns False if the specified area does not conform
     to the precision constraints returned by glXQueryChannelDeltasSGIX.

     glXChannelRectSGIX returns False if channel is not bound to a window.

     glXChannelRectSGIX returns False if channel is not a valid independent
     channel.
MACHINE DEPENDENCIES
     The SGIX_video_resize extension is supported only on InfiniteReality
     systems.


SEE ALSO
     glXBindChannelToWindowSGIX, glXQueryChannelRect,
     glXQueryChannelDeltasSGIX, glXSwapBuffers