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
|