public void reload() { id = new SmartTexture( bitmap ).id; filter( fModeMin, fModeMax ); wrap( wModeH, wModeV ); }
private static RectF rect(Image icon, int x, int y, int w, int h ) { return icon.texture.uvRect( x, y, x + w, y + h); } }
public synchronized static void reload() { for (SmartTexture tx : all.values()) { tx.reload(); } }
private void drawRays() { NoosaScript script = NoosaScript.get(); texture.bind(); script.uModel.valueM4( matrix ); script.lighting( rm, gm, bm, am, ra, ga, ba, aa ); script.camera( camera ); script.drawElements( vertices, indices, nRays * 3 ); } }
public synchronized static SmartTexture createSolid( int color ) { final String key = "1x1:" + color; if (all.containsKey( key )) { return all.get( key ); } else { Bitmap bmp = Bitmap.createBitmap( 1, 1, Bitmap.Config.ARGB_8888 ); bmp.eraseColor( color ); SmartTexture tx = new SmartTexture( bmp ); all.put( key, tx ); return tx; } }
r.texture = new SmartTexture(bitmap, Texture.NEAREST, Texture.CLAMP, true); RectF rect = r.texture.uvRect(0, 0, r.width, r.height); r.frame(rect);
public ShadowBox() { super( Assets.SHADOW, 1 ); //If this is the first time the texture is generated, set the filtering if (texture.id == -1) texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR ); scale.set( SIZE, SIZE ); }
public SkinnedBlock( float width, float height, Object tx ) { super( tx ); texture.wrap( Texture.REPEAT, Texture.REPEAT ); size( width, height ); }
@Override public void bitmap( Bitmap bitmap ) { bitmap( bitmap, false ); }
public synchronized static void remove( Object key ){ SmartTexture tx = all.get( key ); if (tx != null){ all.remove(key); tx.delete(); } }
public void reload() { id = -1; generate(); }
private void drawRays() { NoosaScript script = NoosaScript.get(); texture.bind(); script.uModel.valueM4( matrix ); script.lighting( rm, gm, bm, am, ra, ga, ba, aa ); script.camera( camera ); script.drawElements( vertices, indices, nRays * 3 ); } }
public synchronized static SmartTexture get( Object src ) { if (all.containsKey( src )) { return all.get( src ); } else if (src instanceof SmartTexture) { return (SmartTexture)src; } else { SmartTexture tx = new SmartTexture( getBitmap( src ) ); all.put( src, tx ); return tx; } }
public ShadowBox() { super( Assets.SHADOW, 1 ); texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR ); scale.set( SIZE, SIZE ); }
public SkinnedBlock( float width, float height, Object tx ) { super( tx ); texture.wrap( Texture.REPEAT, Texture.REPEAT ); size( width, height ); }
@Override public void bitmap( Bitmap bitmap ) { bitmap( bitmap, false ); }
public static void clearCache(){ for (CachedText cached : textCache.values()){ cached.texture.delete(); } cachedChars = 0; textCache.clear(); }
public void reload() { id = -1; generate(); }