From lzha022@ec.auckland.ac.nz Sun Jun 15 15:03:56 2003 Received: with ECARTIS (v1.0.0; list info-inventor); Sun, 15 Jun 2003 15:04:01 -0700 (PDT) Received: from mail.ec.auckland.ac.nz (mail.ec.auckland.ac.nz [130.216.191.127]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5FM3s2x027288 for ; Sun, 15 Jun 2003 15:03:55 -0700 Received: from localhost (webmail2.ec.auckland.ac.nz [130.216.191.87]) by mail.ec.auckland.ac.nz (8.12.9/8.12.9) with ESMTP id h5FM3r0J003597 for ; Mon, 16 Jun 2003 10:03:53 +1200 Received: from 130.216.132.12 ([130.216.132.12]) by webmail2.ec.auckland.ac.nz (IMP) with HTTP for ; Mon, 16 Jun 2003 10:00:09 +1200 Message-ID: <1055714409.3eecec69f3f58@webmail2.ec.auckland.ac.nz> Date: Mon, 16 Jun 2003 10:00:09 +1200 From: lzha022@ec.auckland.ac.nz To: info-inventor@oss.sgi.com Subject: SoOffscreenRenderer - segmentation fault MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 130.216.132.12 X-archive-position: 55 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: lzha022@ec.auckland.ac.nz Precedence: bulk X-list: info-inventor Hi, I have got segmentation fault when i use getBuffer() of SoOffscreenRenderer. Since i am new user to both C++ and open Inventor, i really do not know how to solve this problem. Here is my code: float width, height; SbViewportRegion viewPort(renderArea->getSize()); SoOffscreenRenderer *renderer = new SoOffscreenRenderer(viewPort); unsigned char *buffer = (unsigned char *)NULL; ALLOCATE(buffer, unsigned char, 4*imageWidth*imageHeight); if(sceneGraphInitialised) { if (renderer) { buffer = renderer->getBuffer(); //this line causes fault. ... if i add 'if(renderer->render(root))' before the above line. I will be logged out of the computer. I am really frustrated. Do you have any idea what causes this problem? When you answer my question, can you please either email you reply to me or mail me the url so that i can read your reply. Thanks very much. Alison From Filali@enic.fr Sun Jun 15 23:41:51 2003 Received: with ECARTIS (v1.0.0; list info-inventor); Sun, 15 Jun 2003 23:42:28 -0700 (PDT) Received: from palombe.enic.fr (palombe.enic.fr [193.48.251.16]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5G6fn2x032583 for ; Sun, 15 Jun 2003 23:41:51 -0700 Received: from Filali (unverified [172.27.133.133]) by palombe.enic.fr (Rockliffe SMTPRA 4.5.4) with ESMTP id ; Mon, 16 Jun 2003 08:39:44 +0200 Message-ID: From: "Filali Ansary Tarik" To: "lzha022@ec.auckland.ac.nz" , "info-inventor@oss.sgi.com" Subject: Re: SoOffscreenRenderer - segmentation fault X-mailer: Foxmail 4.2 [-fr-] Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Date: Mon, 16 Jun 2003 8:43:2 +0100 X-archive-position: 56 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: Filali@enic.fr Precedence: bulk X-list: info-inventor Hi here's some code that i'm using with OpenInventor and it work hehehehehe hope it may help you find what problem u have /************Code*************/ int width=1600; int height=1200; SbViewportRegion vport(width,height); SoOffscreenRenderer osr(vport); osr.setBackgroundColor(SbColor(0,0,0)); osr.setColorDepth(8);// or 24 SbBool OK = osr.render(root); if (!OK) { printf("*** OffscreenRender failed...\n"); exit(1); } /*************End of Code*********// Have a nice Day Tarik Filali Ansary >Hi, > >I have got segmentation fault when i use getBuffer() of SoOffscreenRenderer. >Since i am new user to both C++ and open Inventor, i really do not know how to >solve this problem. Here is my code: > > > float width, height; > SbViewportRegion viewPort(renderArea->getSize()); > SoOffscreenRenderer *renderer = new SoOffscreenRenderer(viewPort); > unsigned char *buffer = (unsigned char *)NULL; > ALLOCATE(buffer, unsigned char, 4*imageWidth*imageHeight); > if(sceneGraphInitialised) > { > if (renderer) > { > buffer = renderer->getBuffer(); //this line causes fault. > ... >if i add 'if(renderer->render(root))' before the above line. I will be logged >out of the computer. > >I am really frustrated. Do you have any idea what causes this problem? >When you answer my question, can you please either email you reply to me or mail >me the url so that i can read your reply. > >Thanks very much. > >Alison From lzha022@ec.auckland.ac.nz Thu Jun 26 19:18:15 2003 Received: with ECARTIS (v1.0.0; list info-inventor); Thu, 26 Jun 2003 19:18:21 -0700 (PDT) Received: from mail.ec.auckland.ac.nz (mail.ec.auckland.ac.nz [130.216.191.127]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5R2ID2x011730 for ; Thu, 26 Jun 2003 19:18:14 -0700 Received: from localhost (webmail1.ec.auckland.ac.nz [130.216.191.45]) by mail.ec.auckland.ac.nz (8.12.9/8.12.9) with ESMTP id h5R2IB0J007064; Fri, 27 Jun 2003 14:18:11 +1200 Received: from alison.zhang.anat.auckland.ac.nz (alison.zhang.anat.auckland.ac.nz [130.216.132.12]) by webmail1.ec.auckland.ac.nz (IMP) with HTTP for ; Fri, 27 Jun 2003 14:14:17 +1200 Message-ID: <1056680057.3efba879dff08@webmail1.ec.auckland.ac.nz> Date: Fri, 27 Jun 2003 14:14:17 +1200 From: lzha022@ec.auckland.ac.nz To: info-inventor@oss.sgi.com Subject: renderArea.setEventCallback ? MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 130.216.132.12 X-archive-position: 57 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: lzha022@ec.auckland.ac.nz Precedence: bulk X-list: info-inventor Hi, I am using the function setEventCallback(...) of SoXtRenderArea because i want to find the mouse position relative to the root window(XAnyEvent). Now i have two problems: firstly, I can not catch ButtonRelease event, i can only catch ButtonPress event. It seems button release dose not generate any event. secondly, I can not remove the event callback after i find the mouse position. If the event callback is there i can not spin the image. While i realy want to spin the image. here is part of my code: SoXtRenderArea *area = (SoXtRenderArea *)renderArea; area->setEventCallback(mouseMoved, this); SbBool ThreeDCanvas::mouseMoved(void *userData, XAnyEvent *anyEvent) { if(anyEvent->type==ButtonRelease) { printf("Button Released"); } } It never prints anything. While it i change ButtonRelease to ButtonPress, it works. Can you please help me(email me even if you can only solve one problem). Regards Alison From lzha022@ec.auckland.ac.nz Sun Jun 29 17:22:03 2003 Received: with ECARTIS (v1.0.0; list info-inventor); Sun, 29 Jun 2003 17:22:06 -0700 (PDT) Received: from mail.ec.auckland.ac.nz (mail.ec.auckland.ac.nz [130.216.191.127]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5U0M12x017864 for ; Sun, 29 Jun 2003 17:22:02 -0700 Received: from localhost (webmail2.ec.auckland.ac.nz [130.216.191.87]) by mail.ec.auckland.ac.nz (8.12.9/8.12.9) with ESMTP id h5U0M00J006027; Mon, 30 Jun 2003 12:22:00 +1200 Received: from w.yang.anat.auckland.ac.nz (w.yang.anat.auckland.ac.nz [130.216.132.9]) by webmail2.ec.auckland.ac.nz (IMP) with HTTP for ; Mon, 30 Jun 2003 12:16:55 +1200 Message-ID: <1056932215.3eff8177a8749@webmail2.ec.auckland.ac.nz> Date: Mon, 30 Jun 2003 12:16:55 +1200 From: lzha022@ec.auckland.ac.nz To: info-inventor@oss.sgi.com Subject: renderArea.setEventCallback - help please!! MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 130.216.132.9 X-archive-position: 58 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-bounce@oss.sgi.com Errors-to: info-inventor-bounce@oss.sgi.com X-original-sender: lzha022@ec.auckland.ac.nz Precedence: bulk X-list: info-inventor Hi, I am using the function setEventCallback(...) of SoXtRenderArea because i want to find the mouse position relative to the root window(XAnyEvent). Now i have one problem: I can not remove the event callback after i find the mouse position. If the event callback is there i can not spin the image using mouse. While i realy want to spin the image. Can anyone please help me(email me) how to get rid of the event call back? Regards Alison