= OSG !StateSet = [[TracNav(Community/OSGExpTOC)]] == General == The !StateSet Helper allows you to further optimise the way your scene is rendered. It gives you control over the order in which different objects are rendered, usign so-called Renderbins. The 'bins' with lower numbers will be rendered before the ones with a higher number. To placing objects in Renderbin 1 ensures they are rendered first. == Possible uses == * Optimisation; == Creating a !StateSet Helper in Max == * Create some geometry; * Add a !StateSet Helper-object to the scene; * On the modify panel use 'Apply State Set on:' to add the geometry to the [wiki:OpenSceneGraph/StateSet StateSet]; * Enter the Renderbin number and name [[Image(OSGStateSetRollout.jpg)]] == Other options == * Render Bin Details: These allow you to set the name and number (order) of the Renderbin this !StateSet uses. (Add explantion about the mode here) * GL Mode: You can use these to exclude the !StateSet from certain rendering calculations. * Cull Face: cull (discard) polygons based on there winding number; * Normalize: scale normal (orientation) vectors to unit length; * Turn of Lighting: Do not use lighting parameters to compute vertex color * Apply !StateSet On: Use this to add the objects to the !StateSet. == More information == * [http://www.cs.fit.edu/~wds/classes/%20prog-graphics/Lectures/primitives.pdf OpenGL primitives] (more about f.i. GL Modes) * [http://www.mekensleep.org/docs/openscenegraph/html/classosgUtil_1_1RenderBin.html OSG Renderbin Class Reference]