protected void doFlush() { if (!(activeShader instanceof BasicShader)) throw new IllegalStateException("Need Basic Shader in 1.1 mode"); GL11.glNewList(displayList, GL11.GL_COMPILE); ((BasicShader) activeShader).assign(true); GL11.glPushMatrix(); GL11.glBegin(renderMode); for (int i = 0; i < numVerticies; i += 1) { int index = i * 4; if (useColors) GL11.glColor3f( colorBuffer.get(index), colorBuffer.get(index + 1), colorBuffer.get(index + 2)); if (useNormals) GL11.glNormal3f( normalBuffer.get(index), normalBuffer.get(index + 1), normalBuffer.get(index + 2)); if (useTextures) GL11.glTexCoord2f(uvBuffer.get((i * 2)), uvBuffer.get((i * 2) + 1)); GL11.glVertex4f( vertexBuffer.get(index), vertexBuffer.get(index + 1), vertexBuffer.get(index + 2), vertexBuffer.get(index + 3)); } GL11.glEnd(); GL11.glPopMatrix(); GL11.glEndList(); }
static { logger.config("fbo: supported=%s", fboSupported); logger.config("GL13: supported=%s, enabled=%s", gl13Supported, useGL13); int bits = GL11.GL_VIEWPORT_BIT | GL11.GL_SCISSOR_BIT | GL11.GL_DEPTH_BITS | GL11.GL_LIGHTING_BIT; if (useGL13) { bits |= GL13.GL_MULTISAMPLE_BIT; } glAttributes = bits; GL11.glNewList(drawList, GL11.GL_COMPILE); drawBox(); GL11.glEndList(); }