From coyote@step.polymtl.ca Thu Sep 5 05:20:39 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 05 Sep 2002 05:20:43 -0700 (PDT) Received: from step.polymtl.ca (root@step.polymtl.ca [132.207.4.32]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g85CKctG005659 for ; Thu, 5 Sep 2002 05:20:39 -0700 Received: from step.polymtl.ca (nobody@localhost [127.0.0.1]) by step.polymtl.ca (8.11.6/8.11.6) with SMTP id g85COYq06498 for ; Thu, 5 Sep 2002 08:24:34 -0400 (EDT) Received: from 212.208.45.51 (SquirrelMail authenticated user coyote) by mail.step.polymtl.ca with HTTP; Thu, 5 Sep 2002 08:24:34 -0400 (EDT) Message-ID: <3026.212.208.45.51.1031228674.squirrel@mail.step.polymtl.ca> Date: Thu, 5 Sep 2002 08:24:34 -0400 (EDT) Subject: OpenInventor Solaris patch set with build instructions. From: "Vincent S. Cojot" To: X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal X-Mailer: SquirrelMail (version 1.2.5) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_20020905082434_83559" X-archive-position: 2 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: coyote@step.polymtl.ca Precedence: bulk X-list: info-inventor-dev ------=_20020905082434_83559 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello everyone, It's my first post here so please forgive me if my netiquette isn't perfect. After browsing through the list archives for a while, I came up with a patch against inventor-2.1.5-9 that lets one compile it end to end under Solaris/Sparc (tested under Solaris 8 02/02 with gcc 2.95.3). My problem with the patches previously submitted to this list was that nobody came up with a complete set which would make life a little easier for the average end-user. I integrated all of the posted patches into one big patch, wrote a README file for Solaris and a build script and I fixed a few things in the process of compiling the samples. The patch is far from perfect but at least now, on a Solaris/Sparc box, compiling inventor is as easy as: 1) meeting the software requirements (Software Companion stuff, Gnome-1.4 for freetype, OpenGL). 2) getting inventor-2.1.5-9.src.tar.gz 3) applying the patch 4) cd inventor; ./go.sh. I'm attaching the patch to this e-mail. It is also availble from http://step.polymtl.ca/~coyote/OpenInventor-2.1.5.9-Solaris.patch.gz I hope this will be useful to others. Portability: I tried to protect all code modifications with __sun__ but I didn't bother to do that for diffs to GNUmakefiles under inventor/apps/... The code can thereforce probably be integrated into the main tree but not the diffs to the makefiles. I will come up with a better patch later on but I'm posting this preliminary result here. Also, this inventor installs under /usr/local/lib, /usr/local/bin, etc.. a-la-BSD/Linux. :) So far, this build has proven as reliable as the Linux official build for me. The files that are modified/created are: inventor/README.Solaris inventor/apps/demos/SceneViewer/GNUmakefile inventor/apps/demos/drop/GNUmakefile inventor/apps/demos/gview/GNUmakefile inventor/apps/demos/maze/GNUmakefile inventor/apps/demos/noodle/GNUmakefile inventor/apps/demos/qmorf/GNUmakefile inventor/apps/demos/revo/GNUmakefile inventor/apps/demos/textomatic/GNUmakefile inventor/apps/demos/textomatic/TextWrapper.c++ inventor/apps/samples/widgets/GNUmakefile.componentTest inventor/apps/samples/widgets/MyTextureEd.c++ inventor/apps/tools/ivview/GNUmakefile inventor/go.sh inventor/lib/database/include/Inventor/SbBasic.h inventor/lib/database/include/Inventor/SbTime.h inventor/lib/database/src/sb/SbMatrix.c++ inventor/lib/database/src/so/SoInput.c++ inventor/lib/database/src/so/nodes/SoText2.c++ inventor/lib/database/src/so/nodes/SoText3.c++ inventor/lib/database/src/so/nodes/nurbs/head/mymath.h inventor/lib/interaction/src/nodekits/SoInteractionKit.c++ inventor/libSoXt/src/mixedMode/SoXtSlider.c++ inventor/libSoXt/src/mtlEdit/SoXtMtlEdit.c++ inventor/libSoXt/src/viewers/SoXtFullVwr.c++ inventor/make/commondefs inventor/make/commonrules inventor/make/ivcommondefs inventor/make/system The issues that remain are related to text: I am not sure that text displays correctly or displays at all.. Perhaps a freetype problem. Here is README.Solaris: Small HOWTO written by Vincent S. Cojot Compiled on Solaris 8/sparc 02/02 with OpenGL 1.2.3 Tested on Ultra5/PGX64 and SunBlade 2000/XVR-1000. It requires the following packages: From the Software Supplement CD: SUNWglh SUNWglrt SUNWglrtu SUNWglrtx SUNWglsr SUNWglsrx SUNWglsrz (Plus packages for your specific graphics card. Install OpenGL All packages). application SUNWglh Sun OpenGL for Solaris Header Files application SUNWglrt Sun OpenGL for Solaris Runtime Libraries application SUNWglrtu Sun OpenGL for Solaris Platform Specific Runtime Libsapplication SUNWglrtx Sun OpenGL for Solaris 64-bit Runtime Libraries application SUNWglsr Sun OpenGL for Solaris Runtime Generic Software application SUNWglsrx Sun OpenGL for Solaris 64-bit Optimized SW Rasterizerapplication SUNWglsrz Sun OpenGL for Solaris Optimized SW Rasterizer From the Solaris 8 Software Companion CD: SFWgcc SFWbison SFWflex SFWgm4 SFWgfile SFWjpg system SFWgcc gcc - GNU Compiler Collection system SFWbison GNU bison - a better yacc system SFWflex GNU flex - a lex replacement system SFWgm4 GNU m4 - macro processor system SFWgfile fileutils - GNU file management utilities system SFWjpg jpeg - The Independent JPEG Groups JPEG software From the Gnome-1.4 preview CD: SUNWftyp2 GNOME SUNWftyp2 Software Font Engine (The FreeType 2 library) Chances are that these packages depend on other packages. It is left as an exercise for the reader to satisfy the dependencies of the above packages for his/her platform. 1) Get inventor source from oss.sgi.com. 2) extract it: - cd /usr/local/src - gzip -dc inventor-2.1.5-9.src.tar.gz - cd inventor 2) Apply patch (you obviously already did if you are reading this): - gpatch -p1 -b < OpenInventor-2.1.5.9-Solaris.patch You have to use GNU patch for this to work as it will create README.Solaris 3) Compile it as: #!/bin/bash export IVROOT=/ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${IVROOT}/usr/local/lib export FREETYPE=1 gmake install 4) Run it! if you have /usr/local/lib in your LD_LIBRARY_PATH, invoke SceneViewer: /usr/local/bin/SceneViewer /usr/local/share/data/models/sgi/logo.iv 5) please report problems/enhancements/etc.. to http://oss.sgi.com, contact me for Solaris stuff if you wish. Vincent S. Cojot Wed Aug 28 14:09:25 MEST 2002 ------=_20020905082434_83559 Content-Type: application/x-gzip; name="OpenInventor-2.1.5.9-Solaris.patch.gz" Content-Disposition: attachment; filename="OpenInventor-2.1.5.9-Solaris.patch.gz" Content-Transfer-Encoding: base64 H4sICNQ9dz0CA09wZW5JbnZlbnRvci0yLjEuNS45LVNvbGFyaXMucGF0Y2gA7T37d9pGsz+7f8Xm cb6AzUu8bOOm52LADi0GrsGJc/v1+AhpAdVCUrWSHaft/35ndldCCPFK7J486kOINDszO7szOzv7 RDfGY5LVSNYl2S4xrDtqebabs11jkr9s1ZsXrdzANlXXYGFiDP7D/v7+WsK94dQnP6sWIQopKLVC AT5EOT4s/JDNZldx5UQD6hBSIUqpphzXiiVSLBSKmF30j2dfIPwR+SmZ6iGBh+wPB2QwU02TvOm9 G/bIvWt4HrXI6IG8NSwN8iSDHGnYv9se+VGzH2yP/g/zqJNzbPNh5pk5Tf0JWMCnYc8cw6Q6sS0S 1MVRnjmqq5FCMV8oknvDm5KeQ63zDlFyxVwJqIYUuHGaK9Nz1Uq+f35dLRPV0snAt05NVadYnkL+ +u1lVoGHnMit7RGX/uEbLmXEm1Iytk3TvjesCXFU7VadUFYTiGeuPeMYA3vs3asuPPiOY9IZFq3R RKzBVffdxJzK/10vfPDDpw/yibnhwxz0EXik+qbPwrxBHJc82L5LmEM1Y2xoZOKqztTQGNFUV8+R tsU8rHVZHXV4DIjTsogqiGloqmdghUoR5R9UTUCJOQXV/YZCdbnkDNTAEhlA2dYyuPQtz5hR0jFG LgBWcvHXcumbqgfvMzIICh/hu4rlh7Usq+XsyPC2lA+UtFUpz6lFXZAusIwVzLaSrOcAS+MjmPLg HblUwahdeHNXsPy4luVqXov2LNvY3LKxCaoWZiQN++zdRNPwv5HBMPuzd2OTfuDwWZn/NwZbwYff nYngzx4gv5mUT9AHf/icJefdq6Ctu/BgmlTDsi2TijzFHxKJ9yxRyYiCj4EGomraMhmXMELG35EK /3epY6oab7wJskKZopTwmiUzVXNt4ri2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+DCMV3i1tl3jA26pC947huUvAPAn ME4HTQ46IFFVSCz4XHXrFy3ephgOUomP65DkL+K55NWvNR8v9ar99gqfTfueP6MJJQtbySiRc3F4 nWh4Ki7ZPrGZjZiOUC6HsM+Y7EpoodKJJnFivmWzBT5LBVaijfH/AcTshhnnagAA ------=_20020905082434_83559-- From jlim@kinabalu.csd.sgi.com Thu Sep 5 11:14:56 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 05 Sep 2002 11:14:58 -0700 (PDT) Received: from deliverator.sgi.com (deliverator.SGI.COM [204.94.214.10] (may be forged)) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g85IEttG028149 for ; Thu, 5 Sep 2002 11:14:55 -0700 Received: from rock.csd.sgi.com (fddi-rock.csd.sgi.com [130.62.69.10]) by deliverator.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id LAA01630 for ; Thu, 5 Sep 2002 11:19:02 -0700 (PDT) mail_from (jlim@kinabalu.csd.sgi.com) Received: from kinabalu.csd.sgi.com (kinabalu.csd.sgi.com [130.62.73.96]) by rock.csd.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id LAA14672; Thu, 5 Sep 2002 11:18:52 -0700 (PDT) Received: (from jlim@localhost) by kinabalu.csd.sgi.com (SGI-8.9.3/8.9.3) id LAA45610; Thu, 5 Sep 2002 11:18:52 -0700 (PDT) From: Jonathan Lim Message-Id: <200209051818.LAA45610@kinabalu.csd.sgi.com> Subject: Re: OpenInventor Solaris patch set with build instructions. To: coyote@step.polymtl.ca (Vincent S. Cojot) Date: Thu, 5 Sep 2002 11:18:51 -0700 (PDT) Cc: info-inventor-dev@oss.sgi.com In-Reply-To: <3026.212.208.45.51.1031228674.squirrel@mail.step.polymtl.ca> from "Vincent S. Cojot" at Sep 05, 2002 08:24:34 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 3 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: jlim@sgi.com Precedence: bulk X-list: info-inventor-dev On Thu Sep 5 05:24:34 2002, coyote@step.polymtl.ca wrote: > > After browsing through the list archives for a while, I came up with a patch > against inventor-2.1.5-9 that lets one compile it end to end under > Solaris/Sparc (tested under Solaris 8 02/02 with gcc 2.95.3). A number of the makefile changes involve adding "-lXm -lXt -lX11 -lGLU -lGL" to LLDLIBS. libInventorXt.so depends on them and should be able to pull them in as needed. Jonathan Lim _ Silicon Graphics _ Mountain View GPS Graphics Computer Systems California, USA From coyote@step.polymtl.ca Thu Sep 5 12:33:12 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 05 Sep 2002 12:33:14 -0700 (PDT) Received: from step.polymtl.ca (daemon@step.polymtl.ca [132.207.4.32]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g85JXCtG031299 for ; Thu, 5 Sep 2002 12:33:12 -0700 Received: from localhost (coyote@localhost) by step.polymtl.ca (8.11.6/8.11.6) with ESMTP id g85JbGl07142; Thu, 5 Sep 2002 15:37:16 -0400 (EDT) Date: Thu, 5 Sep 2002 15:37:16 -0400 (EDT) From: Vincent Cojot To: Jonathan Lim cc: info-inventor-dev@oss.sgi.com Subject: Re: OpenInventor Solaris patch set with build instructions. In-Reply-To: <200209051818.LAA45610@kinabalu.csd.sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 4 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: coyote@step.polymtl.ca Precedence: bulk X-list: info-inventor-dev On Thu, 5 Sep 2002, Jonathan Lim wrote: > On Thu Sep 5 05:24:34 2002, coyote@step.polymtl.ca wrote: > > > > After browsing through the list archives for a while, I came up with a patch > > against inventor-2.1.5-9 that lets one compile it end to end under > > Solaris/Sparc (tested under Solaris 8 02/02 with gcc 2.95.3). > > A number of the makefile changes involve adding "-lXm -lXt -lX11 -lGLU -lGL" to > LLDLIBS. libInventorXt.so depends on them and should be able to pull them in as > needed. Hello Jonathan, Thanks for your reply... Here is what happens with SUN ld if you don't append the libs to the link line (example with noodle): root@ergoth:[/tmp/OpenInventor-2.1.5.9.2/apps/demos/noodle ]gmake /opt/sfw/bin/g++ -L//usr/local/lib -L/usr/openwin/lib NoodleSlider.o Interface.o NoodleSurfaceGizmo.o WorldInfo.o LineManip.o NoodleTextureGizmo.o noodle.o LineManipHilight.o profile.o ../../nodes/GeneralizedCylinder/NurbMaker.o ../../nodes/GeneralizedCylinder/Triangulator.o ../../nodes/GeneralizedCylinder/GeneralizedCylinder.o -lInventor -lInventorXt -o noodle Undefined first referenced symbol in file XmToggleButtonGetState Interface.o (symbol belongs to implicit dependency /lib/libXm.so.4) XmCreateLabelGadget NoodleSurfaceGizmo.o (symbol belongs to implicit dependency /lib/libXm.so.4) XmCreateText NoodleSurfaceGizmo.o (symbol belongs to implicit dependency /lib/libXm.so.4) XmCreateRowColumn noodle.o (symbol belongs to implicit dependency /lib/libXm.so.4) [....continued.....] XInternAtom noodle.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) ld: fatal: Symbol referencing errors. No output written to noodle collect2: ld returned 1 exit status gmake: *** [noodle] Error 1 A newsgroup post from Casper Dik (from SUN) explains this behaviour: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=28295c6a5d7d780d&seekm=casper.866891871%40uk-usenet.uk.sun.com#link3 [..quote....] The reason for this behaviour is simple; the implicit dependency to libnsl.so.1 may change at one point, e.g., when libsocket would become self-contained. Programs that previously relied on this implicit dependency would then fail with undefined symbols at runtime. Making the symbols from the implicit dependencies visible to other objects is therefor wrong. [..quote....] But I agree that I should set a make define (as in SUNLLDLIBS) and use SUNLLDLIBS in the makefiles instead... Do you want me to do that? Would you prefer it in a different manner? ,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-, Vincent S. Cojot, Computer Engineering. STEP project. _.,-*~'`^`'~*-,._.,-*~ Ecole Polytechnique de Montreal, Comite Micro-Informatique. _.,-*~'`^`'~*-,. Linux Xview/OpenLook resources page _.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~' http://step.polymtl.ca/~coyote _.,-*~'`^`'~*-,._ coyote@step.polymtl.ca They cannot scare me with their empty spaces Between stars - on stars where no human race is I have it in me so much nearer home To scare myself with my own desert places. - Robert Frost From coyote@step.polymtl.ca Fri Sep 6 05:29:02 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Fri, 06 Sep 2002 05:29:04 -0700 (PDT) Received: from step.polymtl.ca (root@step.polymtl.ca [132.207.4.32]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g86CT1tG026852 for ; Fri, 6 Sep 2002 05:29:02 -0700 Received: from step.polymtl.ca (nobody@localhost [127.0.0.1]) by step.polymtl.ca (8.11.6/8.11.6) with SMTP id g86CWsq15482 for ; Fri, 6 Sep 2002 08:32:54 -0400 (EDT) Received: from 212.208.45.51 (SquirrelMail authenticated user coyote) by mail.step.polymtl.ca with HTTP; Fri, 6 Sep 2002 08:32:54 -0400 (EDT) Message-ID: <1721.212.208.45.51.1031315574.squirrel@mail.step.polymtl.ca> Date: Fri, 6 Sep 2002 08:32:54 -0400 (EDT) Subject: Solaris g++/gcc: crashes in Material Editor and Color Editor.. From: "Vincent S. Cojot" To: X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal X-Mailer: SquirrelMail (version 1.2.5) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 5 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: coyote@step.polymtl.ca Precedence: bulk X-list: info-inventor-dev Hello All, I have verified this morning that textomatic doesn't display any text on SUN (with libFL.a or with freetype2).. That's unfortunate but I guess I'll investigate.. On another subject, I have noticed that "Material Editor" and "Color Editor" don't work.. At least, they crash SceneViewer. Both crashes show pretty similar backtraces (see one below).. Has anyone seen something like that..? Can anyone give me a head start about where I should start investigating into the OpenInventor source (I'm new to that huge source so I'm not too sure about where to start).. Here's the backtrace I'm seeing with gcc-2.95.3/Solaris 8 02/02 and gdb-5.0 (I'm selecting a part of the object and then I choose "Material Editor" from the menu..): PS: The "transform editor" -DOES- work and displays 5 "choosers" (no pictures, graphics, etc..) I guess that's normal but I've never used it. (gdb) set arg /usr/local/demos/data/Inventor/windmill.iv (gdb) run Starting program: /usr/local/bin/SceneViewer /usr/local/demos/data/Inventor/windmill.iv warning: Lowest section in /usr/lib/libintl.so.1 is .hash at 00000074 Reading input file...done. Program received signal SIGSEGV, Segmentation fault. 0xff2273fc in AddEventHandler () from /usr/lib/libXt.so.4 (gdb) bt #0 0xff2273fc in AddEventHandler () from /usr/lib/libXt.so.4 #1 0xff227388 in XtAddEventHandler () from /usr/lib/libXt.so.4 #2 0xff2b03f0 in SoXtMouse::enable () from /usr/local/lib/libInventorXt.so #3 0xff2ba290 in _SoXtSlider::buildWidget () from /usr/local/lib/libInventorXt.so #4 0xff2b7940 in _SoXtColorSlider::constructorCommon () from /usr/local/lib/libInventorXt.so #5 0xff2b84a4 in _SoXtColorSlider::_SoXtColorSlider () from /usr/local/lib/libInventorXt.so #6 0xff2c6fb4 in SoXtMaterialEditor::buildSlidersForm () from /usr/local/lib/libInventorXt.so #7 0xff2c7640 in SoXtMaterialEditor::buildControls () from /usr/local/lib/libInventorXt.so #8 0xff2c7c0c in SoXtMaterialEditor::buildWidget () from /usr/local/lib/libInventorXt.so #9 0xff2c678c in SoXtMaterialEditor::constructorCommon () from /usr/local/lib/libInventorXt.so #10 0xff2c986c in SoXtMaterialEditor::SoXtMaterialEditor () from /usr/local/lib/libInventorXt.so #11 0x20130 in SoSceneViewer::processTopbarEvent () #12 0xff23c374 in XtCallCallbackList () from /usr/lib/libXt.so.4 #13 0xfea85c98 in BtnUp () from /usr/lib/libXm.so.4 #14 0xfea0f8fc in _XmDispatchGadgetInput () from /usr/lib/libXm.so.4 #15 0xfeaf0a64 in _XmMenuBtnUp () from /usr/lib/libXm.so.4 #16 0xff23f32c in HandleActions () from /usr/lib/libXt.so.4 #17 0xff23e234 in HandleSimpleState () from /usr/lib/libXt.so.4 #18 0xff23dd34 in _XtTranslateEvent () from /usr/lib/libXt.so.4 #19 0xff23dab8 in XtDispatchEventToWidget () from /usr/lib/libXt.so.4 #20 0xff23d3a4 in _XtDefaultDispatcher () from /usr/lib/libXt.so.4 #21 0xff23ced8 in XtDispatchEvent () from /usr/lib/libXt.so.4 #22 0xff2e789c in SoXt::dispatchEvent () from /usr/local/lib/libInventorXt.so #23 0xff2e8334 in SoXt::mainLoop () from /usr/local/lib/libInventorXt.so #24 0x1ae0c in main () (gdb) kill Thanks for reading... Vincent From Simon.Ney@neural.home.CS.TU-Berlin.DE Fri Sep 6 09:49:57 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Fri, 06 Sep 2002 09:49:59 -0700 (PDT) Received: from Neural.Home.CS.TU-Berlin.DE (neural.home.cs.tu-berlin.de [130.149.148.105]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g86GnrtG001263 for ; Fri, 6 Sep 2002 09:49:54 -0700 Received: from neural.home.cs.tu-berlin.de (bbiss4 [130.149.148.106]) by Neural.Home.CS.TU-Berlin.DE (8.11.6+Sun/8.11.6) with ESMTP id g86Gr6G22225; Fri, 6 Sep 2002 18:53:06 +0200 (MET DST) Message-ID: <3D78DD72.350E3A67@neural.home.cs.tu-berlin.de> Date: Fri, 06 Sep 2002 18:53:06 +0200 From: Simon Ney Reply-To: Simon.Ney@neural.home.CS.TU-Berlin.DE Organization: KOMMUNIKATOR X-Mailer: Mozilla 4.77 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: de, en MIME-Version: 1.0 To: "Vincent S. Cojot" CC: info-inventor-dev@oss.sgi.com Subject: Re: Solaris g++/gcc: crashes in Material Editor and Color Editor.. References: <1721.212.208.45.51.1031315574.squirrel@mail.step.polymtl.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 6 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: Simon.Ney@neural.home.CS.TU-Berlin.DE Precedence: bulk X-list: info-inventor-dev Hi, i have also ported inventor to solaris , but to solaris 7. initial here were also a problem with textomat, but it is already fixed here. i dont know if the solution was in the textomat directory or in a library. below is the cvs diff of the textomat directory ... i believe the problem was that sgi want to iconv from UCS-2 to ISO8859-1 (default locale here). this convertion pair is not available on solaris. if have overwritten the to-codeset with UTF-8 (as workaround). here are my cvs diff of textomat (what about consolidating these diffs with the one mails some days before ?): NOTE: [1] possible only the following line is relevant (see line number in the diff): char *nl_encord = "UTF-8"; [2] i have replaced the two link scripts for the fonts with the one after "cvs diffs snip" [3] local problem here is that the color cube of the "color editor" is hidden by a other plane. [4] printing of transparent blending results in dithers version (screen door) by the "off screen renderer" i use: - Suns OpenGL on a "Ultra 1 Creator 3D" - gcc 3.2 - solaris 7 ( )imon -----------------8<----------------------------------------------------------------------- sney@bbiss7:920:{textomatic}# cvs diff -r ORIG_TAR ? textomatic cvs server: Diffing . Index: GNUmakefile =================================================================== RCS file: /var/opt/KUKisdn/cvs-repository/inventor/apps/demos/textomatic/GNUmakefile,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -r1.1.1.1 -r1.3 12a13,16 > #BBI > LLDLIBS += -lXm -lXt -lX11 -lGL > > Index: TextWrapper.c++ =================================================================== RCS file: /var/opt/KUKisdn/cvs-repository/inventor/apps/demos/textomatic/TextWrapper.c++,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -r1.1.1.1 -r1.2 74a75 > #ifdef NOBBI 75a77,79 > #else > const char *input = inbuf; > #endif 226a231 > #ifdef NOBBI 227a233,235 > #else > const char *input= inbuf; > #endif Index: textomatic.c++ =================================================================== RCS file: /var/opt/KUKisdn/cvs-repository/inventor/apps/demos/textomatic/textomatic.c++,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -r1.1.1.1 -r1.2 412a413 > #ifdef NOBBI 413a415,417 > #else > char *nl_encord = "UTF-8"; > #endif 414a419 > #ifdef NOBBI 415a421,423 > #else > fprintf( stderr, "textomatic: iconv_open error. (UCS-2)(%s)\n", nl_encord); > #endif 417a426 > #ifdef NOBBI 418a428,430 > #else > fprintf( stderr, "textomatic: iconv_open error. (UCS-2)(UCS-2)\n"); > #endif -----------------8<----------------------------------------------------------------------- #! /usr/bin/ksh IVPREFIX="/vol01/vrml/inventor-proto/usr" FROM_DIR="/usr/openwin/lib/X11/fonts/Type1" TO_DIR="${IVPREFIX}/share/data/fonts" mkdir -p ${TO_DIR} ln -s ${FROM_DIR}/Helvetica.pfa ${TO_DIR}/Helvetica ln -s ${FROM_DIR}/Times-Roman.pfa ${TO_DIR}/Times-Roman ln -s ${FROM_DIR}/UTRG____.pfa ${TO_DIR}/Utopia-Regular -----------------8<----------------------------------------------------------------------- "Vincent S. Cojot" wrote: > > Hello All, > > I have verified this morning that textomatic doesn't display any text on SUN > (with libFL.a or with freetype2).. That's unfortunate but I guess I'll > investigate.. On another subject, I have noticed that "Material Editor" and > "Color Editor" don't work.. At least, they crash SceneViewer. Both crashes > show pretty similar backtraces (see one below).. Has anyone seen something > like that..? Can anyone give me a head start about where I should start > investigating into the OpenInventor source (I'm new to that huge source so > I'm not too sure about where to start).. Here's the backtrace I'm seeing > with gcc-2.95.3/Solaris 8 02/02 and gdb-5.0 (I'm selecting a part of the > object and then I choose "Material Editor" from the menu..): > > PS: The "transform editor" -DOES- work and displays 5 "choosers" (no > pictures, graphics, etc..) I guess that's normal but I've never used it. > > (gdb) set arg /usr/local/demos/data/Inventor/windmill.iv > (gdb) run > Starting program: /usr/local/bin/SceneViewer > /usr/local/demos/data/Inventor/windmill.iv > warning: Lowest section in /usr/lib/libintl.so.1 is .hash at 00000074 > Reading input file...done. > > Program received signal SIGSEGV, Segmentation fault. > 0xff2273fc in AddEventHandler () from /usr/lib/libXt.so.4 > (gdb) bt > #0 0xff2273fc in AddEventHandler () from /usr/lib/libXt.so.4 > #1 0xff227388 in XtAddEventHandler () from /usr/lib/libXt.so.4 > #2 0xff2b03f0 in SoXtMouse::enable () from /usr/local/lib/libInventorXt.so > #3 0xff2ba290 in _SoXtSlider::buildWidget () from > /usr/local/lib/libInventorXt.so > #4 0xff2b7940 in _SoXtColorSlider::constructorCommon () from > /usr/local/lib/libInventorXt.so > #5 0xff2b84a4 in _SoXtColorSlider::_SoXtColorSlider () from > /usr/local/lib/libInventorXt.so > #6 0xff2c6fb4 in SoXtMaterialEditor::buildSlidersForm () from > /usr/local/lib/libInventorXt.so > #7 0xff2c7640 in SoXtMaterialEditor::buildControls () from > /usr/local/lib/libInventorXt.so > #8 0xff2c7c0c in SoXtMaterialEditor::buildWidget () from > /usr/local/lib/libInventorXt.so > #9 0xff2c678c in SoXtMaterialEditor::constructorCommon () from > /usr/local/lib/libInventorXt.so > #10 0xff2c986c in SoXtMaterialEditor::SoXtMaterialEditor () from > /usr/local/lib/libInventorXt.so > #11 0x20130 in SoSceneViewer::processTopbarEvent () > #12 0xff23c374 in XtCallCallbackList () from /usr/lib/libXt.so.4 > #13 0xfea85c98 in BtnUp () from /usr/lib/libXm.so.4 > #14 0xfea0f8fc in _XmDispatchGadgetInput () from /usr/lib/libXm.so.4 > #15 0xfeaf0a64 in _XmMenuBtnUp () from /usr/lib/libXm.so.4 > #16 0xff23f32c in HandleActions () from /usr/lib/libXt.so.4 > #17 0xff23e234 in HandleSimpleState () from /usr/lib/libXt.so.4 > #18 0xff23dd34 in _XtTranslateEvent () from /usr/lib/libXt.so.4 > #19 0xff23dab8 in XtDispatchEventToWidget () from /usr/lib/libXt.so.4 > #20 0xff23d3a4 in _XtDefaultDispatcher () from /usr/lib/libXt.so.4 > #21 0xff23ced8 in XtDispatchEvent () from /usr/lib/libXt.so.4 > #22 0xff2e789c in SoXt::dispatchEvent () from /usr/local/lib/libInventorXt.so > #23 0xff2e8334 in SoXt::mainLoop () from /usr/local/lib/libInventorXt.so > #24 0x1ae0c in main () > (gdb) kill > > Thanks for reading... > > Vincent -- --------------------------------------------------------------------- | Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 | | Email Simon.Ney@neural.home.cs.tu-berlin.de Fax: ++49 69 68600052 | --------------------------------------------------------------------- From Simon.Ney@neural.home.CS.TU-Berlin.DE Fri Sep 6 10:12:41 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Fri, 06 Sep 2002 10:12:42 -0700 (PDT) Received: from Neural.Home.CS.TU-Berlin.DE (neural.home.cs.tu-berlin.de [130.149.148.105]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g86HCctG001588 for ; Fri, 6 Sep 2002 10:12:39 -0700 Received: from neural.home.cs.tu-berlin.de (bbiss4 [130.149.148.106]) by Neural.Home.CS.TU-Berlin.DE (8.11.6+Sun/8.11.6) with ESMTP id g86HFvG23041; Fri, 6 Sep 2002 19:15:57 +0200 (MET DST) Message-ID: <3D78E2CD.79D9A69@neural.home.cs.tu-berlin.de> Date: Fri, 06 Sep 2002 19:15:57 +0200 From: Simon Ney Reply-To: Simon.Ney@neural.home.CS.TU-Berlin.DE Organization: KOMMUNIKATOR X-Mailer: Mozilla 4.77 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: de, en MIME-Version: 1.0 To: "Vincent S. Cojot" CC: info-inventor-dev@oss.sgi.com Subject: Re: Solaris g++/gcc: crashes in Material Editor and Color Editor.. References: <1721.212.208.45.51.1031315574.squirrel@mail.step.polymtl.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 7 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: Simon.Ney@neural.home.CS.TU-Berlin.DE Precedence: bulk X-list: info-inventor-dev Hi, see C-Lang comment ... the macro: #define SV_OFFSET(m,b) ( ((char *) (m)) - ((char *) (b)) ) calculates dynamic sub-menu entries in the "Light" menu-entry... if this fix is not applied it results in a core dump on click of "Light" menu. ( )imon -----------------8<----------------------------------------------------------------------- Index: apps/demos/SceneViewer/SoSceneMenu.h =================================================================== RCS file: /var/opt/KUKisdn/cvs-repository/inventor/apps/demos/SceneViewer/SoSceneMenu.h,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -r1.1.1.1 -r1.3 458a459 > #ifdef NOBBI 465a467,481 > #else > /** > ** BUG FIX: > ** the assembler cant calculate offset between different sections (data and bss in this case). > ** the fix is to change bss to data by initializing the struct. > ** this occurs with gcc-3.2 > **/ > static struct { > char *headlight; > char *editlight; > char *directionallight; > char *spotlight; > char *pointlight; > } Light = {"XXXhead","XXXedit","XXXdirectional","XXXspot", "XXXpoint"}; > #endif -----------------8<----------------------------------------------------------------------- "Vincent S. Cojot" wrote: > > Hello All, > > I have verified this morning that textomatic doesn't display any text on SUN > (with libFL.a or with freetype2).. That's unfortunate but I guess I'll > investigate.. On another subject, I have noticed that "Material Editor" and > "Color Editor" don't work.. At least, they crash SceneViewer. Both crashes > show pretty similar backtraces (see one below).. Has anyone seen something > like that..? Can anyone give me a head start about where I should start > investigating into the OpenInventor source (I'm new to that huge source so > I'm not too sure about where to start).. Here's the backtrace I'm seeing > with gcc-2.95.3/Solaris 8 02/02 and gdb-5.0 (I'm selecting a part of the > object and then I choose "Material Editor" from the menu..): > > PS: The "transform editor" -DOES- work and displays 5 "choosers" (no > pictures, graphics, etc..) I guess that's normal but I've never used it. > Thanks for reading... > > Vincent -- --------------------------------------------------------------------- | Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 | | Email Simon.Ney@neural.home.cs.tu-berlin.de Fax: ++49 69 68600052 | --------------------------------------------------------------------- From jamagallon@able.es Fri Sep 6 15:10:57 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Fri, 06 Sep 2002 15:10:59 -0700 (PDT) Received: from jalon.able.es (jalon.able.es [212.97.163.2]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g86MAltG019893 for ; Fri, 6 Sep 2002 15:10:55 -0700 Received: from werewolf.able.es (7296-cm.able.es [212.97.172.96]) by jalon.able.es (Netscape Messaging Server 4.15) with ESMTP id H21F6P02.Q29; Sat, 7 Sep 2002 00:16:01 +0200 Date: Sat, 7 Sep 2002 00:14:51 +0200 From: "J.A. Magallon" To: Simon.Ney@neural.home.cs.tu-berlin.de Cc: "Vincent S. Cojot" , info-inventor-dev@oss.sgi.com Subject: Re: Solaris g++/gcc: crashes in Material Editor and Color Editor.. Message-ID: <20020906221451.GI1931@werewolf.able.es> References: <1721.212.208.45.51.1031315574.squirrel@mail.step.polymtl.ca> <3D78E2CD.79D9A69@neural.home.cs.tu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3D78E2CD.79D9A69@neural.home.cs.tu-berlin.de>; from Simon.Ney@neural.home.cs.tu-berlin.de on Fri, Sep 06, 2002 at 19:15:57 +0200 X-Mailer: Balsa 1.4.0 Lines: 23 X-archive-position: 8 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: jamagallon@able.es Precedence: bulk X-list: info-inventor-dev On 2002.09.06 Simon Ney wrote: >Hi, > >see C-Lang comment ... the macro: > >#define SV_OFFSET(m,b) ( ((char *) (m)) - ((char *) (b)) ) > >calculates dynamic sub-menu entries in the "Light" menu-entry... > >if this fix is not applied it results in a core dump on click of "Light" >menu. > Can you post the piece of code that uses SV_OFFSET and bombs ? TIA -- J.A. Magallon \ Software is like sex: werewolf.able.es \ It's better when it's free Mandrake Linux release 9.0 (Cooker) for i586 Linux 2.4.20-pre5-jam1 (gcc 3.2 (Mandrake Linux 9.0 3.2-1mdk)) From Simon.Ney@neural.home.CS.TU-Berlin.DE Sat Sep 7 01:07:11 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Sat, 07 Sep 2002 01:07:14 -0700 (PDT) Received: from Neural.Home.CS.TU-Berlin.DE (neural.home.cs.tu-berlin.de [130.149.148.105]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g87877tG029106 for ; Sat, 7 Sep 2002 01:07:08 -0700 Received: from neural.home.cs.tu-berlin.de (bbiss4 [130.149.148.106]) by Neural.Home.CS.TU-Berlin.DE (8.11.6+Sun/8.11.6) with ESMTP id g8785bG04225; Sat, 7 Sep 2002 10:05:37 +0200 (MET DST) Message-ID: <3D79B350.FEBB6DFD@neural.home.cs.tu-berlin.de> Date: Sat, 07 Sep 2002 10:05:36 +0200 From: Simon Ney Reply-To: Simon.Ney@neural.home.CS.TU-Berlin.DE Organization: KOMMUNIKATOR X-Mailer: Mozilla 4.77 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: de, en MIME-Version: 1.0 To: "J.A. Magallon" CC: "Vincent S. Cojot" , info-inventor-dev@oss.sgi.com Subject: Re: Solaris g++/gcc: crashes in Material Editor and Color Editor.. References: <1721.212.208.45.51.1031315574.squirrel@mail.step.polymtl.ca> <3D78E2CD.79D9A69@neural.home.cs.tu-berlin.de> <20020906221451.GI1931@werewolf.able.es> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 9 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: Simon.Ney@neural.home.CS.TU-Berlin.DE Precedence: bulk X-list: info-inventor-dev Hi, # find . -type f | xargs grep -l SV_OFFSET ./apps/demos/SceneViewer/SoSceneMenu.h # find . -type f | xargs grep -l SoSceneMenu.h ./apps/demos/SceneViewer/SoSceneViewer.c++ SV_OFFSET is used to construct "XtResource intl_light_resources[]" data structures in SoSceneMenu.h this data is used by the "X-Window system" when the widget (i think is was a form-widget) is created. it is not possible to calculate offsets between different "memory sections" e.g. offset between unitialized and initialized data because uninitialized data goes into "bss section" and initialied goes into "data section". the assembler cant calculate and static remember the delta because "the link editor" or "runtime linker" later defines the addresses. i believe this is only a gcc (possible only gcc 3.2 and 3.x) problem ?!? the bomb origin is not in "code" its in "data" ... but as i remember the last "program counter" inside of inventor is in "SoSceneViewer.c++" in the method "SoSceneViewer::menuDisplay" near the "case SV_LIGHT:" at function call "strcat" if you simple comment-out the resource definitions inside "{}" of "XtResource intl_light_resources[]". you must be careful because the make-dependencies may now recognize the changes in the header file ... ?!? here a greater scope of the fix (SoSceneMenu.h) ... look at the second usage of SV_OFFSET and the "(char *)NULL" in "lightData[]" ...: -----------------8<---------8<---------8<------------------------ static SoSceneViewerButton lightData[] = { {"Create Dir Light", SV_LIGHT_ADD_DIRECT, SV_PUSH_BUTTON, 0, 0}, {"Create Point Light", SV_LIGHT_ADD_POINT, SV_PUSH_BUTTON, 0, 0}, {"Create Spot Light", SV_LIGHT_ADD_SPOT, SV_PUSH_BUTTON, 0, 0}, {0, 0, SV_SEPARATOR }, {(char *)NULL, SV_LIGHT_AMBIENT_EDIT, SV_PUSH_BUTTON, 0, 0}, {0, 0, SV_SEPARATOR }, {"Turn all ON", SV_LIGHT_TURN_ON, SV_PUSH_BUTTON, 0, 0}, {"Turn all OFF", SV_LIGHT_TURN_OFF, SV_PUSH_BUTTON, 0, 0}, {"Show all Icons", SV_LIGHT_SHOW_ALL, SV_PUSH_BUTTON, 0, 0}, {"Hide all Icons", SV_LIGHT_HIDE_ALL, SV_PUSH_BUTTON, 0, 0}, {0, 0, SV_SEPARATOR }, }; #ifdef NOBBI static struct { char *headlight; char *editlight; char *directionallight; char *spotlight; char *pointlight; } Light; #else /** ** BUG FIX: ** the assembler cant calculate offset between different sections (data and bss in this case). ** the fix is to change bss to data by initializing the struct. ** this occurs with gcc-3.2 **/ static struct { char *headlight; char *editlight; char *directionallight; char *spotlight; char *pointlight; } Light = {"XXXhead","XXXedit","XXXdirectional","XXXspot", "XXXpoint"}; #endif XtResource intl_light_resources[] = { { "ambientLighting", NULL, XtRString, sizeof(XtRString), (Cardinal) SV_OFFSET(&lightData[4].name, &lightData[0]), XtRString, (XtPointer) "Ambient Lighting...",}, { "headlight", NULL, XtRString, sizeof(XtRString), (Cardinal) SV_OFFSET(&Light.headlight, &lightData[0]), XtRString, (XtPointer) "Headlight ",}, { "editlight", NULL, XtRString, sizeof(XtRString), (Cardinal) SV_OFFSET(&Light.editlight, &lightData[0]), XtRString, (XtPointer) "Edit",}, { "directionallight", NULL, XtRString, sizeof(XtRString), (Cardinal) SV_OFFSET(&Light.directionallight, &lightData[0]), XtRString, (XtPointer) "Directional ",}, -----------------8<---------8<---------8<------------------------ NOTE: "NOBBI" should be undefined ( )imon "J.A. Magallon" wrote: > > On 2002.09.06 Simon Ney wrote: > >Hi, > > > >see C-Lang comment ... the macro: > > > >#define SV_OFFSET(m,b) ( ((char *) (m)) - ((char *) (b)) ) > > > >calculates dynamic sub-menu entries in the "Light" menu-entry... > > > >if this fix is not applied it results in a core dump on click of "Light" > >menu. > > > > Can you post the piece of code that uses SV_OFFSET and bombs ? > > TIA > > -- > J.A. Magallon \ Software is like sex: > werewolf.able.es \ It's better when it's free > Mandrake Linux release 9.0 (Cooker) for i586 > Linux 2.4.20-pre5-jam1 (gcc 3.2 (Mandrake Linux 9.0 3.2-1mdk)) -- --------------------------------------------------------------------- | Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 | | Email Simon.Ney@neural.home.cs.tu-berlin.de Fax: ++49 69 68600052 | --------------------------------------------------------------------- From jamagallon@able.es Mon Sep 9 07:17:00 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Mon, 09 Sep 2002 07:17:03 -0700 (PDT) Received: from jalon.able.es (jalon.able.es [212.97.163.2]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g89EGvtG007120 for ; Mon, 9 Sep 2002 07:16:59 -0700 Received: from werewolf.able.es (7296-cm.able.es [212.97.172.96]) by jalon.able.es (Netscape Messaging Server 4.15) with ESMTP id H26D9A01.YD3; Mon, 9 Sep 2002 16:22:22 +0200 Date: Mon, 9 Sep 2002 16:20:46 +0200 From: "J.A. Magallon" To: Simon.Ney@neural.home.CS.TU-Berlin.DE Cc: "Vincent S. Cojot" , info-inventor-dev@oss.sgi.com Subject: Re: Solaris g++/gcc: crashes in Material Editor and Color Editor.. Message-ID: <20020909142046.GA1664@werewolf.able.es> References: <1721.212.208.45.51.1031315574.squirrel@mail.step.polymtl.ca> <3D78E2CD.79D9A69@neural.home.cs.tu-berlin.de> <20020906221451.GI1931@werewolf.able.es> <3D79B350.FEBB6DFD@neural.home.cs.tu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3D79B350.FEBB6DFD@neural.home.cs.tu-berlin.de>; from Simon.Ney@neural.home.CS.TU-Berlin.DE on Sat, Sep 07, 2002 at 10:05:36 +0200 X-Mailer: Balsa 1.4.0 Lines: 58 X-archive-position: 10 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: jamagallon@able.es Precedence: bulk X-list: info-inventor-dev On 2002.09.07 Simon Ney wrote: >Hi, > ># find . -type f | xargs grep -l SV_OFFSET >./apps/demos/SceneViewer/SoSceneMenu.h > ># find . -type f | xargs grep -l SoSceneMenu.h >./apps/demos/SceneViewer/SoSceneViewer.c++ > > >SV_OFFSET is used to construct "XtResource intl_light_resources[]" data >structures in SoSceneMenu.h >this data is used by the "X-Window system" when the widget (i think is >was a form-widget) is created. > >it is not possible to calculate offsets between different "memory >sections" [...] > { "ambientLighting", NULL, XtRString, sizeof(XtRString), > (Cardinal) SV_OFFSET(&lightData[4].name, &lightData[0]), OK ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > XtRString, (XtPointer) "Ambient Lighting...",}, > { "headlight", NULL, XtRString, sizeof(XtRString), > (Cardinal) SV_OFFSET(&Light.headlight, &lightData[0]), ???? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > XtRString, (XtPointer) "Headlight ",}, What I do not understand is who the he** wrote this. Taking an offset betwwen two different global variables (ie, not in stack or in the same struct) is at best non portable (dependent on compiler-linker behaviour) and probably _wrong_. If both 'light_data' and 'Light' are preference data for the app, put both into a struct: struct LightData { char *headlight; ... } static struct { static SoSceneViewerButton lightData[]; LightData Light; } prefs = { { {"Create Dir Light",SV_LIGHT_ADD_DIRECT,SV_PUSH_BUTTON,0,0}, ... }, { "XXXhead","XXXedit","XXXdirectional","XXXspot", "XXXpoint" } }; -- J.A. Magallon \ Software is like sex: werewolf.able.es \ It's better when it's free Mandrake Linux release 9.0 (Cooker) for i586 Linux 2.4.20-pre5-jam1 (gcc 3.2 (Mandrake Linux 9.0 3.2-1mdk)) From Karen.Schuchardt@pnl.gov Mon Sep 9 10:25:32 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Mon, 09 Sep 2002 10:25:37 -0700 (PDT) Received: from relay.pnl.gov (relay.pnl.gov [130.20.128.34]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g89HPVtG016672 for ; Mon, 9 Sep 2002 10:25:31 -0700 Received: from odyssey.emsl.pnl.gov ([198.128.85.53]) by pnl.gov (PMDF V5.2-33 #42505) with ESMTP id <01KMAL11HICA8WWF0P@pnl.gov> for info-inventor-dev@oss.sgi.com; Mon, 9 Sep 2002 10:28:59 PDT Received: from pnl.gov (adonis.emsl.pnl.gov [198.128.87.105]) by odyssey.emsl.pnl.gov (8.8.8+Sun/8.8.5) with ESMTP id KAA16690 for ; Mon, 09 Sep 2002 10:28:58 -0700 (PDT) Date: Mon, 09 Sep 2002 10:28:58 -0700 From: Karen Schuchardt Subject: sun overlays and transparent color To: info-inventor-dev@oss.sgi.com Message-id: <3D7CDA5A.D827CB22@pnl.gov> Organization: Pacific Northwest Laboratory MIME-version: 1.0 X-Mailer: Mozilla 4.73 [en] (X11; U; SunOS 5.6 sun4u) Content-type: multipart/mixed; boundary="------------BE12CFF0C221AC9071EBCA38" X-Accept-Language: en X-archive-position: 11 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: Karen.Schuchardt@pnl.gov Precedence: bulk X-list: info-inventor-dev This is a multi-part message in MIME format. --------------BE12CFF0C221AC9071EBCA38 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit A while ago the following code was added to SoXtRendrArea.c++ as a fix for aix (see http://oss.sgi.com/projects/inventor/mail/info-inventor-dev/msg00410.html). The code follows: #ifdef GLX_TRANSPARENT_INDEX_VALUE_EXT if (vis != NULL) { int index; glXGetConfig(XtDisplay(parent), vis, GLX_TRANSPARENT_INDEX_VALUE_EXT, &index); overlaySceneMgr->setBackgroundIndex(index); } #endif On Sun's (or at least on the systems we have here) the call returns GLX_BAD_ATTRIBUTE and the background index is set to whatever arbitrary value it was assigned when declared. Sun has some example code to get the transparent color (provide to my by Simon Ney). There are a couple of ways two do this. One way requires the widgets to be realized (to get the X Window) so this method cannot be used inside XtSoRendrArea. The other way uses the SERVER_OVERLAY_VISUALS. I put this into my version of SoXtRendrArea and it works. The code is ifdef'd on __sun__ in two places - at the top for some delcaration and in the buildWidget method. Hopefully this can get added to the code base. I've made these changes to the 2.1.5-9 code base. If anybody has a better way, I'd be interested in it as always. regards, Karen --------------BE12CFF0C221AC9071EBCA38 Content-Type: text/plain; charset=us-ascii; name="SoXtRendrArea.c++" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="SoXtRendrArea.c++" /* * * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * Further, this software is distributed without any warranty that it is * free of the rightful claim of any third person regarding infringement * or the like. Any license provided herein, whether implied or * otherwise, applies only to this software file. Patent licenses, if * any, provided herein do not apply to combinations of this program with * other software, or any other product whatsoever. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA 94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ * */ /* * Copyright (C) 1990-93 Silicon Graphics, Inc. * _______________________________________________________________________ ______________ S I L I C O N G R A P H I C S I N C . ____________ | | $Revision: 1.1.1.1 $ | | Classes: | SoXtRenderArea | | Author(s): David Mott, Alain Dumesny | ______________ S I L I C O N G R A P H I C S I N C . ____________ _______________________________________________________________________ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static char *thisClassName = "SoXtRenderArea"; #ifdef __sun__ /* * This should be CARD64 but CARD64 is not available * with Solaris 2.5.1 so 'long' is used instead. */ #define SOV_CARD long typedef struct { SOV_CARD visualID; SOV_CARD trans_type; SOV_CARD transPixel; SOV_CARD layer; } SovPropFormat; #endif //////////////////////////////////////////////////////////////////////// // // Public constructor - build the widget right now // SoXtRenderArea::SoXtRenderArea( Widget parent, const char *name, SbBool buildInsideParent, SbBool getMouseInput, SbBool getKeyboardInput) : SoXtGLWidget( parent, name, buildInsideParent, SO_GLX_RGB | SO_GLX_DOUBLE | SO_GLX_ZBUFFER | SO_GLX_OVERLAY, FALSE) // tell GLWidget not to build just yet // //////////////////////////////////////////////////////////////////////// { // In this case, render area is what the app wants, so buildNow = TRUE constructorCommon(getMouseInput, getKeyboardInput, TRUE); } //////////////////////////////////////////////////////////////////////// // // SoEXTENDER constructor - the subclass tells us whether to build or not // SoXtRenderArea::SoXtRenderArea( Widget parent, const char *name, SbBool buildInsideParent, SbBool getMouseInput, SbBool getKeyboardInput, SbBool buildNow) : SoXtGLWidget( parent, name, buildInsideParent, SO_GLX_RGB | SO_GLX_DOUBLE | SO_GLX_ZBUFFER | SO_GLX_OVERLAY, FALSE) // tell GLWidget not to build just yet // //////////////////////////////////////////////////////////////////////// { // In this case, render area may be what the app wants, // or it may want a subclass of render area. Pass along buildNow // as it was passed to us. constructorCommon(getMouseInput, getKeyboardInput, buildNow); } //////////////////////////////////////////////////////////////////////// // // Called by the constructors // // private // void SoXtRenderArea::constructorCommon( SbBool getMouseInput, SbBool getKeyboardInput, SbBool buildNow) // //////////////////////////////////////////////////////////////////////// { addVisibilityChangeCallback(visibilityChangeCB, this); setClassName(thisClassName); firstEvent = TRUE; // set up the device list deviceList = new SbPList; // default devices if (getMouseInput) { mouseDevice = new SoXtMouse(); deviceList->append(mouseDevice); } else mouseDevice = NULL; if (getKeyboardInput) { keybdDevice = new SoXtKeyboard(); deviceList->append(keybdDevice); } else keybdDevice = NULL; // local vars clearFirst = TRUE; clearOverlayFirst = TRUE; autoRedraw = TRUE; selection = overlaySelection = NULL; deviceWidget = NULL; setSize(SbVec2s(400, 400)); // default size setBorder(TRUE); // inventor specific variables appEventHandler = NULL; // the scene manager can be supplied by a subclass., sceneMgr = new SoSceneManager(); sceneMgr->setRenderCallback(renderCB, this); // the overlay scene manager is supplied right here. overlaySceneMgr = new SoSceneManager(); overlaySceneMgr->setRenderCallback(renderOverlayCB, this); // color map variables mapColors = overlayMapColors = NULL; mapColorNum = overlayMapColorNum = 0; // Build the widget tree, and let SoXtComponent know about our base widget. if (buildNow) setBaseWidget(buildWidget(getParentWidget())); } //////////////////////////////////////////////////////////////////////// // // Destructor // SoXtRenderArea::~SoXtRenderArea() // //////////////////////////////////////////////////////////////////////// { // Remove our callback from old selection node if (selection != NULL) { selection->removeChangeCallback(SoXtRenderArea::selectionChangeCB, this); // Unref the old selection node selection->unref(); } unregisterWidget(getGlxMgrWidget()); if (mapColors != NULL) free(mapColors); if (overlayMapColors != NULL) free(overlayMapColors); if (mouseDevice != NULL) delete mouseDevice; if (keybdDevice != NULL) delete keybdDevice; delete sceneMgr; delete overlaySceneMgr; delete deviceList; //??? delete the mouse and keybd if we created them! } //////////////////////////////////////////////////////////////////////// // // Description: // Make the new user supplied scene graph the rendering root. // // use: virtual public // void SoXtRenderArea::setSceneGraph(SoNode *newScene) // //////////////////////////////////////////////////////////////////////// { // Deactivate while we change the scene so that our sensors // get unhooked before the data changes beneath us. sceneMgr->deactivate(); sceneMgr->setSceneGraph(newScene); // draw new scene graphs to the front buffer by default since // the scene will be different (we might has well see something // happening for the first redraw). if (isDrawToFrontBufferEnable()) drawToFrontBuffer = TRUE; // we activate only if we are visible. // after all, if we're not on screen, the visibility change // callback will invoke activate() once we are on screen. if (isVisible() && autoRedraw) { sceneMgr->activate(); sceneMgr->scheduleRedraw(); } } //////////////////////////////////////////////////////////////////////// // // Description: // sets the overlay plane scene graph. // // use: public // void SoXtRenderArea::setOverlaySceneGraph(SoNode *newScene) // //////////////////////////////////////////////////////////////////////// { if (! getOverlayWidget()) return; // Deactivate while we change the scene so that our sensors // get unhooked before the data changes beneath us. overlaySceneMgr->deactivate(); overlaySceneMgr->setSceneGraph(newScene); // we activate only if we are visible. // after all, if we're not on screen, the visibility change // callback will invoke activate() once we are on screen. if (isVisible() && autoRedraw) { overlaySceneMgr->activate(); overlaySceneMgr->scheduleRedraw(); } } //////////////////////////////////////////////////////////////////////// // // Description: // Return the rendering root. // // use: public, virtual // SoNode * SoXtRenderArea::getSceneGraph() // //////////////////////////////////////////////////////////////////////// { return sceneMgr->getSceneGraph(); } //////////////////////////////////////////////////////////////////////// // // Description: // Loads the color map with the given colors. // // use: public // void SoXtRenderArea::setColorMap(int startIndex, int num, const SbColor *colors) // //////////////////////////////////////////////////////////////////////// { // save those colors for future uses (if the widget hasn't been // built yet, or next time it gets built) if (mapColors != NULL) free(mapColors); mapColors = (XColor *) malloc(sizeof(XColor) * num); mapColorNum = num; XColor *xcol = mapColors; for (int i=0; ired = (unsigned short) (colors[i][0] * 65535); xcol->green = (unsigned short) (colors[i][1] * 65535); xcol->blue = (unsigned short) (colors[i][2] * 65535); xcol->flags = DoRed|DoGreen|DoBlue; xcol->pixel = startIndex + i; } // now load those colors into the color map if (colorMap != 0) XStoreColors(getDisplay(), colorMap, mapColors, mapColorNum); } //////////////////////////////////////////////////////////////////////// // // Description: // Loads the overlay color map with the given colors. // // use: public // void SoXtRenderArea::setOverlayColorMap(int startIndex, int num, const SbColor *colors) // //////////////////////////////////////////////////////////////////////// { if (! getOverlayWidget()) return; // save those colors for future uses (if the widget hasn't been // built yet, or next time it gets built) if (overlayMapColors != NULL) free(overlayMapColors); overlayMapColors = (XColor *) malloc(sizeof(XColor) * num); overlayMapColorNum = num; XColor *xcol = overlayMapColors; for (int i=0; ired = (unsigned short) (colors[i][0] * 65535); xcol->green = (unsigned short) (colors[i][1] * 65535); xcol->blue = (unsigned short) (colors[i][2] * 65535); xcol->flags = DoRed|DoGreen|DoBlue; xcol->pixel = startIndex + i; } // now load those colors into the color map if (overlayColorMap != 0) XStoreColors(getDisplay(), overlayColorMap, overlayMapColors, overlayMapColorNum); } //////////////////////////////////////////////////////////////////////// // // Description: // Sets the transparency type // // use: public // void SoXtRenderArea::setTransparencyType(SoGLRenderAction::TransparencyType type) // //////////////////////////////////////////////////////////////////////// { sceneMgr->getGLRenderAction()->setTransparencyType(type); sceneMgr->scheduleRedraw(); } //////////////////////////////////////////////////////////////////////// // // Just call buildWidget on the base class (SoXtGLWidget). // // use: protected // Widget SoXtRenderArea::buildWidget(Widget parent) // //////////////////////////////////////////////////////////////////////// { // Have the parent class build the mgrWidget. // Register the class here, though, since this is where resources // are needed (other GL widgets don't have resources) SoXtGLWidget::buildWidget(parent); registerWidget(getGlxMgrWidget()); // get the resources for this component SoXtResource xr(getGlxMgrWidget()); SbColor c; if (xr.getResource("backgroundColor", "BackgroundColor", c)) setBackgroundColor(c); // get the transparent color index XVisualInfo *vis = getOverlayVisual(); #ifdef GLX_TRANSPARENT_INDEX_VALUE_EXT if (vis != NULL) { int index = 0; int type = glXGetConfig(XtDisplay(parent), vis, GLX_TRANSPARENT_INDEX_VALUE_EXT, &index); if (type != GLX_BAD_ATTRIBUTE) { overlaySceneMgr->setBackgroundIndex(index); } else { #ifdef __sun__ // Taken from sun's ogl_overlay_ex3 source. This code should really // only be executed if type in the block above returns // GLX_BAD_ATTRIBUTE. if (vis) { Boolean gotit = False; // Get the SERVER_OVERLAY_VISUALS atom Display *dpy = XtDisplay(getGlxMgrWidget()); Atom sov_atom = XInternAtom(dpy, "SERVER_OVERLAY_VISUALS", True); if (sov_atom == None) { printf("Cannot create an atom for SERVER_OVERLAY_VISUALS\n"); } else { // If we got an Atom, then get the SOV data int actualFormat; unsigned long sizeData; unsigned long bytesLeft; Atom actualType; SovPropFormat *propArray; if (XGetWindowProperty(dpy, DefaultRootWindow(dpy), sov_atom,0, 10000, False, sov_atom, &actualType, &actualFormat, &sizeData, &bytesLeft, (unsigned char**) &propArray) == Success) { if (actualType == sov_atom) { // How many did we get? int n = sizeData / (sizeof(SovPropFormat) / sizeof(SOV_CARD)); for (int i = 0; i < n; i++) { SovPropFormat *p = propArray + i; // We are interested in the one with the visual id that // matches the overlay visual that has already been // created. if (p->visualID == vis->visualid) { SovPropFormat *sovinfo = p; overlaySceneMgr->setBackgroundIndex( sovinfo->transPixel); gotit = True; break; } } } } } if (!gotit) { // Dump out some sort of warning to the user. If overlay // transparent color doesn't work, they can at least turn // overlays off altogether. fprintf(stderr,"Unable to get transparency color for overlay.\n"); fprintf(stderr,"set the IV_NO_OVERLAY environment variable to\n"); fprintf(stderr,"totally disable overlays\n"); } } #endif } } #endif return getGlxMgrWidget(); } //////////////////////////////////////////////////////////////////////// // // Called by the base class when the frontmost widget changes // (i.e. from single -> double buffer or vice versa). // // use: virtual protected // void SoXtRenderArea::widgetChanged(Widget newWidget) // //////////////////////////////////////////////////////////////////////// { // init the render actions whenever we change windows if (newWidget) sceneMgr->reinitialize(); // // Work around bug #164424 // if we don't use the overlay window, register the devices/handler // on the new normal widget. // if (! getOverlayWidget()) reinstallDevices(newWidget); } //////////////////////////////////////////////////////////////////////// // // Register interest to handle events for the passed device. // If device is already in the list, then make sure it's enabled. // // use: public // void SoXtRenderArea::registerDevice(SoXtDevice *device) // //////////////////////////////////////////////////////////////////////// { // Add the device if it's not already in the list of devices int index = deviceList->find(device); // ??? mott, shouldn't we return if the device is found ? if (index == -1) deviceList->append(device); // tell the device the window size device->setWindowSize(getGlxSize()); // Tell the device to register event interest for our widget Widget w = getOverlayWidget() ? getOverlayWidget() : getNormalWidget(); if ((w != NULL) && (XtWindow(w) != (Window) NULL)) device->enable( w, (XtEventHandler) SoXtGLWidget::eventHandler, (XtPointer) this, XtWindow(w)); } //////////////////////////////////////////////////////////////////////// // // Unregister interest in the passed device. // // use: public // void SoXtRenderArea::unregisterDevice(SoXtDevice *device) // //////////////////////////////////////////////////////////////////////// { // Find the device in our device list int index = deviceList->find(device); if (index == -1) return; // Remove the device from the list of devices deviceList->remove(index); // Tell the device to register event interest for our widget Widget w = getOverlayWidget() ? getOverlayWidget() : getNormalWidget(); if (w) device->disable( w, (XtEventHandler) SoXtGLWidget::eventHandler, (XtPointer) this); } //////////////////////////////////////////////////////////////////////// // // disable devices on the old widget, and enables them on the new widget. // // use: private // void SoXtRenderArea::reinstallDevices(Widget newWidget) // //////////////////////////////////////////////////////////////////////// { for (int i = 0; i < deviceList->getLength(); i++) { SoXtDevice *device = (SoXtDevice *) (*deviceList)[i]; // disable on the old widget... if (deviceWidget) device->disable( deviceWidget, (XtEventHandler) SoXtGLWidget::eventHandler, (XtPointer) this); // enable on the new widget.... if (newWidget) { device->setWindowSize(getGlxSize()); device->enable( newWidget, (XtEventHandler) SoXtGLWidget::eventHandler, (XtPointer) this, XtWindow(newWidget)); } } // ??? add an event handler to receive EnterNotify events to make // ??? sure the render area has the current keyboard focus, otherwise // ??? keyboard events will go to whichever text field has focus (black // ??? outline around widget). This is the prefered behavior since we // ??? don't want to force the keyboardFocus to be POINTER or require // ??? the user to press a mouse button down. // // We also need a EnterNotify and LeaveNotify to correctly update // stuff for SoLocateHighlight (keep track of current window). // if (deviceWidget) XtRemoveEventHandler(deviceWidget, (EnterWindowMask | LeaveWindowMask), FALSE, (XtEventHandler) SoXtRenderArea::windowEventCB, (XtPointer) this); if (newWidget) XtAddEventHandler(newWidget, (EnterWindowMask | LeaveWindowMask), FALSE, (XtEventHandler) SoXtRenderArea::windowEventCB, (XtPointer) this); deviceWidget = newWidget; } //////////////////////////////////////////////////////////////////////// // // Description: // Invoke the app callback and return what the callback returns. // // use: protected // SbBool SoXtRenderArea::invokeAppCB(XAnyEvent *anyevent) // //////////////////////////////////////////////////////////////////////// { // if app wants event, send event to application if (appEventHandler != NULL) return (*appEventHandler)(appEventHandlerData, anyevent); else return FALSE; } //////////////////////////////////////////////////////////////////////// // // Description: // Process the passed X event. // // use: virtual protected // void SoXtRenderArea::processEvent(XAnyEvent *anyevent) // //////////////////////////////////////////////////////////////////////// { // check if app wants the event... if (invokeAppCB(anyevent)) return; // ...else send it to the scene // to do this, translate the X event to an SoEvent // by finding a device to perform the translation const SoEvent *soevent = NULL; for (int i = 0; (soevent == NULL) && (i < deviceList->getLength()); i++) { SoXtDevice *device = (SoXtDevice *) (*deviceList)[i]; soevent = device->translateEvent(anyevent); } // no device found, so return... if (! soevent) return; // now send the event first to the overlay scene graph, elses to // the regular scene graph. SbBool handled = overlaySceneMgr->processEvent(soevent); if (! handled) { sceneMgr->processEvent(soevent); // now check to make sure that we updated the handle event action // with the current window the very first time. This is needed // because the SoState does not exists until the action is // applied, and we only update those during enter/leave notify. if (firstEvent) { SoState *state = sceneMgr->getHandleEventAction()->getState(); if (state) { SoWindowElement::set(state, getNormalWindow(), getNormalContext(), getDisplay(), getGLRenderAction()); firstEvent = FALSE; } } } } //////////////////////////////////////////////////////////////////////// // // Initialize the GLX window for rendering. // glXMakeCurrent() should have been called before invoking this routine. // // use: virtual protected // void SoXtRenderArea::initGraphic() // //////////////////////////////////////////////////////////////////////// { sceneMgr->reinitialize(); sceneMgr->setRGBMode(isRGBMode()); SoGLRenderAction *ra = sceneMgr->getGLRenderAction(); ra->setCacheContext(getDisplayListShareGroup(getNormalContext())); ra->setRenderingIsRemote(!glXIsDirect(getDisplay(), getNormalContext())); // load the color map if (! isRGBMode() && colorMap != 0 && mapColorNum != 0) XStoreColors(getDisplay(), colorMap, mapColors, mapColorNum); } //////////////////////////////////////////////////////////////////////// // // Initialize the GLX window for rendering. // glXMakeCurrent() should have been called before invoking this routine. // // use: virtual protected // void SoXtRenderArea::initOverlayGraphic() // //////////////////////////////////////////////////////////////////////// { overlaySceneMgr->reinitialize(); overlaySceneMgr->setRGBMode(FALSE); SoGLRenderAction *ra = overlaySceneMgr->getGLRenderAction(); ra->setCacheContext(getDisplayListShareGroup(getOverlayContext())); ra->setRenderingIsRemote(!glXIsDirect(getDisplay(), getOverlayContext())); // load the color map if (overlayColorMap != 0 && overlayMapColorNum != 0) XStoreColors(getDisplay(), overlayColorMap, overlayMapColors, overlayMapColorNum); // enable the devices on the overlay window reinstallDevices(getOverlayWidget()); } //////////////////////////////////////////////////////////////////////// // // Called by the base class (SoXtGLWidget) when the widget has changed size. // // use: virtual protected // void SoXtRenderArea::sizeChanged(const SbVec2s &newSize) // //////////////////////////////////////////////////////////////////////// { sceneMgr->setWindowSize(newSize); overlaySceneMgr->setWindowSize(newSize); // tell each device the new window size for (int i = 0; i < deviceList->getLength(); i++) { SoXtDevice *device = (SoXtDevice *) (*deviceList)[i]; device->setWindowSize(newSize); } } //////////////////////////////////////////////////////////////////////// // // Attach the sensor (if necessary). // // use: private // void SoXtRenderArea::activate() // //////////////////////////////////////////////////////////////////////// { // if autoRedraw is off, then don't attach the scene sensor if (! autoRedraw) return; // Activate the scene manager sceneMgr->activate(); overlaySceneMgr->activate(); } //////////////////////////////////////////////////////////////////////// // // Detach the sensor. // // use: private // void SoXtRenderArea::deactivate() // //////////////////////////////////////////////////////////////////////// { // detach sensors sceneMgr->deactivate(); overlaySceneMgr->deactivate(); } //////////////////////////////////////////////////////////////////////// // // Turn auto-redraw on or off. If turning on, then activate the scene // sensor. // // use: public // void SoXtRenderArea::setAutoRedraw(SbBool flag) // //////////////////////////////////////////////////////////////////////// { if (flag == autoRedraw) return; autoRedraw = flag; if (autoRedraw) { if (isVisible()) activate(); } else deactivate(); } //////////////////////////////////////////////////////////////////////// // // Have the scene manager redraw the scene. // // use: virtual protected // void SoXtRenderArea::actualRedraw() // //////////////////////////////////////////////////////////////////////// { sceneMgr->render(clearFirst); } //////////////////////////////////////////////////////////////////////// // // Have the scene manager redraw the overlay scene. // // use: virtual protected // void SoXtRenderArea::actualOverlayRedraw() // //////////////////////////////////////////////////////////////////////// { overlaySceneMgr->render(clearOverlayFirst); } //////////////////////////////////////////////////////////////////////// // // This routine draws the scene graph (called by expose events and the // scene graph sensor) // // use: virtual protected // void SoXtRenderArea::redraw() // //////////////////////////////////////////////////////////////////////// { // return if we are not visible or if we need to wait for an expose // event (case when the sensor triggers but we know that an expose // event will come along and we don't want 2 redraws). if (!isVisible() || waitForExpose) return; // set the window glXMakeCurrent(getDisplay(), getNormalWindow(), getNormalContext()); // see if we need to temporary draw to the front buffer (which // is set when we display a new scene or get an expose event) if (drawToFrontBuffer && isDrawToFrontBufferEnable() && isDoubleBuffer()) { // ??? workaround bug 301010 - it seems that redrawing to the front // ??? of a window that might not be on the screen ( isVisible() might // ??? be incorect in a few cases) will confuse the GFX hardware // ??? of some machine (Xtrem and Indy24). // // ??? Note: this also fixes 298058 (redrawing to the front window // ??? on indigo starter gfx, which happened all the time). // if (isRGBMode()) { SbColor color = getBackgroundColor(); glClearColor(color[0], color[1], color[2], 0); } else glClearIndex(getBackgroundIndex()); glClear(GL_COLOR_BUFFER_BIT); glXSwapBuffers(getDisplay(), getNormalWindow()); // ??? end of BUG workaround glReadBuffer(GL_FRONT); // Needed for acbuf antialiasing glDrawBuffer(GL_FRONT); } // draw that scene! (subclasses may redefine...) actualRedraw(); // swap those buffers! if (isDoubleBuffer()) { if (drawToFrontBuffer && isDrawToFrontBufferEnable()) { // no need to swap here - instead restore the buffer and // clear the flag now that we have drawn to the front buffer glReadBuffer(GL_BACK); // Needed for acbuf antialiasing glDrawBuffer(GL_BACK); glFlush(); } else glXSwapBuffers(getDisplay(), getNormalWindow()); } else glFlush(); // clear this flag now that we have drawn drawToFrontBuffer = FALSE; } //////////////////////////////////////////////////////////////////////// // // Description: // Sets antialiasing on GL rendering action. // // use: public // void SoXtRenderArea::setAntialiasing(SbBool smoothing, int numPasses) // //////////////////////////////////////////////////////////////////////// { SoGLRenderAction *ra = getGLRenderAction(); if (smoothing == ra->isSmoothing() && numPasses == ra->getNumPasses()) return; // The visual needs to change if we are now enabling or disabling // the accumulation buffer SbBool needToChangeVisual = ((numPasses > 1 && ra->getNumPasses() == 1) || (numPasses == 1 && ra->getNumPasses() > 1)); // // now create a visual with the right info - this tries to // preserve as many setting as the original visual, with just // the antialiasing changed. // if (needToChangeVisual) { int n = 0; int attribList[20]; if (isRGBMode()) { attribList[n++] = GLX_RGBA; attribList[n++] = GLX_RED_SIZE; attribList[n++] = 1; attribList[n++] = GLX_GREEN_SIZE; attribList[n++] = 1; attribList[n++] = GLX_BLUE_SIZE; attribList[n++] = 1; } // there is always zbuffer... attribList[n++] = GLX_DEPTH_SIZE; attribList[n++] = 1; if (isDoubleBuffer()) attribList[n++] = GLX_DOUBLEBUFFER; // now add the antialiasing stuff if (numPasses > 1) { attribList[n++] = GLX_ACCUM_RED_SIZE; attribList[n++] = 1; attribList[n++] = GLX_ACCUM_GREEN_SIZE; attribList[n++] = 1; attribList[n++] = GLX_ACCUM_BLUE_SIZE; attribList[n++] = 1; } // check for stencil buffer Widget w = getWidget(); XVisualInfo *normalVis = getNormalVisual(); if (normalVis) { int val; glXGetConfig(XtDisplay(w), normalVis, GLX_STENCIL_SIZE, &val); if (val) { attribList[n++] = GLX_STENCIL_SIZE; attribList[n++] = val; } } attribList[n++] = (int) None; // create the visual XVisualInfo *vis = glXChooseVisual(XtDisplay(w), XScreenNumberOfScreen(XtScreen(w)), attribList); if (! vis) { #ifdef DEBUG SoDebugError::post("SoXtRenderArea::setAntialiasing", "could not create ACCUM visual"); #endif return; } // now set this as the current visual setNormalVisual(vis); // GL widget made a copy - we can free this XFree(vis); } else // only the number of passes changed, so just redraw sceneMgr->scheduleRedraw(); // finally set the stuff on the render action sceneMgr->setAntialiasing(smoothing, numPasses); } //////////////////////////////////////////////////////////////////////// // // This routine draws the scene graph for the overlay bit planes (called // by the expose event and scene graph sensor). // // use: virtual protected // void SoXtRenderArea::redrawOverlay() // //////////////////////////////////////////////////////////////////////// { if (!isVisible() || getOverlayWindow() == (Window) NULL) return; // set the window glXMakeCurrent(getDisplay(), getOverlayWindow(), getOverlayContext()); // draw that scene! (subclasses may redefine...) actualOverlayRedraw(); glFlush(); } //////////////////////////////////////////////////////////////////////// // // Schedule a redraw to happen sometime soon. // // use: public // void SoXtRenderArea::scheduleRedraw() // //////////////////////////////////////////////////////////////////////// { if (isAutoRedraw()) sceneMgr->scheduleRedraw(); else redraw(); } //////////////////////////////////////////////////////////////////////// // // Schedule a redraw to happen sometime soon. // // use: public // void SoXtRenderArea::scheduleOverlayRedraw() // //////////////////////////////////////////////////////////////////////// { if (isAutoRedraw()) overlaySceneMgr->scheduleRedraw(); else redrawOverlay(); } //////////////////////////////////////////////////////////////////////// // // Convenience to set up the redraw mechansim whenever the selection // changes. // // public // void SoXtRenderArea::redrawOnSelectionChange(SoSelection *s) // //////////////////////////////////////////////////////////////////////// { // Ref the new selection node if (s != NULL) s->ref(); // Remove our callback from old selection node if (selection != NULL) { selection->removeChangeCallback(SoXtRenderArea::selectionChangeCB, this); // Unref the old selection node selection->unref(); } selection = s; // Add our callback to this selection node. (We've already ref'd this new sel node) if (selection != NULL) selection->addChangeCallback(SoXtRenderArea::selectionChangeCB, this); } //////////////////////////////////////////////////////////////////////// // // Convenience to set up the redraw mechansim whenever the selection // changes. // // public // void SoXtRenderArea::redrawOverlayOnSelectionChange(SoSelection *s) // //////////////////////////////////////////////////////////////////////// { // Remove our callback from old selection node if (overlaySelection != NULL) overlaySelection->removeChangeCallback(SoXtRenderArea::overlaySelectionChangeCB, this); overlaySelection = s; // Add our callback to this selection node if (overlaySelection != NULL) overlaySelection->addChangeCallback(SoXtRenderArea::overlaySelectionChangeCB, this); } // // redefine those generic virtual functions // const char * SoXtRenderArea::getDefaultWidgetName() const { return thisClassName; } const char * SoXtRenderArea::getDefaultTitle() const { return "Xt RenderArea"; } const char * SoXtRenderArea::getDefaultIconTitle() const { return "Xt RenderArea"; } // //////////////////////////////////////////////////////////////////////// // static callbacks stubs //////////////////////////////////////////////////////////////////////// // #include // // Called whenever an enter/leave window event occurs. This forces the // render area to get/loose keyboard Focus (as opposed to requiring // POINTER focus policy, or requiring the user to press a mouse // button down). // // We also need a EnterNotify and LeaveNotify to correctly update // stuff for SoLocateHighlight (keep track of current window). // void SoXtRenderArea::windowEventCB(Widget w, SoXtRenderArea *p, XAnyEvent *xe, Boolean *) { if (xe->type == EnterNotify) { // get keyboard focus.... if (p->getOverlayWidget()) XmProcessTraversal(p->getOverlayWidget(), XmTRAVERSE_CURRENT); else XmProcessTraversal(p->getNormalWidget(), XmTRAVERSE_CURRENT); // // update the windowElement for the handleEventAction as well // as the GLRenderAction to point to this window. // // Note: don't touch the windowElement if we are in the middle // of rendering (if we process event during render abort). // SoState *state = p->sceneMgr->getHandleEventAction()->getState(); if (state) SoWindowElement::set(state, p->getNormalWindow(), p->getNormalContext(), p->getDisplay(), p->getGLRenderAction()); state = p->sceneMgr->getGLRenderAction()->getState(); if (state && state->getDepth() == 1) SoWindowElement::set(state, p->getNormalWindow(), p->getNormalContext(), p->getDisplay(), p->getGLRenderAction()); } else if (xe->type == LeaveNotify) { // loose keyboard focus... XmProcessTraversal(SoXt::getShellWidget(w), XmTRAVERSE_CURRENT); // // clear the windowElement from the actions now that we are // leaving the window. // // Note: don't touch the windowElement if we are in the middle // of rendering (if we process event during render abort). // // but first clear any currently highlighted object SoGLRenderAction *glAct = p->sceneMgr->getGLRenderAction(); if (glAct) SoLocateHighlight::turnOffCurrentHighlight(glAct); SoState *state = p->sceneMgr->getHandleEventAction()->getState(); if (state) SoWindowElement::set(state, (Window) NULL, NULL, NULL, NULL); state = p->sceneMgr->getGLRenderAction()->getState(); if (state && state->getDepth() == 1) SoWindowElement::set(state, (Window) NULL, NULL, NULL, NULL); } } // // called whenever the component becomes visible or not // void SoXtRenderArea::visibilityChangeCB(void *pt, SbBool visible) { SoXtRenderArea *p = (SoXtRenderArea *)pt; if (visible) p->activate(); else { // we are becoming hidden - so wait for an expose event // (which we now will come later) before enabling a redraw to // prevent too many redraws (scene graph changes + expose) p->waitForExpose = TRUE; p->deactivate(); } } void SoXtRenderArea::selectionChangeCB(void *p, SoSelection *) { ((SoXtRenderArea *)p)->scheduleRedraw(); } void SoXtRenderArea::overlaySelectionChangeCB(void *p, SoSelection *) { ((SoXtRenderArea *)p)->scheduleOverlayRedraw(); } void SoXtRenderArea::renderCB(void *p, SoSceneManager *) { ((SoXtRenderArea *)p)->redraw(); } void SoXtRenderArea::renderOverlayCB(void *p, SoSceneManager *) { ((SoXtRenderArea *)p)->redrawOverlay(); } --------------BE12CFF0C221AC9071EBCA38-- From Simon.Ney@neural.home.CS.TU-Berlin.DE Wed Sep 11 09:33:31 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Wed, 11 Sep 2002 09:33:32 -0700 (PDT) Received: from Neural.Home.CS.TU-Berlin.DE (neural.home.cs.tu-berlin.de [130.149.148.105]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g8BGXOtG023734 for ; Wed, 11 Sep 2002 09:33:28 -0700 Received: from neural.home.cs.tu-berlin.de (bbiss4 [130.149.148.106]) by Neural.Home.CS.TU-Berlin.DE (8.11.6+Sun/8.11.6) with ESMTP id g8BGbSG00841; Wed, 11 Sep 2002 18:37:29 +0200 (MET DST) Message-ID: <3D7F7148.E8A36BD6@neural.home.cs.tu-berlin.de> Date: Wed, 11 Sep 2002 18:37:28 +0200 From: Simon Ney Reply-To: Simon.Ney@neural.home.CS.TU-Berlin.DE Organization: KOMMUNIKATOR X-Mailer: Mozilla 4.77 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: de, en MIME-Version: 1.0 To: Karen Schuchardt CC: info-inventor-dev@oss.sgi.com Subject: Re: sun overlays and transparent color References: <3D7CDA5A.D827CB22@pnl.gov> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 12 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: Simon.Ney@neural.home.CS.TU-Berlin.DE Precedence: bulk X-list: info-inventor-dev there is a second code-point where the index of the transparent-pixel for overlays is needed. this second code-point is independent of the scenemgr because its a standalone widget. the widget is the "color- and material-editor" ... thats why the determination of the transparent-pixel should be a suitable separate function (number of lines is more than a screen). i will post a set of patches in the future that include karen's fixes. these patches will fix many different selfcontainted problems (make system, fonts, colors, float/double math, name mangling, etc...) at least is the "color-editor" widget used in the "ivview" application to set the background color of the scene. btw> SGI use constant 0, and SUN use constant 255, in the 8-bit pseudo-color overlay plane model as transparent pixel. ( )imon Karen Schuchardt wrote: > > A while ago the following code was added to SoXtRendrArea.c++ as a fix > for aix (see > http://oss.sgi.com/projects/inventor/mail/info-inventor-dev/msg00410.html). > > The code follows: > > #ifdef GLX_TRANSPARENT_INDEX_VALUE_EXT > > if (vis != NULL) { > int index; > glXGetConfig(XtDisplay(parent), vis, > GLX_TRANSPARENT_INDEX_VALUE_EXT, &index); > > overlaySceneMgr->setBackgroundIndex(index); > > } > #endif > > On Sun's (or at least on the systems we have here) the call returns > GLX_BAD_ATTRIBUTE and the background index is set to whatever arbitrary > value it was assigned when declared. > > Sun has some example code to get the transparent color (provide to my by > Simon Ney). There are a couple of ways two do this. One way requires > the widgets to be realized (to get the X Window) so this method cannot > be used inside XtSoRendrArea. The other way > uses the SERVER_OVERLAY_VISUALS. I put this into my version of > SoXtRendrArea and it works. The code is ifdef'd on __sun__ in two > places - at the top for some delcaration and in the buildWidget method. > > Hopefully this can get added to the code base. > > I've made these changes to the 2.1.5-9 code base. If anybody has a > better way, I'd be interested in it as always. > > regards, > Karen > > ------------------------------------------------------------------------ > Name: SoXtRendrArea.c++ > SoXtRendrArea.c++ Type: Plain Text (text/plain) > Encoding: 7bit -- --------------------------------------------------------------------- | Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 | | Email Simon.Ney@neural.home.cs.tu-berlin.de Fax: ++49 69 68600052 | --------------------------------------------------------------------- From Simon.Ney@neural.home.CS.TU-Berlin.DE Thu Sep 12 09:59:28 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 12 Sep 2002 09:59:32 -0700 (PDT) Received: from Neural.Home.CS.TU-Berlin.DE (neural.home.cs.tu-berlin.de [130.149.148.105]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g8CGxNtG008783 for ; Thu, 12 Sep 2002 09:59:25 -0700 Received: from neural.home.cs.tu-berlin.de (bbiss4 [130.149.148.106]) by Neural.Home.CS.TU-Berlin.DE (8.11.6+Sun/8.11.6) with ESMTP id g8CH3ZG22198; Thu, 12 Sep 2002 19:03:35 +0200 (MET DST) Message-ID: <3D80C8E7.C0191F26@neural.home.cs.tu-berlin.de> Date: Thu, 12 Sep 2002 19:03:35 +0200 From: Simon Ney Reply-To: Simon.Ney@neural.home.CS.TU-Berlin.DE Organization: KOMMUNIKATOR X-Mailer: Mozilla 4.77 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: de, en MIME-Version: 1.0 To: "Vincent S. Cojot" CC: info-inventor-dev@oss.sgi.com Subject: Re: OpenInventor Solaris patch set with build instructions. References: <3026.212.208.45.51.1031228674.squirrel@mail.step.polymtl.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 13 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: Simon.Ney@neural.home.CS.TU-Berlin.DE Precedence: bulk X-list: info-inventor-dev Hi, i have checked the patches side-side and cant understand the reason for the following remaining: lib/database/include/Inventor/SbTime.h N (no reason) lib/database/src/sb/SbMatrix.c++ N (no reason) lib/database/src/so/SoInput.c++ N (no reason) lib/database/src/so/nodes/nurbs/head/mymath.h N (no reason) lib/interaction/src/nodekits/SoInteractionKit.c++ N (no reason) libSoXt/src/mtlEdit/SoXtMtlEdit.c++ N (no reason) libSoXt/src/viewers/SoXtFullVwr.c++ N (no reason) i'am not sure if they are really required ... all the other except some minor difference matches with my fixes. for the GNUmakefile it have a solution that have no impact on other systems. i think for "make/ivcommondefs" we should add "ivcommondefs.in" and add a autogen configure to figure out the location of the tools, install prefix, location of fonts package and some options for overlay on/off. ... if not everone must hack it. ( )imon "Vincent S. Cojot" wrote: > > Hello everyone, > > It's my first post here so please forgive me if my netiquette isn't perfect. > > After browsing through the list archives for a while, I came up with a patch > against inventor-2.1.5-9 that lets one compile it end to end under > Solaris/Sparc (tested under Solaris 8 02/02 with gcc 2.95.3). > > My problem with the patches previously submitted to this list was that > nobody came up with a complete set which would make life a little easier for > the average end-user. > I integrated all of the posted patches into one big patch, wrote a README > file for Solaris and a build script and I fixed a few things in the process > of compiling the samples. The patch is far from perfect but at least now, on > a Solaris/Sparc box, compiling inventor is as easy as: > > 1) meeting the software requirements (Software Companion stuff, Gnome-1.4 > for freetype, OpenGL). > 2) getting inventor-2.1.5-9.src.tar.gz > 3) applying the patch > 4) cd inventor; ./go.sh. > > I'm attaching the patch to this e-mail. > It is also availble from > http://step.polymtl.ca/~coyote/OpenInventor-2.1.5.9-Solaris.patch.gz > > I hope this will be useful to others. > > Portability: I tried to protect all code modifications with __sun__ but I > didn't bother to do that for diffs to GNUmakefiles under inventor/apps/... > The code can thereforce probably be integrated into the main tree but not > the diffs to the makefiles. > I will come up with a better patch later on but I'm posting this preliminary > result here. Also, this inventor installs under /usr/local/lib, > /usr/local/bin, etc.. a-la-BSD/Linux. :) So far, this build has proven as > reliable as the Linux official build for me. > > The files that are modified/created are: > inventor/README.Solaris > inventor/apps/demos/SceneViewer/GNUmakefile > inventor/apps/demos/drop/GNUmakefile > inventor/apps/demos/gview/GNUmakefile > inventor/apps/demos/maze/GNUmakefile > inventor/apps/demos/noodle/GNUmakefile > inventor/apps/demos/qmorf/GNUmakefile > inventor/apps/demos/revo/GNUmakefile > inventor/apps/demos/textomatic/GNUmakefile > inventor/apps/demos/textomatic/TextWrapper.c++ > inventor/apps/samples/widgets/GNUmakefile.componentTest > inventor/apps/samples/widgets/MyTextureEd.c++ > inventor/apps/tools/ivview/GNUmakefile > inventor/go.sh > inventor/lib/database/include/Inventor/SbBasic.h > inventor/lib/database/include/Inventor/SbTime.h > inventor/lib/database/src/sb/SbMatrix.c++ > inventor/lib/database/src/so/SoInput.c++ > inventor/lib/database/src/so/nodes/SoText2.c++ > inventor/lib/database/src/so/nodes/SoText3.c++ > inventor/lib/database/src/so/nodes/nurbs/head/mymath.h > inventor/lib/interaction/src/nodekits/SoInteractionKit.c++ > inventor/libSoXt/src/mixedMode/SoXtSlider.c++ > inventor/libSoXt/src/mtlEdit/SoXtMtlEdit.c++ > inventor/libSoXt/src/viewers/SoXtFullVwr.c++ > inventor/make/commondefs > inventor/make/commonrules > inventor/make/ivcommondefs > inventor/make/system > > The issues that remain are related to text: I am not sure that text displays > correctly or displays at all.. Perhaps a freetype problem. > > Here is README.Solaris: > > Small HOWTO written by Vincent S. Cojot > > Compiled on Solaris 8/sparc 02/02 with OpenGL 1.2.3 > Tested on Ultra5/PGX64 and SunBlade 2000/XVR-1000. > > It requires the following packages: -- --------------------------------------------------------------------- | Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 | | Email Simon.Ney@neural.home.cs.tu-berlin.de Fax: ++49 69 68600052 | --------------------------------------------------------------------- From kdschwehr@ucsd.edu Thu Sep 12 16:48:52 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 12 Sep 2002 16:48:53 -0700 (PDT) Received: from insci14.ucsd.edu (IDENT:62@insci14.ucsd.edu [132.239.56.230]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g8CNmgtG024902 for ; Thu, 12 Sep 2002 16:48:42 -0700 Received: from localhost (kds.ucsd.edu [132.239.122.66]) by insci14.ucsd.edu (Postfix) with ESMTP id 8AEA341832 for ; Thu, 12 Sep 2002 15:06:31 -0700 (PDT) Date: Thu, 12 Sep 2002 15:06:31 -0700 Subject: Re: OpenInventor Solaris patch && Mac OSX w/ XDarwin Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: Kurt Schwehr To: info-inventor-dev@oss.sgi.com Content-Transfer-Encoding: 7bit In-Reply-To: <3D80C8E7.C0191F26@neural.home.cs.tu-berlin.de> Message-Id: X-Mailer: Apple Mail (2.482) X-archive-position: 14 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: kdschwehr@ucsd.edu Precedence: bulk X-list: info-inventor-dev Hi All, Thanks Vincent for the solaris patch. Now I just have to get that sun blade in the corner up to speed... never admin'ed solaris before :) I was just thinking along the lines of an auto generated script for configuring OpenInventor while starting a port for Mac OSX with XDarwin. I don't have too many changes to the source, but I could easily see that it would be painful with many more architectures. I'd love to have an open inventor that I could point people to and say that they just have to do somethin similar to what most gnu tools use, i.e. tar xfz oi.tar.gz cd oi ./configure --prefix=/sw --with-png make install And it would figure out what to change in a clean way. i'm sure a lot of you have already put much thought into this, but I be interested in helping out. ALSO: Is anyone out there working or have done a port to Mac OSX/Darwin/XDarwin? I'm working on one at the moment, but I'm having a little bit of trouble with the whole shared library business. Thanks! -Kurt > Hi, > > i have checked the patches side-side and cant understand the reason for > the following remaining: > > lib/database/include/Inventor/SbTime.h N (no > reason) > lib/database/src/sb/SbMatrix.c++ N (no > reason) > lib/database/src/so/SoInput.c++ N (no > reason) > lib/database/src/so/nodes/nurbs/head/mymath.h N (no > reason) > lib/interaction/src/nodekits/SoInteractionKit.c++ N (no > reason) > libSoXt/src/mtlEdit/SoXtMtlEdit.c++ N (no > reason) > libSoXt/src/viewers/SoXtFullVwr.c++ N (no > reason) > > i'am not sure if they are really required ... > > all the other except some minor difference matches with my fixes. > for the GNUmakefile it have a solution that have no impact on other > systems. > > i think for "make/ivcommondefs" we should add "ivcommondefs.in" and add > a autogen configure to figure out the location of the tools, install > prefix, > location of fonts package and some options for overlay on/off. > ... if not everone must hack it. > > ( > )imon > > "Vincent S. Cojot" wrote: >> >> Hello everyone, >> >> It's my first post here so please forgive me if my netiquette isn't >> perfect. >> >> After browsing through the list archives for a while, I came up with a >> patch >> against inventor-2.1.5-9 that lets one compile it end to end under >> Solaris/Sparc (tested under Solaris 8 02/02 with gcc 2.95.3). >> >> My problem with the patches previously submitted to this list was that >> nobody came up with a complete set which would make life a little >> easier for >> the average end-user. >> I integrated all of the posted patches into one big patch, wrote a >> README >> file for Solaris and a build script and I fixed a few things in the >> process >> of compiling the samples. The patch is far from perfect but at least >> now, on >> a Solaris/Sparc box, compiling inventor is as easy as: >> >> 1) meeting the software requirements (Software Companion stuff, >> Gnome-1.4 >> for freetype, OpenGL). >> 2) getting inventor-2.1.5-9.src.tar.gz >> 3) applying the patch >> 4) cd inventor; ./go.sh. >> >> I'm attaching the patch to this e-mail. >> It is also availble from >> http://step.polymtl.ca/~coyote/OpenInventor-2.1.5.9-Solaris.patch.gz >> >> I hope this will be useful to others. >> >> Portability: I tried to protect all code modifications with __sun__ >> but I >> didn't bother to do that for diffs to GNUmakefiles under >> inventor/apps/... >> The code can thereforce probably be integrated into the main tree but >> not >> the diffs to the makefiles. >> I will come up with a better patch later on but I'm posting this >> preliminary >> result here. Also, this inventor installs under /usr/local/lib, >> /usr/local/bin, etc.. a-la-BSD/Linux. :) So far, this build has proven >> as >> reliable as the Linux official build for me. >> >> The files that are modified/created are: >> inventor/README.Solaris >> inventor/apps/demos/SceneViewer/GNUmakefile >> inventor/apps/demos/drop/GNUmakefile >> inventor/apps/demos/gview/GNUmakefile >> inventor/apps/demos/maze/GNUmakefile >> inventor/apps/demos/noodle/GNUmakefile >> inventor/apps/demos/qmorf/GNUmakefile >> inventor/apps/demos/revo/GNUmakefile >> inventor/apps/demos/textomatic/GNUmakefile >> inventor/apps/demos/textomatic/TextWrapper.c++ >> inventor/apps/samples/widgets/GNUmakefile.componentTest >> inventor/apps/samples/widgets/MyTextureEd.c++ >> inventor/apps/tools/ivview/GNUmakefile >> inventor/go.sh >> inventor/lib/database/include/Inventor/SbBasic.h >> inventor/lib/database/include/Inventor/SbTime.h >> inventor/lib/database/src/sb/SbMatrix.c++ >> inventor/lib/database/src/so/SoInput.c++ >> inventor/lib/database/src/so/nodes/SoText2.c++ >> inventor/lib/database/src/so/nodes/SoText3.c++ >> inventor/lib/database/src/so/nodes/nurbs/head/mymath.h >> inventor/lib/interaction/src/nodekits/SoInteractionKit.c++ >> inventor/libSoXt/src/mixedMode/SoXtSlider.c++ >> inventor/libSoXt/src/mtlEdit/SoXtMtlEdit.c++ >> inventor/libSoXt/src/viewers/SoXtFullVwr.c++ >> inventor/make/commondefs >> inventor/make/commonrules >> inventor/make/ivcommondefs >> inventor/make/system >> >> The issues that remain are related to text: I am not sure that text >> displays >> correctly or displays at all.. Perhaps a freetype problem. >> >> Here is README.Solaris: >> >> Small HOWTO written by Vincent S. Cojot >> >> Compiled on Solaris 8/sparc 02/02 with OpenGL 1.2.3 >> Tested on Ultra5/PGX64 and SunBlade 2000/XVR-1000. >> >> It requires the following packages: > > -- > --------------------------------------------------------------------- > | Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 | > | Email Simon.Ney@neural.home.cs.tu-berlin.de Fax: ++49 69 68600052 | > --------------------------------------------------------------------- > > Kurt Schwehr -- SIO Grad Student http://schwehr.org/ From mortene@sim.no Thu Sep 12 23:25:06 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 12 Sep 2002 23:25:07 -0700 (PDT) Received: from sim.no (trh.sim.no [213.236.166.75]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g8D6P4tG002228 for ; Thu, 12 Sep 2002 23:25:05 -0700 Received: (qmail 23617 invoked by uid 1114); 13 Sep 2002 06:29:43 -0000 To: Kurt Schwehr Cc: info-inventor-dev@oss.sgi.com Subject: Re: OpenInventor Solaris patch && Mac OSX w/ XDarwin References: From: Morten Eriksen Organization: Systems in Motion Date: 13 Sep 2002 08:29:43 +0200 In-Reply-To: Kurt Schwehr's message of "Thu, 12 Sep 2002 15:06:31 -0700" Message-ID: <51d6riwgfc.fsf@nfs.trh.sim.no> Lines: 45 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 15 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: mortene@sim.no Precedence: bulk X-list: info-inventor-dev Kurt Schwehr writes: > I'd love to have an open inventor that I could point people to and > say that they just have to do somethin similar to what most gnu > tools use, i.e. Actually, there *is* an Inventor where you can do this. It's our clone library, called "Coin". See for more information. In short, Coin is a clean-room implementation of SGI's Open Inventor. It is professionally supported and under active development. Latest additions for the up-coming Coin-2 release: full VRML97 support, thread-safe action traversals (and rendering), 3D textures, SoExtSelection node for complex interactions, and lots of other goodies. Coin is 100% compatible with SGI's Open Inventor 2.1 API, and contains many later additions from TGS's Inventor. > ALSO: Is anyone out there working or have done a port to Mac > OSX/Darwin/XDarwin? Coin has been ported to Mac OS X, and is officially supported on that platform. Binaries for both 10.1 and 10.2 are available in . My company also supplies an "InventorXt-like" library called SoQt for binding Coin and Qt together with full-fledged viewer classes. This has been tested to work under Mac OS X. (Qt hasn't been ported to 10.2 yet, though.) We also have a light-weight Cocoa binding. (SoQt can also be used with SGI's or TGS's Inventor, BTW.) > I'm working on one at the moment, but I'm having a little bit of > trouble with the whole shared library business. So did we. Apple screwed up on some issues with regard to g++ / libstdc++ for the Jaguar release. Get in touch if you want to know the really gory details. Regards, Morten -- From kdschweh@insci14.ucsd.edu Sat Sep 14 10:48:45 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Sat, 14 Sep 2002 10:48:47 -0700 (PDT) Received: from insci14.ucsd.edu (IDENT:62@insci14.ucsd.edu [132.239.56.230]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g8EHmZtG012645 for ; Sat, 14 Sep 2002 10:48:35 -0700 Received: by insci14.ucsd.edu (Postfix, from userid 805) id 9ABCF41834; Sat, 14 Sep 2002 09:29:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by insci14.ucsd.edu (Postfix) with ESMTP id 6FE094182F for ; Sat, 14 Sep 2002 09:29:56 -0700 (PDT) Date: Sat, 14 Sep 2002 09:29:56 -0700 (PDT) From: Kurt D Schwehr Reply-To: kdschweh@ucsd.edu To: info-inventor-dev@oss.sgi.com Subject: Re: OpenInventor Solaris patch && Mac OSX w/ XDarwin Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 17 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: kdschweh@insci14.ucsd.edu Precedence: bulk X-list: info-inventor-dev Content-Length: 2175 Lines: 67 Hi All, Thanks for all the feedback! I didn't make it all the way to a working port and I've got to get back to some other stuff, but I figured I throw what I have on the web and if anyone can figure out what's wrong, then great! The patch and notes are at http://schwehr.org/software/Darwin/, with the diff being http://schwehr.org/software/Darwin/OpenInventor-2.1.5.9-Darwin-broken.patch.gz I'm to the point where things like ivman work, but ivview dies with this: # cd ~/Inventor/inventor && /Users/schwehr/Inventor/install/usr/bin/ivview X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 19 (X_DeleteProperty) Resource id in failed request: 0x0 Serial number of failed request: 87 Current serial number in output stream: 92 Anyone know what might be wrong? -Kurt ---------- Forwarded message ---------- Date: Thu, 12 Sep 2002 15:06:31 -0700 From: Kurt Schwehr To: info-inventor-dev@oss.sgi.com Subject: Re: OpenInventor Solaris patch && Mac OSX w/ XDarwin Hi All, Thanks Vincent for the solaris patch. Now I just have to get that sun blade in the corner up to speed... never admin'ed solaris before :) I was just thinking along the lines of an auto generated script for configuring OpenInventor while starting a port for Mac OSX with XDarwin. I don't have too many changes to the source, but I could easily see that it would be painful with many more architectures. I'd love to have an open inventor that I could point people to and say that they just have to do somethin similar to what most gnu tools use, i.e. tar xfz oi.tar.gz cd oi ./configure --prefix=/sw --with-png make install And it would figure out what to change in a clean way. i'm sure a lot of you have already put much thought into this, but I be interested in helping out. ALSO: Is anyone out there working or have done a port to Mac OSX/Darwin/XDarwin? I'm working on one at the moment, but I'm having a little bit of trouble with the whole shared library business. Thanks! -Kurt > "Vincent S. Cojot" wrote: >> >> http://step.polymtl.ca/~coyote/OpenInventor-2.1.5.9-Solaris.patch.gz From coyote@step.polymtl.ca Mon Sep 23 02:47:16 2002 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Mon, 23 Sep 2002 02:47:19 -0700 (PDT) Received: from step.polymtl.ca (root@step.polymtl.ca [132.207.4.32]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g8N9lFtG003210 for ; Mon, 23 Sep 2002 02:47:16 -0700 Received: from step.polymtl.ca (nobody@localhost [127.0.0.1]) by step.polymtl.ca (8.11.6/8.11.6) with SMTP id g8N9lD423845; Mon, 23 Sep 2002 05:47:13 -0400 (EDT) Received: from 212.208.45.51 (SquirrelMail authenticated user coyote) by mail.step.polymtl.ca with HTTP; Mon, 23 Sep 2002 05:47:14 -0400 (EDT) Message-ID: <3585.212.208.45.51.1032774434.squirrel@mail.step.polymtl.ca> Date: Mon, 23 Sep 2002 05:47:14 -0400 (EDT) Subject: Re: OpenInventor Solaris patch set with build instructions. From: "Vincent S. Cojot" To: In-Reply-To: <3D80C8E7.C0191F26@neural.home.cs.tu-berlin.de> References: <3D80C8E7.C0191F26@neural.home.cs.tu-berlin.de> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: X-Mailer: SquirrelMail (version 1.2.5) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 18 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: coyote@step.polymtl.ca Precedence: bulk X-list: info-inventor-dev Content-Length: 2760 Lines: 66 Hello everyone, Sorry for the long delay in answering this thread (been on vacation). I'm still very interested in getting oiv working fine on Solaris.. :) Here's my reply to the issues raised by Simon Ney with more details: > i have checked the patches side-side and cant understand the reason for > the following remaining: > > lib/database/include/Inventor/SbTime.h N (no reason) Taken from: http://oss.sgi.com/projects/inventor/mail/info-inventor-dev/msg00225.html It's a patch from Steven Conolly.. Perhaps that's not needed for gcc but I didn't take the time to verify that. > lib/database/src/sb/SbMatrix.c++ N (no reason) Same comment as above. > lib/database/src/so/SoInput.c++ N (no reason) Same comment as above. > lib/database/src/so/nodes/nurbs/head/mymath.h N (no reason) This was needed in order to get one of the examples/demos to compile properly. Again, if you don't have Sun's Forte Compiler (aka WorkShop), you don't have sunmath.h and hence, you don't have things like acosf, asinf, etc.. There is some redundancy because, even though -D_DOUBLE_MATH_ONLY was defined for Solaris in ivcommondefs, that demo/example (I don't recall which one) wasn't taking the right functions and was still looking for the *f() functions.. > lib/interaction/src/nodekits/SoInteractionKit.c++ N (no reason) It's http://oss.sgi.com/projects/inventor/mail/info-inventor-dev/msg00225.html again. > libSoXt/src/mtlEdit/SoXtMtlEdit.c++ N (no reason) > libSoXt/src/viewers/SoXtFullVwr.c++ N (no reason) These two are taken from: http://oss.sgi.com/projects/inventor/mail/info-inventor-dev/msg00309.html Again, from a patch from Steven Connollly. As I said before, I didn't add much new stuff since I don't know my way around the OpenInventor library source code, I only tried to put together a series of patches in order to make something useable easily for the end user.. So far my results regarding fonts and editors are these: - On an Ultras5 with a 24bpp default root window, the textomatic demo works (fonts appear) but it seg faults in the editors.. - On a SunBlade 2000 with a 8bpp default root window (overlay visual), editors work but not the textomatic demo.. (might be related to my installation of system fonts but I doubt that since I've been using Freetype on both systems). > all the other except some minor difference matches with my fixes. > for the GNUmakefile it have a solution that have no impact on other > systems. I have a patch coming up that fixes my incompatibilities with other systems by protecting my diffs to these Makefiles with "ifeq ($(usingSolaris), 1)" Vincent S. Cojot