RenderGlobal.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:BaseClient 作者:
private void generateStars()
{
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();

    if (this.starVBO != null)
    {
        this.starVBO.deleteGlBuffers();
    }

    if (this.starGLCallList >= 0)
    {
        GLAllocation.deleteDisplayLists(this.starGLCallList);
        this.starGLCallList = -1;
    }

    if (this.vboEnabled)
    {
        this.starVBO = new VertexBuffer(this.vertexBufferFormat);
        this.renderStars(worldrenderer);
        worldrenderer.finishDrawing();
        worldrenderer.reset();
        this.starVBO.func_181722_a(worldrenderer.getByteBuffer());
    }
    else
    {
        this.starGLCallList = GLAllocation.generateDisplayLists(1);
        GlStateManager.pushMatrix();
        GL11.glNewList(this.starGLCallList, GL11.GL_COMPILE);
        this.renderStars(worldrenderer);
        tessellator.draw();
        GL11.glEndList();
        GlStateManager.popMatrix();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号