List of usage examples for org.lwjgl.opengl GL11 glCallList
public static native void glCallList(@NativeType("GLuint") int list);
From source file:valkyrienwarfare.mod.client.render.FastBlockModelRenderer.java
License:Open Source License
private static void renderBlockModelHighQualityHighRam(BufferBuilder BufferBuilder, Tessellator tessellator, World world, IBlockState blockstateToRender, int brightness) { Map<Integer, Integer> brightnessToGLListMap = highRamGLList.get(blockstateToRender); if (brightnessToGLListMap == null) { highRamGLList.put(blockstateToRender, new HashMap<Integer, Integer>()); brightnessToGLListMap = highRamGLList.get(blockstateToRender); }/*from w w w . j a va 2 s . co m*/ Integer glListForBrightness = brightnessToGLListMap.get(brightness); if (glListForBrightness == null) { GL11.glPushMatrix(); int glList = GLAllocation.generateDisplayLists(1); GL11.glNewList(glList, GL11.GL_COMPILE); renderBlockModelHighQuality(BufferBuilder, tessellator, world, blockstateToRender, brightness); GL11.glEndList(); GL11.glPopMatrix(); glListForBrightness = glList; brightnessToGLListMap.put(brightness, glList); } GL11.glPushMatrix(); GL11.glCallList(glListForBrightness); GL11.glPopMatrix(); }