/** Construct a new FloatCounter * @param windowSize The size of the mean window or 1 or below to not use a windowed mean. */ public FloatCounter (int windowSize) { mean = (windowSize > 1) ? new WindowedMean(windowSize) : null; reset(); }
/** Construct a new FloatCounter * @param windowSize The size of the mean window or 1 or below to not use a windowed mean. */ public FloatCounter (int windowSize) { mean = (windowSize > 1) ? new WindowedMean(windowSize) : null; reset(); }
@Override public void onSurfaceCreated (javax.microedition.khronos.opengles.GL10 gl, EGLConfig config) { eglContext = ((EGL10)EGLContext.getEGL()).eglGetCurrentContext(); setupGL(gl); logConfig(config); updatePpi(); Mesh.invalidateAllMeshes(app); Texture.invalidateAllTextures(app); Cubemap.invalidateAllCubemaps(app); TextureArray.invalidateAllTextureArrays(app); ShaderProgram.invalidateAllShaderPrograms(app); FrameBuffer.invalidateAllFrameBuffers(app); logManagedCachesStatus(); Display display = app.getWindowManager().getDefaultDisplay(); this.width = display.getWidth(); this.height = display.getHeight(); this.mean = new WindowedMean(5); this.lastFrameTime = System.nanoTime(); gl.glViewport(0, 0, this.width, this.height); }
@Override public void onSurfaceCreated (javax.microedition.khronos.opengles.GL10 gl, EGLConfig config) { eglContext = ((EGL10)EGLContext.getEGL()).eglGetCurrentContext(); setupGL(gl); logConfig(config); updatePpi(); Mesh.invalidateAllMeshes(app); Texture.invalidateAllTextures(app); Cubemap.invalidateAllCubemaps(app); TextureArray.invalidateAllTextureArrays(app); ShaderProgram.invalidateAllShaderPrograms(app); FrameBuffer.invalidateAllFrameBuffers(app); logManagedCachesStatus(); Display display = app.getWindowManager().getDefaultDisplay(); this.width = display.getWidth(); this.height = display.getHeight(); this.mean = new WindowedMean(5); this.lastFrameTime = System.nanoTime(); gl.glViewport(0, 0, this.width, this.height); }
/** Construct a new FloatCounter * @param windowSize The size of the mean window or 1 or below to not use a windowed mean. */ public FloatCounter (int windowSize) { mean = (windowSize > 1) ? new WindowedMean(windowSize) : null; reset(); }
public DriftBar () { seconds = 0; labelSeconds = new HudLabel(FontFace.CurseRedYellowNew, "s", false); labelSeconds.setAlpha(0); // texHalf = Art.texCircleProgressHalf; texHalfMask = Art.texCircleProgressHalfMask; w = texHalf.getWidth(); h = texHalf.getHeight(); offX = w / 2; offY = h / 2; shDriftSecs = ShaderLoader.fromFile("progress", "progress"); // drift seconds sprDriftSecs = new Sprite(texHalf); sprDriftSecs.flip(false, true); // drift strength driftStrength = new WindowedMean((int)(1 / 0.25f)); sprDriftStrength = new Sprite(texHalf); }