Hello Pablo,

On 11/08/2010 10:12 AM, Pablo Carneiro Elias wrote:
> we've recently found an issue under win 64 using a NVIDIA Quadro FX 5800
> and OpenSG 2.0.
>
> The problem is that for some reason, all OpenGL context data (textures,
> diplaylists, etc) are being removed from graphics cards when a OpenSG
> node is culled (is not visible) and frustum culling is enabled in OpenSG.
> That fact causes a dramatic fall in frame rate when moving the camera in
> a way that the whole scene gets out of sight and in sight again.. When
> the scene leaves the frustum, a lot of data within graphics context is
> erased, and when it enters again inside the view frustum, the whole data
> is sent to the graphics card, making the frame rate very slow. If we
> move very fast the camera, but still keeping the whole scene visible,
> the frame rate reamins high and the movement is smooth. So the problem
> is the data transfer caused by the frustum culling.
>
> This problem does not occurs under linux and with the same graphics card.
>
> Since we're not totally sure about whats the real cause of problem
> (windows drivers or opensg code), I'm asking you for help. Maybe anyone
> have had the same problem....
>
> Is there any thing we can do using OpenSG to
> avoid retransmitting  conext data when frustum culling occur, but still
> culling the node? Theres no need to delete texture from graphics card if
> the owner node is not rendered, unless theres a lack of space within
> graphics card, which is not the case.

exactly, the frustum culling simply does not traverse parts of the scene 
that are found to be outside the view, it does not [1] affect OpenGL 
resources.
The status of OpenGL resources is tracked by OpenSG with instances of 
type GLObject that live in the window (which corresponds to a context in 
OpenSG). Generally, they are marked for updates from the changed() 
method of a container, e.g. TextureObjChunk notes a change of its Image 
and marks its GLObject for an update. Next time rendering wants to use 
the texture (i.e. TextureObjChunk::activate() is called), it is noted 
that the resource is out of date and a refresh is caused.

What method have you used to determine that OpenGL resources are erased 
and reuploaded? Have you run the program under GLIntercept or so and see 
calls to glTex{Sub}Image()? I don't have an alternative explanation for 
the effect you describe, but would like to be sure we are looking at the 
correct source for it.

        Cheers,
                Carsten

[1] well, it should not ;) - but I also don't really see how it even 
could cause GL resources to become invalid...

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to