public static void UpdateNoneLod(List <MyLodStrategyCachedResult> results, int passId) { MyLodStrategyCachedResult result = new MyLodStrategyCachedResult(); result.Clear(); results[passId * 2] = result; }
public static void UpdateSingleLod(List <MyLodStrategyCachedResult> results, int passId, int currentLod, MyInstanceLodState currentState, float currentStateData) { MyLodStrategyCachedResult result = new MyLodStrategyCachedResult(); result.Set(1, currentLod, currentState, currentStateData); results[passId * 2] = result; }
public static void UpdateTwoLods(List <MyLodStrategyCachedResult> results, int passId, int currentLod, MyInstanceLodState currentState, float currentStateData, int theOtherLod, MyInstanceLodState theOtherState, float theOtherStateData) { MyLodStrategyCachedResult result = new MyLodStrategyCachedResult(); result.Set(2, currentLod, currentState, currentStateData); results[passId * 2] = result; result.Set(2, theOtherLod, theOtherState, theOtherStateData); results[passId * 2 + 1] = result; }
public static void GetLod(List <MyLodStrategyCachedResult> results, int passId, int i, out int lod, out MyInstanceLodState state, out float stateData) { MyRenderProxy.Assert(passId < MyPassIdResolver.AllPassesCount); MyRenderProxy.Assert(i < 2); // more lods than 2 are not supported MyLodStrategyCachedResult result = results[passId * 2 + i]; lod = result.LodNum; state = result.State; stateData = result.StateData; }