protected void checkHandles(GLDrawContext gl) throws IllegalBufferException { if (texture == null || !texture.isValid()) { texture = gl.generateTexture(twidth, theight, tdata, name); } if(geometryIndex == null || SharedGeometry.isInvalid(gl, geometryIndex)) { geometryIndex = SharedGeometry.addGeometry(gl, getGeometry()); } }
private void checkStaticHandles(GLDrawContext gl) throws IllegalBufferException { checkHandles(gl); if(buildHandle == null || !buildHandle.isValid()) { buildHandle = gl.generateGeometry(3, EGeometryFormatType.Texture2D, true, "building-progress"); } if(rectHandle == null || SharedGeometry.isInvalid(gl, rectHandle)) { rectHandle = SharedGeometry.addGeometry(gl, SharedGeometry.createQuadGeometry(0, 1, 1, 0, 0, 0, 1, 1)); } }