Re: [Plib-devel] ssgVtxTable question
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-02-24 05:45:46
|
"Curtis L. Olson" wrote: > > Steve, > > When creating an ssgVtxTable, is it legal for the calling application > to keep track of the color array (for instance) and periodically > modify it to dynamically change the color of the object? Yes! Absolutely. The only thing you have to be careful about is that if you move the vertices around then there is a risk that you'll move one or more vertices outside the bounding sphere of the object - with potentially dire consequences. You can fix that by telling SSG to recompute the bounding sphere: my_leaf_node -> dirtyBSphere () ; ..."dirtying" the bounding sphere doesn't force it to be immediately recomputed - but instead this will be delayed until the node is actually a candidate for display...it's much more efficient to do this when there are multiple leaf nodes being changed each frame. The alternative is to set up a large enough bounding sphere at the start of the game to contain all of the possible positions of the vertices in the mode. Anyway, colours, normals and texture coordinates don't suffer from this problem...you can just change them at will. > Also, can you point me to an example of creating an ssgState that does > smooth interpolations between the vertex colors, but is intended for > use without lighting and lets me set the colors explicitely with the > ssgColourArray ... Just disable lighting - and it'll just do exactly what you want. Make sure glShadeModel is GL_GOURAUD. > (I'm thinking sky-dome object here ...) Yep. > Thanks, > > Curt. > -- > Curtis Olson University of MN, ME Dept. Flight Gear Project > Twin Cities cu...@me... cu...@fl... > Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org > > _______________________________________________ > plib-devel mailing list > pli...@li... > http://lists.sourceforge.net/mailman/listinfo/plib-devel -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |