Hi Toni,
On Fri, 2005-08-19 at 10:47 +0200, Antonio Bleile wrote:
> Hi,
>
> I want to "preload" my geometry nodes at application
> start-up. I mean, I want to load let's say 100 vrml
> files at start up such that there's no latency when
> I actually make the nodes visible in the scene graph
> through the setTravMask(1) method. I guess some display
> lists or something similar are generated upon first
> render so that's why it takes a bit more the first time
> the geometry gets rendered. That's exactly what I
> want to avoid.
If you use a current version of OpenSG you can use 'win-
>validateAllGLObjects();', which does exactly what you want: initialize
all textures, display lists, shaders etc. that are known to the system.
On older versions you'll have to render everything once on startup,
generally by switching off culling.
> My second question is quite simple: How do I
> retrieve the bounding box of any geometry node? Can't
> find a method called "getBoundingBox" :-)
That's because it's called getVolume() (we can do spheres, too ;):
Vec3f bbmin,bbmax;
node->getVolume(true).getBounds( bbmin, bbmax );
The 'true' recalculates the volume if it's invalid.
Hope it helps
Dirk
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users