info-inventor
[Top] [All Lists]

SoOffscreenRenderer - segmentation fault

To: info-inventor@xxxxxxxxxxx
Subject: SoOffscreenRenderer - segmentation fault
From: lzha022@xxxxxxxxxxxxxxxxx
Date: Mon, 16 Jun 2003 10:00:09 +1200
Sender: info-inventor-bounce@xxxxxxxxxxx
User-agent: Internet Messaging Program (IMP) 3.2.1
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 




<Prev in Thread] Current Thread [Next in Thread>