Hi Ulrich,

Thanks for that, I commented out the creation of stateset for each Geode.
This resulted in an incredible 250MBytes of saved memory - this is for a
model with only 200,000 renderable objects as well so I guess Stateset is
using (or causing to be used) ~1kb/object?

Our app still uses more memory than the legacy app to load the same scene
(1.050GB vs 800MB) but the gap is closing. Hey before I started optmising it
was 1.8GB vs 800MB!

I will definitely be looking into colouring the objects using shared
statesets - or just setting a colour array to the whole primitiveset.

Thanks,
Andrew

Now the only problem - everything's grey! But I am thinking to use the

On Wed, Jul 15, 2009 at 4:20 PM, Ulrich Hertlein <[email protected]>wrote:

> Hi Andrew,
>
> On 15/7/09 2:29 PM, Andrew Burnett-Thompson wrote:
>
>> My next big issue is memory usage. I am finding the OSG app as it stands
>> is using approximately 50% more memory than a legacy app we are
>> replacing, which is just coded in standard OpenGL.
>> ...
>> For each object in the scene (of which there may be up to 1.5m objects),
>> I am creating the following OSG constructs:
>>
>> ...
>> 3. 1x Stateset per Geode containing material data (objects are a single
>> colour, no textures).
>>
>
> If you're only dealing with a handful of colours then you could also share
> the StateSets.
> This will reduce the memory footprint *and* improve performance since the
> state handling code can quickly group all geometries using a common StateSet
> together.
>
> You mentioned that this is a CAD-style application, so maybe that makes
> sense in this case?  Simplest case: one StateSet for red geomtry, one for
> green, one for blue; or maybe by type?
>
> Cheers,
> /ulrich
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to