[osg-users] Optimizations and fps increasing problem

Gordon Tomlinson gordon at gordon-tomlinson.com
Wed Sep 17 04:11:25 PDT 2008

1)      I  doubt any one on this list can really help you with your first
question little question, as we have absolutely no information or knowledge
about your application, what you're doing, what data your using, it's simply
next to impossible to answer, apart from I would suggest your code is the
probably issue

2)      Yes Jpeg images have to be uncompressed, as to what memory that
take, you could create a visitor to traverse you models/scenegraph after you
have loaded it and get the osg::Textures from the models state and get the
image data, or open you jpegs in something like Photoshop and see it
uncompressed, on Irix you could run the images through imageinfo and get the
size, or just get the width/height and simply calculate the RGB/RGBA size
straight forward to do

3)      Use DDS if you want to use less texture

4)      Reference counted objects are deleted when their reference count
gets to zero see Paul Marts Quick Guide to OSG for more details and
http://dburns.dhs.org/OSG/Articles/RefPointers/RefPointers.html <http://> 


Gordon Tomlinson 

gordon at GordonTomlinson.com
IM: gordon3dBrit at 3dscenegraph.com
www.vis-sim.com <http://www.vis-sim.com/>  www.gordontomlinson.com



From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Vincent
Sent: Wednesday, September 17, 2008 6:53 AM
To: osg
Subject: [osg-users] Optimizations and fps increasing problem


Hi all,

First of all, a little question : I have a draw time increasing... after
about 10 minutes the FPS is little due to very hight draw time... What can
do that ? what the draw do ?

Here are some questions about OSG application optimizations :

When applying a jpeg texture on a node, I suppose that the texture is
uncompressed, and I can assume that it takes the size equal to the same BMP
picture. Even if the 
Texture::setUnrefImageDataAfterApply is true, how can I compute the memory
the picture uses ? I just want to make my program use less memory...

About the Ref_ptr : when are they deleted ? because I saw that when elements
in the scene are deleted, memory decrease a little... and some minutes after
that, memory has decreased more... So I assume that the ref_ptr sometimes
takes more time to free the datas... isn't it ?

Thanks a lot.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080917/142759d7/attachment-0003.htm>

More information about the osg-users mailing list