From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,63d1560f4d0f4cd6 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-08-12 09:07:57 PST Newsgroups: comp.sys.dec Path: bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!news.duke.edu!MathWorks.Com!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!decwrl!pa.dec.com!src.dec.com!crl.dec.com!lead.zk3.dec.com!mets86.two.dec.com!peavax.mlo.dec.com!lgi2.mlo.dec.com!vesper From: vesper@lgi2.mlo.dec.com (Andy Vesper) Subject: Re: OpenGL, Shared Libaries, FFS Message-ID: <1994Aug8.134836.28681@peavax.mlo.dec.com> Sender: usenet@peavax.mlo.dec.com (USENET News System) Reply-To: vesper@vesper.enet.dec.com Organization: Alpha Personal Systems References: <31f2d2$j6@classic.iinet.com.au> <323eji$498@hermes.ridgefield.sdr.slb.com> Date: Mon, 8 Aug 1994 13:48:36 GMT In article <323eji$498@hermes.ridgefield.sdr.slb.com>, lovell@sdr.slb.com (John Lovell) writes: >Hi, is anyone out there running OpenGl on Alpha's running VMS? >I am trying to build some SGI sample programs, with not too much >success. There certainly are people running OpenGL on OpenVMS/AXP. The sample programs available directly from SGI should work, but there may be some small operating system or hardware dependencies left. The easiest way to get OpenGL example programs is to install that portion of Open3D (the software product which contains OpenGL support plus PEX support). This includes .MMS files and .COM files to help build the examples. >Is there documentation I can get to say which libraries to link to, >for example? There is not much documentation on OpenGL itself (we reference the _OpenGL Programming Guide_ (Addison Wesley, ISBN 0-201-63274-8) as the best way to learn to program in OpenGL), but there is a document entitled _Using OpenGL_ (order number AA-Q1TDC-TE) that describes how to compile and link OpenGL programs on both OpenVMS and DEC OSF/1 operating systems. There are also guidelines for writing code that runs correctly whether a `long' has 32 or 64 bits, plus some notes about the implementation on various graphics subsystems. To answer your immediate question: To link OpenGL programs on OpenVMS, create a linker options file as follows: $ CREATE OPENGL.OPT ! SYS$SHARE:DECW$OPENGLUSHR.EXE/SHARE SYS$SHARE:DECW$OPENGLSHR.EXE/SHARE ! SYS$SHARE:DECW$XLIBSHR/SHARE Use the LINK command line as follows: $ LINK TEST, OPENGL.OPT/OPT If you are using the OpenGL Widget, add SYS$SHARE:DECW$OPENGLWIDGETSHR.EXE/SHARE to the options file. By the way, this is also in the release notes. >How can I find the list of subroutines in a shareable image. I tried > >$LIB/LIS/SHARE DECW$OPENGLSHR.EXE $ ANALYZE/IMAGE/OUTPUT=T.TMP SYS$LIBRARY:DECW$OPENGLSHR.EXE $ SEARCH T.TMP "Symbol:" Perhaps a better way to understand how to use the routines would be a perusal of SYS$LIBRARY:GL.H. The function prototypes help with argument numbers and types, sometimes even the use of the arguments: extern void glColor3f (GLfloat red, GLfloat green, GLfloat blue); is pretty obvious, although: extern void glFogf (GLenum pname, GLfloat param); doesn't really give a lot of information. >In particular, the SGI routines call a subroutine FFS to identify the >first bit set in an int. Is this routine in a standard library/include >file? I see oblique mention of it in PEXMACROS.H. That is a UNIX-ism. The version of libtk/getset.c that Digital delivers as part of the OpenGL example programs contains a definition: static int ffs (unsigned int mask) { int num; unsigned int bit; if (mask == 0) return 0; for (num = 1, bit = 1; (mask & bit) != 0; num++, bit <<= 1) {} return num; } >How about Open Inventor. Is there an chance that if Open GL works on the >Alpha (VMS not OSF) then Open Inventor will work? Open Inventor is not currently available for sale on OpenVMS; I can't say when or if it will be. I suggest you ask the question in comp.graphic.opengl. >Regards (and sadly confused) I am sorry that you are confused. If there is something we could be doing better with our documentation, please let us know. Andy V (Only a Digital Spoke, not a Digital Spokesperson)