diff options
Diffstat (limited to 'src/com/android/gallery3d/ui/GLId.java')
-rw-r--r-- | src/com/android/gallery3d/ui/GLId.java | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/com/android/gallery3d/ui/GLId.java b/src/com/android/gallery3d/ui/GLId.java index 689cf192e..04977c337 100644 --- a/src/com/android/gallery3d/ui/GLId.java +++ b/src/com/android/gallery3d/ui/GLId.java @@ -20,31 +20,14 @@ import javax.microedition.khronos.opengles.GL11; import javax.microedition.khronos.opengles.GL11ExtensionPack; // This mimics corresponding GL functions. -public class GLId { - static int sNextId = 1; +public interface GLId { + public int generateTexture(); - public synchronized static void glGenTextures(int n, int[] textures, int offset) { - while (n-- > 0) { - textures[offset + n] = sNextId++; - } - } + public void glGenBuffers(int n, int[] buffers, int offset); - public synchronized static void glGenBuffers(int n, int[] buffers, int offset) { - while (n-- > 0) { - buffers[offset + n] = sNextId++; - } - } + public void glDeleteTextures(GL11 gl, int n, int[] textures, int offset); - public synchronized static void glDeleteTextures(GL11 gl, int n, int[] textures, int offset) { - gl.glDeleteTextures(n, textures, offset); - } + public void glDeleteBuffers(GL11 gl, int n, int[] buffers, int offset); - public synchronized static void glDeleteBuffers(GL11 gl, int n, int[] buffers, int offset) { - gl.glDeleteBuffers(n, buffers, offset); - } - - public synchronized static void glDeleteFramebuffers( - GL11ExtensionPack gl11ep, int n, int[] buffers, int offset) { - gl11ep.glDeleteFramebuffersOES(n, buffers, offset); - } + public void glDeleteFramebuffers(GL11ExtensionPack gl11ep, int n, int[] buffers, int offset); } |