Re: [osg-users] Avoiding texture release

2015-10-01 Thread Andreas Ekstrand
Hi Robert,

You're right, it was the sheer amount of texels that was the problem. By adding 
polygons using both set of textures in both switch children, I saw that 
performance was bad all the time instead, due to constant swapping. Guess I 
thought I used a better graphics card. :-) I had to scale down to 4096x4096 
which was fine.

Regards,
Andreas

> 30 sep 2015 kl. 16:56 skrev Robert Osfield :
> 
> Hi Andreas,
> 
> I suspect just letting the OSG do it's thing with be just fine, and it's 
> simply the amount of memory on the GPU that these textures take is 
> fundamental problem you need to address.
> 
> Try texture compression on the textures, or try a small pixel format.
> 
> The other approach would be to tile that data up so you have a set of smaller 
> textures each applied to it's own Geode.
> 
> Robert.
> 
>> On 30 September 2015 at 14:25, Andreas Ekstrand 
>>  wrote:
>> Hi,
>> 
>> I have a switch node with two geodes containing one geometry each, 
>> shallow-copied from the same geometry but with different state sets having 
>> different textures. The textures are large (8192x8192) and this causes a 
>> massive frame drop when switching between the two geodes at runtime. I know 
>> it's the textures causing the hickup since it doesn't happen when not 
>> setting the texture attributes.
>> 
>> I have tried applying a GLObjectsVisitor before adding the geodes to the 
>> switch, and after adding them, setting a 0x node mask. I have tried 
>> applying a TextureVisitor with changeAutoUnref and valueAutoUnref. I have 
>> also tried setting an IncrementalCompileOperation although I don't really 
>> know why. Nothing helps, how can I avoid these frame drops? I guess I want 
>> to avoid a releaseGLObjects happening somewhere?
>> 
>> Regards,
>> Andreas
>> 
>> 
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Avoiding texture release

2015-09-30 Thread Andreas Ekstrand
Hi,

I have a switch node with two geodes containing one geometry each, 
shallow-copied from the same geometry but with different state sets having 
different textures. The textures are large (8192x8192) and this causes a 
massive frame drop when switching between the two geodes at runtime. I know 
it's the textures causing the hickup since it doesn't happen when not setting 
the texture attributes.

I have tried applying a GLObjectsVisitor before adding the geodes to the 
switch, and after adding them, setting a 0x node mask. I have tried 
applying a TextureVisitor with changeAutoUnref and valueAutoUnref. I have also 
tried setting an IncrementalCompileOperation although I don't really know why. 
Nothing helps, how can I avoid these frame drops? I guess I want to avoid a 
releaseGLObjects happening somewhere?

Regards,
Andreas


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Avoiding texture release

2015-09-30 Thread Robert Osfield
Hi Andreas,

I suspect just letting the OSG do it's thing with be just fine, and it's
simply the amount of memory on the GPU that these textures take is
fundamental problem you need to address.

Try texture compression on the textures, or try a small pixel format.

The other approach would be to tile that data up so you have a set of
smaller textures each applied to it's own Geode.

Robert.

On 30 September 2015 at 14:25, Andreas Ekstrand <
andreas.ekstr...@remograph.com> wrote:

> Hi,
>
> I have a switch node with two geodes containing one geometry each,
> shallow-copied from the same geometry but with different state sets having
> different textures. The textures are large (8192x8192) and this causes a
> massive frame drop when switching between the two geodes at runtime. I know
> it's the textures causing the hickup since it doesn't happen when not
> setting the texture attributes.
>
> I have tried applying a GLObjectsVisitor before adding the geodes to the
> switch, and after adding them, setting a 0x node mask. I have tried
> applying a TextureVisitor with changeAutoUnref and valueAutoUnref. I have
> also tried setting an IncrementalCompileOperation although I don't really
> know why. Nothing helps, how can I avoid these frame drops? I guess I want
> to avoid a releaseGLObjects happening somewhere?
>
> Regards,
> Andreas
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org