/**
* Loads all the renderers and sets up the basic settings usage
*/
public void loadRenderers()
{
if (this.theWorld != null)
{
if (this.renderDispatcher == null)
{
this.renderDispatcher = new ChunkRenderDispatcher();
}
this.displayListEntitiesDirty = true;
Blocks.LEAVES.setGraphicsLevel(this.mc.gameSettings.fancyGraphics);
Blocks.LEAVES2.setGraphicsLevel(this.mc.gameSettings.fancyGraphics);
this.renderDistanceChunks = this.mc.gameSettings.renderDistanceChunks;
boolean flag = this.vboEnabled;
this.vboEnabled = OpenGlHelper.useVbo();
if (flag && !this.vboEnabled)
{
this.renderContainer = new RenderList();
this.renderChunkFactory = new ListChunkFactory();
}
else if (!flag && this.vboEnabled)
{
this.renderContainer = new VboRenderList();
this.renderChunkFactory = new VboChunkFactory();
}
if (flag != this.vboEnabled)
{
this.generateStars();
this.generateSky();
this.generateSky2();
}
if (this.viewFrustum != null)
{
this.viewFrustum.deleteGlResources();
}
this.stopChunkUpdates();
synchronized (this.setTileEntities)
{
this.setTileEntities.clear();
}
this.viewFrustum = new ViewFrustum(this.theWorld, this.mc.gameSettings.renderDistanceChunks, this, this.renderChunkFactory);
if (this.theWorld != null)
{
Entity entity = this.mc.getRenderViewEntity();
if (entity != null)
{
this.viewFrustum.updateChunkPositions(entity.posX, entity.posZ);
}
}
this.renderEntitiesStartupCounter = 2;
}
}
RenderGlobal.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:CustomWorldGen
作者:
评论列表
文章目录