private void makeOpenglTexture(final Bitmap aBitmapARGB32) { myWidth = aBitmapARGB32.getWidth(); myHeight = aBitmapARGB32.getHeight(); myOglTextureId = myUtilities.makeNewOpenglTexture(); myHasTextureIdFlag = true; myUtilities.setTexturePixels(aBitmapARGB32); }
public final void makeUsing(final Bitmap aBitmap) { // #if DEBUG Assert.isFalse("not made", myHasTextureIdFlag); // #endif myWidth = aBitmap.getWidth(); myHeight = aBitmap.getHeight(); makeOpenglTexture(aBitmap); }
private Bitmap makeProperBitmap(final Bitmap aBitmap, final int aWidth, final int aHeight) { final Bitmap bitmap = Bitmap.createBitmap(aWidth, aHeight, Bitmap.Config.ARGB_8888); myTextureCloneCanvas.setBitmap(bitmap); myTextureCloneCanvas.drawBitmap(aBitmap, 0, 0, myTextureClonePaint); // #if DEBUG Log.debug("created proper texture bitmap"); Log.debug("bitmap size: {}x{}", aBitmap.getWidth(), aBitmap.getHeight()); Log.debug("proper size: {}x{}", aWidth, aHeight); // #endif return bitmap; }