@@ -78,33 +78,33 @@ void State::popView(const View& view)
7878 if ((viewportStateHint & DYNAMIC_VIEWPORTSTATE) && view.camera && view.camera ->viewportState ) popView (view.camera ->viewportState );
7979}
8080
81- void State::inherit (State& state, StateInheritanceMask inheritanceMask )
81+ void State::inherit (State& state)
8282{
83+ reserve (state.maxSlots );
84+
8385 reset ();
8486
8587 dirty = true ;
86- maxSlots = state.maxSlots ;
87- activeMaxStateSlot = state.activeMaxStateSlot ;
8888
89- if ((inheritanceMask & StateInheritanceMask::INHERIT_VIEWPOINTS ) != 0 )
89+ if ((inheritanceMask & InheritanceMask::INHERIT_VIEWPOINT ) != 0 )
9090 {
9191 inheritViewForLODScaling = state.inheritViewForLODScaling ;
9292 inheritedProjectionMatrix = state.inheritedProjectionMatrix ;
9393 inheritedViewMatrix = state.inheritedViewMatrix ;
9494 inheritedViewTransform = state.inheritedViewTransform ;
9595 }
9696
97- if ((inheritanceMask & StateInheritanceMask ::INHERIT_STATE) != 0 )
97+ if ((inheritanceMask & InheritanceMask ::INHERIT_STATE) != 0 )
9898 {
9999 stateStacks = state.stateStacks ;
100100 }
101101
102- if ((inheritanceMask & StateInheritanceMask ::INHERIT_VIEWPORT_STATE_HINT) != 0 )
102+ if ((inheritanceMask & InheritanceMask ::INHERIT_VIEWPORT_STATE_HINT) != 0 )
103103 {
104104 viewportStateHint = state.viewportStateHint ;
105105 }
106106
107- if ((inheritanceMask & StateInheritanceMask ::INHERIT_MATRICES) != 0 )
107+ if ((inheritanceMask & InheritanceMask ::INHERIT_MATRICES) != 0 )
108108 {
109109 projectionMatrixStack = state.projectionMatrixStack ;
110110 modelviewMatrixStack = state.modelviewMatrixStack ;
0 commit comments