summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/RawTexture.java
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-11-16 15:44:26 -0800
committerGeorge Mount <mount@google.com>2012-12-05 11:18:20 -0800
commit837007c09f723dd96cd8e99476de242c633759c2 (patch)
tree67e41902c33cc95b21f2a9cdc77899b0e2ba5221 /src/com/android/gallery3d/ui/RawTexture.java
parent8d26578f8db895dadb7e0e1d7a56c00fa18183ec (diff)
downloadandroid_packages_apps_Snap-837007c09f723dd96cd8e99476de242c633759c2.tar.gz
android_packages_apps_Snap-837007c09f723dd96cd8e99476de242c633759c2.tar.bz2
android_packages_apps_Snap-837007c09f723dd96cd8e99476de242c633759c2.zip
Add GLES20 canvas implementation.
Change-Id: I5680909f31dc097599d0e063aa1f6daba834d3e2
Diffstat (limited to 'src/com/android/gallery3d/ui/RawTexture.java')
-rw-r--r--src/com/android/gallery3d/ui/RawTexture.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/ui/RawTexture.java b/src/com/android/gallery3d/ui/RawTexture.java
index e67848f41..53aef9edc 100644
--- a/src/com/android/gallery3d/ui/RawTexture.java
+++ b/src/com/android/gallery3d/ui/RawTexture.java
@@ -16,6 +16,8 @@
package com.android.gallery3d.ui;
+import android.opengl.GLES20;
+
import javax.microedition.khronos.opengles.GL11;
public class RawTexture extends BasicTexture {
@@ -26,8 +28,6 @@ public class RawTexture extends BasicTexture {
public RawTexture(int width, int height, boolean opaque) {
mOpaque = opaque;
setSize(width, height);
- GLId glId = GLCanvas.getGLId();
- mId = glId.generateTexture();
}
@Override
@@ -36,8 +36,10 @@ public class RawTexture extends BasicTexture {
}
protected void prepare(GLCanvas canvas) {
- canvas.setTextureParameters(this);
+ GLId glId = GLCanvas.getGLId();
+ mId = glId.generateTexture();
canvas.initializeTextureSize(this, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE);
+ canvas.setTextureParameters(this);
mState = STATE_LOADED;
setAssociatedCanvas(canvas);
}