Hello Rene,
Rene Weller wrote:
>>> I switched to daily build and with this version I get no crash
>>> anymore but the warnings.
>>> However, I do not understand it.
>> the FBOViewport gets the window from the action (at least at the point
>> where it prints those warnings). And the window for the action to use
>> is
>> set inside Window::renderAllViewports, but on the first call to
>> display() this has not happened when the two FBO Viewports are
>> rendered.
>> You can fix that by inserting one of the following lines
>>
>> // if you want it to work when compiling with enable_osg2_prep
>> rAct->setWindow(get_pointer(pwin));
>>
>> // otherwise
>> rAct->setWindow(pwin.getCPtr());
>
>> before the call to vpleft->render(rAct);
>
> The program crashes if I call this. However, shouldn`t 29FBOViewport produce
> the same warning? On my setup, it does not.
hm, I'm wondering if this is some kind of ref count problem. The thing
to watch out for in 1.x is that one often uses objects with a ref count
of 0. This is fine most of the time unless they are used in some
operation that temporarily increases the ref count and then drops it
again (back to 0) and then the object is destroyed.
Can you add a call to addRefCP for the global objects you have ?
>> For me it does not quite work even with this change [1], does the
>> example Tutorials/29FBOViewport work for you ?
>
> 29FBOViewport works fine, but my derivative only produces black images. I
> wrote the Texture to png right after the rendering in order to avoid errors
> with the shaders or whatever.
Please note that for the FBO case it is possible that the textures live
*only* in GPU memory. You need to instruct the FBOViewport do download
them to CPU memory explicitly (setReadBuffer(true)).
> Moreover, I changed the background of vpleft,
> but the image is still black, even if I set the camera to the original cam
> of SimpleSceneManager.
The crash you mentioned is suspicious, I'd like to understand why that
is happening and I'm wondering if the warning is also related to that.
Maybe once that is figured out it becomes clearer what is going wrong.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users