fixed memory use method and put F4 as debug key
This commit is contained in:
@@ -606,8 +606,8 @@ public class LodRegion implements Serializable
|
||||
//i'm doing a upper limit of the minimum
|
||||
//Color should be just 3 byte but i'm gonna calculate as 12 byte
|
||||
//Height and depth should be just 4 byte but i'm gonna calculate as 8 byte
|
||||
//count += Math.pow(2,LodUtil.REGION_DETAIL_LEVEL-tempLod) * (8 + 3 + 2 + 2 + 1 + 1)
|
||||
count += Math.pow(2, LodUtil.REGION_DETAIL_LEVEL - tempLod) * (24 + 8 + 8 + 8 + 8 + 8);
|
||||
count += Math.pow(2,LodUtil.REGION_DETAIL_LEVEL-tempLod) * (8 + 3 + 2 + 2 + 1);
|
||||
//count += Math.pow(2, LodUtil.REGION_DETAIL_LEVEL - tempLod) * (24 + 8 + 8 + 8 + 8);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package com.seibel.lod.proxy;
|
||||
|
||||
import com.seibel.lod.util.DetailDistanceUtil;
|
||||
import net.minecraftforge.client.event.InputEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -299,6 +300,14 @@ public class ClientProxy
|
||||
DetailDistanceUtil.updateSettings();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onKeyInput(InputEvent.KeyInputEvent event) {
|
||||
//f4 is key 293, the 1 action mean that the key just got pressed
|
||||
if(event.getKey() == 293 && event.getAction() == 1)
|
||||
{
|
||||
LodConfig.CLIENT.debugMode.set(!LodConfig.CLIENT.debugMode.get());
|
||||
}
|
||||
}
|
||||
|
||||
//================//
|
||||
// public getters //
|
||||
|
||||
@@ -275,7 +275,11 @@ public class LodRenderer
|
||||
//===========================//
|
||||
|
||||
// set the required open GL settings
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL);
|
||||
if(LodConfig.CLIENT.debugMode.get()){
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE);
|
||||
}else{
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL);
|
||||
}
|
||||
//GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE);
|
||||
//GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
Reference in New Issue
Block a user