Hello Carsten,
> > > hm, I'm afraid nothing comes to mind that would explain this. One > > possibility is that the Stage used to render into your FBO is itself being > > culled > > - can you set the volume of the stage's node to infinite? > > > > The size of the stage is set to (0.0f,0.0f,1.0f,1.0f). Is that what > > you meant? Or do i have to set it to something like > > (-OSG::Inf,-OSG::Inf ,OSG::Inf ,OSG::Inf )? > > no, that is the portion of the FBO written to by the stage (kind of like the > viewport for a window). I meant that since a stage is a type of NodeCore it > has a Node which places it in the scene (usually somewhere close to the root) > - I was referring to that Node's bounding volume. It also means it is subject > to frustum culling, just like any other node. So if the stage is a child of > the scene root, it is in the origin and has a bounding volume that contains > the scene to be rendered into the stage (i.e. the stage's children). > Depending on what you render into the FBO and how you use it, you may want to > render it even if the stage is not inside the camera frustum, in that case > you can make the node of the stage have an infinite bounding volume. > Don't think that is the problem here though, see below. > Ok, in my case the stage is the root node right now, but this will change later. > > > Beyond that I'm not sure where to look for the problem, it sounds a bit > > as if somewhere the modified near value is cached and not updated > > correctly, but why does it update the first time you change it? Can you run > > your > > program under an OpenGL debugger [1] to see if the scene is being frustum > > culled by OpenSG (i.e. no draw calls are being made), is outside OpenGLs > > camera > > volume (i.e. camera values are not correctly updated) or if for some > > reason the read back stops working? That would be very helpful to figure out > > where to look more closely at the code. > > > > > > > I've run the programm and send you the files off-list. > > Thanks! Looking at the log I've noticed that at one point this changes: > from: glClearDepth(1.000000) > to: glClearDepth(0.000000) > > So the problem is that you are clearing the depth buffer with the value for > objects 'in' the near plane and nothing will pass the depth test afterward. > Do you at some point change the clear depth of a background perhaps? > Yes, I changed the clear Depth. But this does just effects, that the values after the near-plane is behind the geometry are not '0' but '255'. It does not affect, that the image values are not changing after that. Perhaps I might describe the behaviour again, I could have made it not clear enough. I start my program and setup the scenegraph. Then I render the scene 4 times in one function, with different states. After the 3rd rendering I print out the stencil values. When I first start the rendering the image shows, what I expect. Then I render more times with different near plane values and the image does not change (but it should) until i reach the point, where the nearplane is beyond the geometry. Then the buffer shows just '255'. After that I change the nearplane value back to where the geometry should be visible, but nothing happens with the image. I hope this helps a bit to understand what I mean. I thougt it could be, that I forget to change the States to the standard values after rendering my 4 times, but I can't explain the sudden change, when the nearplane gets behind the geometry, with that explanation. thank you Constantin ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users