SoOffscreenRenderer

SoOffscreenRenderer

Post by tonz » Wed, 16 Apr 2003 22:14:46



i think i'll never get it ...
i've already posted the problem here and thought i had the solution but i
was wrong.
first of all, i want to create a SoOffscreenRenderer, should be simple but
it isn't:
if i do it the following:

        SoViewportRegion vp(100,100);
        SoOffscreenRenderer *osr = new SoOffscreenRenderer(vp);

i can compile and it doesn't crash immediately.
but if i change the size of the viewport region to 640 and 480 or to 40 and
40 it crashes.
i don't get it if i try this at home, it doesn't only kills the app but
also the whole x server.

if i use the viewport 100,100 i cant render anything with the
offscreenrenderer, because i get an assert.
first i thought, well maybe i'm to stupid. so i try to compile the example
(the mpg2enc) from the simage cvs-snapshot
... and "hi there" everything crashed again !!!

maybe anyone could give me a hint ...
i use coin2.01, soqt1.0.2 and simage (well the latest release) everything
runs under suse linux 8.2

PLEASE HELP !!!
tonz

 
 
 

SoOffscreenRenderer

Post by Morten Erikse » Tue, 22 Apr 2003 19:57:43



> i think i'll never get it ...  i've already posted the problem here
> and thought i had the solution but i was wrong.  first of all, i
> want to create a SoOffscreenRenderer, should be simple but it isn't:
> if i do it the following:

>    SoViewportRegion vp(100,100);
>    SoOffscreenRenderer *osr = new SoOffscreenRenderer(vp);

> i can compile and it doesn't crash immediately.  but if i change the
> size of the viewport region to 640 and 480 or to 40 and 40 it
> crashes.  i don't get it if i try this at home, it doesn't only
> kills the app but also the whole x server.

It actually sounds like there is a problem with your GLX installation
or X server or OpenGL drivers, or some combination of these.

Finding the source of the bug is likely to be non-trivial. Which
OpenGL driver are you using?

Morten
--
<URL:http://www.coin3d.org>

 
 
 

SoOffscreenRenderer

Post by Tino Loeffle » Wed, 23 Apr 2003 18:57:09



> It actually sounds like there is a problem with your GLX installation
> or X server or OpenGL drivers, or some combination of these.

> Finding the source of the bug is likely to be non-trivial. Which
> OpenGL driver are you using?

glinfo tells this:
GL_VERSION: 1.3.1 NVIDIA 31.23
GL_EXTENSIONS: <snip>
GL_RENDERER: GeForce2 GTS/AGP/SSE2
GL_VENDOR: NVIDIA Corporation
GLU_VERSION: 1.3
GLU_EXTENSIONS: GLU_EXT_nurbs_tessellator GLU_EXT_object_space_tess
GLUT_API_VERSION: 3
GLUT_XLIB_IMPLEMENTATION: 15

well, thats my computer at work, here "only" the app crashes with a SIGSEGV
it's:
suse linux 8.0,
kde 3.0,
coin 2.0.1,
soqt 1.0.2,
simage 1.2.2,
XFree86 4.2.0

so, you think it's some bug in any of the libs involved ? i thought maybe
there is some miraculous switch in some configure script which has to be
set ?
but, anyway, thanks for your help,
tonz

 
 
 

SoOffscreenRenderer

Post by Christoph Hintermülle » Fri, 13 Jun 2003 19:04:44


Hi


> i thmpile and it doesn't crash immediately.
> but if i change the size of the viewport region to 640 and 480 or to 40
> and 40 it crashes.
> i don't get it if i try this at home, it doesn't only kills the app but
> also the whole x server.

Sounds like the problem I hade when switching from sortware rendering (Mesa)
to hardware rendering. The problem finally was solved by setting x Server
to at least 24bit truecolor mode.
I' do not know if this strange bug exist in other openinventor reaisations
too, in TGS version at least up to 3.1 it does.
Wehn x server is set to less than 24bit turecolor eg 16 or 15 bit packed
pixels offscreen renderer will crash X server with sig11.
As far as i do understand X this is linked to the fact that in Mesa
offscreen rendering is (i call it so) a completely independent device whith
independent settings. If hardware rendering as with nvidia drivers is used
offscreen rendering is done on the same device as onscreen rendering. So if
server is set to 16 or 15 bit packed pixesl mode the buffer available to
offscreenrenderer would be maxX * maxY * 2 byte and not as requested and
assumed by offscreenrenderer maxX * maxY * 3(4) byte truecolor.
If you look at X log X complains about select returning 0 berfore
offscreenrenderer crasches X with sig 11 uppon acessing non available and
therefore invalid visiual or so.

Short make sure your X server is set to 24 Bit turecolormode per default.

hope that helps.
cu
Christoph

 
 
 

1. Q: Antialiasing for SoOffscreenRenderer

Hallo,

how can I switch on a Antialiasing procedure for an SoOffscreenRenderer
(OpenInventor)?

The problem is:
the images from SoXtExaminerViewer looks much better then the images
from SoOffscreenRenderer.

Please help me.

--
Andreas Herzog
http://ipe.et.uni-magdeburg.de/~herzog/

*******************************************************************
here is a part of my program for offsreen rendering:

// Camera
SoPerspectiveCamera *offCamera = new SoPerspectiveCamera;

// new root
SoSeparator *offroot = new SoSeparator;
offroot->ref();

// Add Camera
offroot->addChild(offCamera);
// Add light
offroot->addChild(new SoDirectionalLight);

// Add objects
offroot->addChild(root);

// Create a viewport to render the scene into.
SbViewportRegion myViewport;
SbVec2s * myRes = new SbVec2s((short) xsize,(short) ysize);
SbVec2f myViewOrigin;
myViewport.setWindowSize(*myRes);

// Create the Renderer
SoOffscreenRenderer *myRenderer =
        new SoOffscreenRenderer(myViewport);

// set up the renderer
myRenderer->setBackgroundColor(SbColor(backcol[0],backcol[1],backcol[2]));

// set up viewport
offCamera->viewAll(offroot,myViewport);

// Rendern
if (!myRenderer->render(offroot)) {
        delete myRenderer;
        printf("Render Error\n");
    }

// open output file
FILE *myFile = fopen(out_name, "w");
if (myFile == NULL) {
  fprintf(stderr, "Cannot open output file\n");
  exit(1);
  }

// write file
myRenderer->writeToRGB(myFile);
fclose(myFile);
fflush(stdout);  
offroot->unref();

2. HELP!!!!!!

3. SoOffscreenRenderer crashes Onyx

4. Forgive my language!!

5. Inventor SoOffscreenRenderer memory leak

6. Clusters and joints, reassigning membership?

7. SoOffScreenRenderer in Open Inventor

8. How do I turn off auto-resizing when resizing a VB5 form? I want the old style...

9. SoOffscreenRenderer problem on Power Indigo2

10. SoOffscreenRenderer

11. SoOffscreenRenderer under Inventor 2.0.1

12. SoOffScreenRenderer - example

13. SoOffScreenRenderer