In fact, the main problem when using generateTextureObject() with an empty 
profile is that you cannot reuse it.
The previous created texture objects have been moved to the correct set, and so 
are not available for reuse by the "empty profile" TextureObjectSet where the 
texture is generated.

During my investigation I have also found a small bug in moveToSet() and the 
texture pool size. The texture pool size is not updated with the new profile, 
so it keeps the previous size (0) for the texture object... I wasn't really 
sure about a correct fix for the problem.

I don't have any sample code yet, but I will do something and keep you informed.

Fabien.


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Robert 
Osfield
Sent: jeudi 4 novembre 2010 16:46
To: OpenSceneGraph Submissions
Subject: Re: [osg-submissions] Reusing TextureObject in copyTexImage2D

Hi Fabien,

I have reivewed your change and am happy with it, but the change suggests that 
the scheme for re-assigning the TextureObject to the correct TextureObjectSet 
is broken.  Is this what you found?

Do you have an sample code that reproduces the issue that you were seeing?

Robert.

On Wed, Nov 3, 2010 at 8:28 AM, Fabien Lavignotte 
<[email protected]> wrote:
> I use Texture2D::copyTexImage2D to generate some textures at each 
> frame on a PagedLOD databases.
> There was some performance problems after a long run, because textures 
> created with copyTexImage2D were not reused.
> After investigation, there is a problem with the Texture Pool when a 
> texture object is created with an empty profile, and then move after 
> creation to TextureObjectSet with good profile using setAllocated method.
> I have just changed a little bit the code of 
> Texture2D::copyTexImage2D, to generate the texture object with the good 
> profile at the start.
>
> Cheers,
> Fabien
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscene
> graph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to