Re: Mixing GLUT library and Performer ?

New Message Reply Date view Thread view Subject view Author view

Jan Springer (jan.springer++at++informatik.uni-weimar.de)
Wed, 30 Jul 1997 21:14:57 +0200


Kristian Lunde wrote:
>
> I am looking for a way to read input from a spaceball in my performer application.
> I have tried to use the OpenGL Utility Toolkit (GLUT), which have routines for reading
> input from a spaceball, without any success.
>
> My questions are:
> 1. Is it inappropriate to use GLUT routines in a performer application ?
> 2. If possible how do I initialize the GLUT library in a performer application ?
>
> Thanks,
> Kristian
> --
> Kristian Lunde, Kongsberg Simulation & Training AS, 3600 Kongsberg, Norway
> Email : kristian.lunde++at++ks-t.no
> Phone +47 32735766 at work, +47 32736230 at home, Fax +47 32736965
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

kristian,

in general i would avoid mixing glut with performer but hadn't had
a chance to test the both together.

glut must be initialized by calling glutInit():

     NAME
          glutInit - initialize the GLUT library.

     SYNTAX
          void glutInit(int *argcp, char **argv);

     ARGUMENTS
          argcp A pointer to the program's unmodified argc
                    variable from main. Upon return, the value
                    pointed to by argcp will be updated, because
                    glutInit extracts any command line options
                    intended for the GLUT library.

          argv The program's unmodified argv variable from main.
                    Like argcp, the data for argv will be updated
                    because glutInit extracts any command line options
                    understood by the GLUT library.

     DESCRIPTION
          glutInit will initialize the GLUT library and negotiate a
          session with the window system. During this process,
          glutInit may cause the termination of the GLUT program with
          an error message to the user if GLUT cannot be properly
          initialized. Examples of this situation include the failure
          to connect to the window system, the lack of window system
          support for OpenGL, and invalid command line options.

          glutInit also processes command line options, but the
          specific options parse are window system dependent.

if you want to get any events for some device you have to make
sure this device has been properly initialized _and_ you have to
register a callback function (glutDeviceGet (GLUT_HAS_SPACEBALL),
glutSpaceballMotionFunc ()).

just try it.

        j.

p.s: as ov version 3.2 (i think) you _must_ register an display
     callback function. without doing this glut will exiting.
     this could be a problem when trying to initialize performer
     rendering too in the same application.

        j.

-- 
+---------------------------------------+-----------------------+
| jan springer                          | this                  |
| student of applied computer science   |    space              |
| bauhaus-university germany            |        reserved       |
+---------------------------------------+               for     |
| jan.springer++at++informatik.uni-weimar.de |                 quote |
+---------------------------------------+-----------------------+
=======================================================================
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:55:40 PDT

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