RE: [Plib-devel] Texture and blend modes
Brought to you by:
sjbaker
From: Norman V. <nh...@ca...> - 2000-08-19 12:43:22
|
Steve Baker writes: > >"Curtis L. Olson" wrote: > >> Hmmm, yes, for flightgear, there are a couple things I'd like to see >> added to ssg's lazy state evaluator ... > >What - specifically? > >> Let me jump in here and say that I'm not exactly 100% pleased with >> handling these things via a call back function. The call back has no >> way to know the initial state of the element you are interested in >> changing. So, how do you reliably restore the value? How do you know >> if you need to actually change the state or not? You are back to all >> the problems associated with randomly changing state at random points >> in your program ... these are the sorts of problems ssgSimpleState was >> designed to fix. > >Well, that's why you have to decide which things to test before EVERY >leaf node is drawn - and which to set and restore in callbacks. A slightly different but related question. Is it possible to design a branch node that does some of this ? By this I mean that I know that everything below this node will share a common property. Hence short circuting some state change tests at the leaf level for all deeper nodes. This would allow programs such as flightgear that use a higher level bucketing mechanism then OpenGL primitives to minimize state changing when traversing the tree I can envision a similar node type being used for compiled vertex arrays, simplistically bucket node ( lock vertices and set transform here when entering bucket ) / | \ ( if node passes Bounding Sphere test ) / | \ mat1 mat2 mat3 ( set display states here ) / | \ ( should these nodes have Bounding Spheres ?) / | \ Fan Fan Strip ( set texture coordinates and Fine grained BS based Display ) Maybe just a 'short-circut-me' bit in the SimpleState and a would allow this Does this make any sense ?? Norman |