From cc4f30a9fb7355540e648d61756e59602302675b Mon Sep 17 00:00:00 2001 From: "eric.spitz2000@gmail.com" Date: Fri, 20 May 2011 19:23:32 +0000 Subject: [PATCH] [Removed] FrameBuffer methods from Texture. Improved versions are available in ScreenUtils --- gdx/src/com/badlogic/gdx/graphics/Texture.java | 38 -------------------------- 1 file changed, 38 deletions(-) diff --git a/gdx/src/com/badlogic/gdx/graphics/Texture.java b/gdx/src/com/badlogic/gdx/graphics/Texture.java index 7b3cbc8e5..d6f02af82 100644 --- a/gdx/src/com/badlogic/gdx/graphics/Texture.java +++ b/gdx/src/com/badlogic/gdx/graphics/Texture.java @@ -500,7 +500,6 @@ public class Texture implements Disposable { public static String getManagedStatus() { StringBuilder builder = new StringBuilder(); - int i = 0; builder.append("Managed textures/app: { "); for(Application app: managedTextures.keySet()) { builder.append(managedTextures.get(app).size()); @@ -520,41 +519,4 @@ public class Texture implements Disposable { static public void setEnforcePotImages (boolean enforcePotImages) { Texture.enforcePotImages = enforcePotImages; } - -// public static Texture getFrameBufferTexture () { -// ByteBuffer pixels = BufferUtils.newByteBuffer(Gdx.graphics.getWidth() * Gdx.graphics.getHeight() * 4); -// Gdx.gl.glReadPixels(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, pixels); -// Pixmap pixmap = new Pixmap(MathUtils.nextPowerOfTwo(Gdx.graphics.getWidth()), MathUtils.nextPowerOfTwo(Gdx.graphics.getHeight()), Format.RGBA8888); -// -// pixels.position(0); -// int scanSrc = Gdx.graphics.getWidth() * 4; -// int scanDst = pixmap.getWidth() * 4; -// int posSrc = 0; -// int posDst = 0; -// ByteBuffer dst = pixmap.getPixels(); -// ByteBuffer src = pixels; -// for(int i = 0; i < Gdx.graphics.getHeight(); i++) { -// src.position(posSrc); -// src.limit(posSrc + scanSrc); -// dst.position(posDst); -// dst.limit(posDst + scanDst); -// dst.put(src); -// -// posSrc += scanSrc; -// posDst += scanDst; -// } -// -// dst.position(0); -// dst.limit(pixmap.getWidth() * pixmap.getHeight() * 4); -// return new Texture(pixmap); -// -// Texture texture = new Texture(MathUtils.nextPowerOfTwo(Gdx.graphics.getWidth()), -// MathUtils.nextPowerOfTwo(Gdx.graphics.getHeight()), -// Format.RGBA8888); -// texture.setFilter(TextureFilter.Linear, TextureFilter.Linear); -// Gdx.gl.glFlush(); -// texture.bind(); -// Gdx.gl.glCopyTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), 0); -// return texture; -// } } -- 2.11.0