@Override public void onCreateResources() throws IOException { this.mFaceTexture = new AssetBitmapTexture( this.getTextureManager(), this.getAssets(), "gfx/face_box.png", TextureOptions.BILINEAR); this.mFaceTextureRegion = TextureRegionFactory.extractFromTexture(this.mFaceTexture); this.mFaceTexture.load(); this.mOnScreenControlBaseTexture = new AssetBitmapTexture( this.getTextureManager(), this.getAssets(), "gfx/onscreen_control_base.png", TextureOptions.BILINEAR); this.mOnScreenControlBaseTextureRegion = TextureRegionFactory.extractFromTexture(this.mOnScreenControlBaseTexture); this.mOnScreenControlBaseTexture.load(); this.mOnScreenControlKnobTexture = new AssetBitmapTexture( this.getTextureManager(), this.getAssets(), "gfx/onscreen_control_knob.png", TextureOptions.BILINEAR); this.mOnScreenControlKnobTextureRegion = TextureRegionFactory.extractFromTexture(this.mOnScreenControlKnobTexture); this.mOnScreenControlKnobTexture.load(); }
@Override public void onCreateResources() throws IOException { this.mFaceTexture = new AssetBitmapTexture( this.getTextureManager(), this.getAssets(), "gfx/face_box.png", TextureOptions.BILINEAR_PREMULTIPLYALPHA); this.mFaceTextureRegion = TextureRegionFactory.extractFromTexture(this.mFaceTexture); this.mFaceTexture.load(); }
@Override protected void onCreateResources() { // TODO Auto-generated method stub try { // 1 - Set up bitmap textures ITexture backgroundTexture = new BitmapTexture( this.getTextureManager(), new IInputStreamOpener() { public InputStream open() throws IOException { return getAssets().open("gfx/background.png"); } }); ITexture towerTexture = new BitmapTexture( this.getTextureManager(), new IInputStreamOpener() { public InputStream open() throws IOException { return getAssets().open("gfx/tower.png"); } }); ITexture ring1 = new BitmapTexture( this.getTextureManager(), new IInputStreamOpener() { public InputStream open() throws IOException { return getAssets().open("gfx/ring1.png"); } }); ITexture ring2 = new BitmapTexture( this.getTextureManager(), new IInputStreamOpener() { public InputStream open() throws IOException { return getAssets().open("gfx/ring2.png"); } }); ITexture ring3 = new BitmapTexture( this.getTextureManager(), new IInputStreamOpener() { public InputStream open() throws IOException { return getAssets().open("gfx/ring3.png"); } }); // 2 - Load bitmap textures into VRAM backgroundTexture.load(); towerTexture.load(); ring1.load(); ring2.load(); ring3.load(); // 3 - Set up texture regions this.mBackgroundTextureRegion = TextureRegionFactory.extractFromTexture(backgroundTexture); this.mTowerTextureRegion = TextureRegionFactory.extractFromTexture(towerTexture); this.mRing1 = TextureRegionFactory.extractFromTexture(ring1); this.mRing2 = TextureRegionFactory.extractFromTexture(ring2); this.mRing3 = TextureRegionFactory.extractFromTexture(ring3); // 4 - Create the stacks this.mStack1 = new Stack(); this.mStack2 = new Stack(); this.mStack3 = new Stack(); } catch (IOException e) { Debug.e(e.getStackTrace().toString()); } }