Newsgroups: comp.windows.x
Path: cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!fs7.ece.cmu.edu!europa.eng.gtefsd.com!darwin.sura.net!zaphod.mps.ohio-state.edu!menudo.uh.edu!nuchat!texhrc!texhrc!pyeatt
From: pyeatt@Texaco.com (Larry D. Pyeatt)
Subject: Re: Mix GL with X (Xlib,Xt,mwm)
Message-ID: <1993Apr20.173401.14378@texhrc.uucp>
Sender: news@texhrc.uucp
Nntp-Posting-Host: 211.2.1.197
Organization: Texaco
References:  <9304191540.AA09727@sparc1.jade.com>
Date: Tue, 20 Apr 1993 17:34:01 GMT
Lines: 36

In article <9304191540.AA09727@sparc1.jade.com>, graham@sparc1.ottawa.jade.COM (Jay Graham) writes:
|> 
|> I am developing an X (Xt,Xm) application that will include a graphics window
|> of some sort with moving symbols among other things.  A pure X application
|> could be implemented with Motif widgets, one of which would be an 
|> XmDrawingArea for drawing with Xlib.  But I would like to take advantage of
|> the Graphics Library (GL) available on our IBM RS/6000 (SGI's GL i believe).
|> 
|> Is it possible to mix X and GL in one application program?
|> Can I use GL subroutines in an XmDrawingArea or in an X window opened by me
|> with XOpenWindow?

There is a widget already defined for GL.  It is the GlxMDraw (motif) or
GlxDraw (athena) widget.  It is similar to a XmDrawingArea, except that it
allows you to use GL calls to render into the window.  Look at glxlink,
glxunlink, glxgetconfig, and glxwinset in the man pages.

|> I have never used GL before, but the doc on GL winopen() says that the first
|> time winopen() is called it opens a connection to the server.   Also, most of
|> the GL calls do not require a Display or GC, unlike most X calls.  From this
|> initial information it appears that X and GL cannot be mixed easily.   Is this
|> true?

The GlxMDraw widget works pretty well.  OpenGL will be an improvement.

|> Does PEX (graPHIGS?) have the same functionality of GL?

I think GL is a little easier to use and a little more powerful, but
that's just an opinion.  Mileage may vary.


-- 
Larry D. Pyeatt                 The views expressed here are not
Internet : pyeatt@texaco.com    those of my employer or of anyone
Voice    : (713) 975-4056       that I know of with the possible
                                exception of myself.
