Re: Checking screen(pipe) size...

New Message Reply Date view Thread view Subject view Author view

Russell Suter (russell++at++ctasim.com)
Tue, 11 Mar 1997 15:42:19 -0800


On Mar 11, 9:56am, Jan Barglowski wrote:
> Subject: Checking screen(pipe) size...
> Performers:
>
> I have an iR, where sometimes we run the pipe configured to 1280x1024,
> and other times at 2560x1024 (using the second RGB out for a second
> display). I'd like to have my Performer App check the size of the
> screen, and if it's 2560 wide then put the second channel on the second
> screen, otherwise put the second channel on top of the first channel.
>
> So the question is: how do I find out the size of the screen? I've
> been looking at pfPipeWindow::getCurScreenOriginSize(), but it keeps
> crashing, and pfPipeWindow::getCurOriginSize(), which gives -1 values
> until I pfPipeWindow::open(), when it gives the sizes I set it to.
>
> Thanks for any help!
>
After the pfInit, you can do the following:

#include <X11/X.h>
#include <X11/Xlib.h>

   Display *display;
   int screen;
   int width;
   int height;

   display = pfGetCurWSConnection();
   screen = DefaultScreen(display);
   width = DisplayWidth(display, screen);
   height = DisplayHeight(display, screen);

This assumes that you have one pipe. Each pipe will be a different screen.

> jan
>
> --
> Jan Anthony Barglowski jan++at++chinalake.navy.mil
> Real-time Computer Graphics http://www1.ridgecrest.ca.us/~jan
> Naval Air Warfare Center, China Lake (619) 927-1057
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Jan Barglowski

-- 
Russ
_______________________________________________ ______________________________
Though my eyes could see                       | Russell Suter
        I still was a blind man.               |    Voice : (303) 889-1262
               Though my mind could think      |      Fax : (303) 889-1210
                       I still was a mad man.  | Internet : russell++at++ctasim.com
_______________________________________________|______________________________
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            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:54:53 PDT

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