diff options
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/magicsmoke/MagicSmokeRS.java | 9 | ||||
-rw-r--r-- | src/com/android/magicsmoke/clouds.rs | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/magicsmoke/MagicSmokeRS.java b/src/com/android/magicsmoke/MagicSmokeRS.java index eb06855..268771f 100644 --- a/src/com/android/magicsmoke/MagicSmokeRS.java +++ b/src/com/android/magicsmoke/MagicSmokeRS.java @@ -262,8 +262,13 @@ class MagicSmokeRS extends RenderScriptScene implements OnSharedPreferenceChange int pixels[] = new int[65536]; in.getPixels(pixels, 0, 256, 0, 0, 256, 256); - mRealTextures[index] = Allocation.createTyped(mRS, mTextureType); - mSourceTextures[index] = Allocation.createTyped(mRS, mTextureType); + mRealTextures[index] = Allocation.createTyped(mRS, mTextureType, + Allocation.MipmapControl.MIPMAP_NONE, + Allocation.USAGE_SCRIPT | + Allocation.USAGE_GRAPHICS_TEXTURE); + mSourceTextures[index] = Allocation.createTyped(mRS, mTextureType, + Allocation.MipmapControl.MIPMAP_NONE, + Allocation.USAGE_SCRIPT); mSourceTextures[index].copyFrom(pixels); in.recycle(); } diff --git a/src/com/android/magicsmoke/clouds.rs b/src/com/android/magicsmoke/clouds.rs index a22e5c7..cc81e57 100644 --- a/src/com/android/magicsmoke/clouds.rs +++ b/src/com/android/magicsmoke/clouds.rs @@ -337,7 +337,7 @@ static void makeTexture(int *src, int *dst, rs_allocation rsid) { } } - rsgUploadToTexture(rsid, 0); + rsgAllocationSyncAll(rsid); } static void makeTextures() { |