public void call() { glCallList(id); }
public static void renderSphereGeometry() { if (displayListSphere == -1) { displayListSphere = glGenLists(1); Sphere sphere = new Sphere(); glNewList(displayListSphere, GL11.GL_COMPILE); sphere.draw(1, 8, 8); glEndList(); } glCallList(displayListSphere); } }
private void drawSkysphere(float zFar) { if (displayListSphere == -1) { displayListSphere = glGenLists(1); Sphere sphere = new Sphere(); sphere.setTextureFlag(true); glNewList(displayListSphere, GL11.GL_COMPILE); float skyBoxDistance = (zFar > 1024 ? 1024.0f : zFar * 0.95f); sphere.draw(skyBoxDistance, 16, 128); glEndList(); } glCallList(displayListSphere); }
public void renderLocally(float lineThickness) { CoreRegistry.get(ShaderManager.class).enableDefault(); if (displayListWire == -1) { generateDisplayListWire(); } glPushMatrix(); glTranslated(0f, aabb.getCenter().y, 0f); glLineWidth(lineThickness); glCallList(displayListWire); glPopMatrix(); }
public void renderSolidLocally() { CoreRegistry.get(ShaderManager.class).enableDefault(); if (displayListSolid == -1) { generateDisplayListSolid(); } glEnable(GL_BLEND); glPushMatrix(); glTranslated(0f, aabb.getCenter().y, 0f); glScalef(1.5f, 1.5f, 1.5f); glCallList(displayListSolid); glPopMatrix(); glDisable(GL_BLEND); }
private static void renderQuad() { if (displayListQuad == -1) { displayListQuad = glGenLists(1); glNewList(displayListQuad, GL11.GL_COMPILE); glBegin(GL_QUADS); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glTexCoord2d(0.0, 0.0); glVertex3i(-1, -1, -1); glTexCoord2d(1.0, 0.0); glVertex3i(1, -1, -1); glTexCoord2d(1.0, 1.0); glVertex3i(1, 1, -1); glTexCoord2d(0.0, 1.0); glVertex3i(-1, 1, -1); glEnd(); glEndList(); } glCallList(displayListQuad); } }
/** * Renders the backdrop of the scene - in this implementation: the skysphere. */ @Override public void process() { PerformanceMonitor.startActivity("rendering/" + getUri()); // Common Shader Parameters sunDirection = backdropProvider.getSunDirection(false); turbidity = backdropProvider.getTurbidity(); skyMaterial.setFloat("daylight", backdropProvider.getDaylight(), true); skyMaterial.setFloat3("sunVec", sunDirection, true); // Shader Parameters skyMaterial.setFloat3("zenith", getAllWeatherZenith(backdropProvider.getSunDirection(false).y, turbidity), true); skyMaterial.setFloat("turbidity", turbidity, true); skyMaterial.setFloat("colorExp", backdropProvider.getColorExp(), true); skyMaterial.setFloat4("skySettings", sunExponent, moonExponent, skyDaylightBrightness, skyNightBrightness, true); // Actual Node Processing glCallList(skySphere); // Draws the skysphere PerformanceMonitor.endActivity(); }
/** * Renders the sky, reflected, into the buffers attached to the "engine:sceneReflected" FBO. It is used later, * to render horizontal reflective surfaces, i.e. water. * * Notice that this method clears the FBO, both its color and depth attachments. Earlier nodes using the * same buffers beware. */ @Override public void process() { PerformanceMonitor.startActivity("rendering/" + getUri()); // Common Shader Parameters sunDirection = backdropProvider.getSunDirection(false); turbidity = backdropProvider.getTurbidity(); skyMaterial.setFloat("daylight", backdropProvider.getDaylight(), true); skyMaterial.setFloat3("sunVec", sunDirection, true); // Specific Shader Parameters skyMaterial.setFloat3("zenith", getAllWeatherZenith(sunDirection.y, turbidity), true); skyMaterial.setFloat("turbidity", turbidity, true); skyMaterial.setFloat("colorExp", backdropProvider.getColorExp(), true); skyMaterial.setFloat4("skySettings", sunExponent, moonExponent, skyDaylightBrightness, skyNightBrightness, true); // Actual Node Processing glCallList(skySphere); // Draws the skysphere PerformanceMonitor.endActivity(); }
glCallList(lightSphereDisplayList); // draws the light sphere
/** * Draw the given display list. */ public void renderDisplayList(final int displayListID) { GL11.glCallList(displayListID); }
/** * @see org.newdawn.slick.opengl.renderer.SGL#glCallList(int) */ public void glCallList(int id) { GL11.glCallList(id); }
public void draw() { glCallList(list); }
public void render() { Preconditions.checkState(isValid, "Display list not initialized"); GL11.glCallList(displayList); }
public void render() { if (!isValid) { throw new UnsupportedOperationException("Can't use a removed list"); } GL11.glCallList(listID); lastUsed = System.currentTimeMillis(); }
@Override public void render() { if (isDisplayListValid()) { GL11.glCallList(displayList); } }
public void doRender(float f, boolean useParentTransformations) { if (!preRender(f)) return; preTransforms(f, true, useParentTransformations); GL11.glCallList(displayList); if (childModels != null) for (int i = 0; i < childModels.size(); i++) childModels.get(i).render(f); postTransforms(f, true, useParentTransformations); }
public void drawNoBind() { if (!listReady) { listReady = true; glList = GL11.glGenLists(1); GL11.glNewList(glList, GL11.GL_COMPILE); drawVertex(); GL11.glEndList(); } GL11.glCallList(glList); } }
public void glListCall() { if (!glListEnable()) return; if (!glListReady) { GL11.glNewList(glList, GL11.GL_COMPILE); glListDraw(); GL11.glEndList(); glListReady = true; } GL11.glCallList(glList); }
@Override public void renderChunkLayer(final BlockRenderLayer layer) { if (this.initialized) { for (final RenderChunk renderChunk : this.renderChunks) { final ListedRenderChunk listedRenderChunk = (ListedRenderChunk) renderChunk; GlStateManager.pushMatrix(); preRenderChunk(renderChunk); GL11.glCallList(listedRenderChunk.getDisplayList(layer, listedRenderChunk.getCompiledChunk())); GlStateManager.popMatrix(); } GlStateManager.resetColor(); this.renderChunks.clear(); } }
public void render() { if (pendingInvalidate) reset(); if (!isValid) { displayList = GL11.glGenLists(1); GL11.glNewList(displayList, GL11.GL_COMPILE); compile(); GL11.glEndList(); isValid = true; } GL11.glCallList(displayList); }