public PseudoPixel() { super( TextureCache.createSolid( 0xFFFFFFFF ) ); }
@Override protected void createChildren() { texture = TextureCache.get( Assets.BUFFS_SMALL ); film = new TextureFilm( texture, SIZE, SIZE ); }
public Halo() { super(); if (!TextureCache.contains( CACHE_KEY )) { Bitmap bmp = Bitmap.createBitmap( RADIUS * 2, RADIUS * 2, Bitmap.Config.ARGB_8888 ); Canvas canvas = new Canvas( bmp ); Paint paint = new Paint(); paint.setColor( 0x0AFFFFFF ); for (int i = 0; i < 50; i++) { canvas.drawCircle(RADIUS, RADIUS, RADIUS * (i+1)/50f, paint); } TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) ); } texture( CACHE_KEY ); }
public FogTexture() { super( Bitmap.createBitmap( width2, height2, Bitmap.Config.ARGB_8888 ) ); filter( Texture.LINEAR, Texture.LINEAR ); TextureCache.add( LightMap.class, this ); }
@Override public void onSurfaceCreated( GL10 gl, EGLConfig config ) { GLES20.glEnable( GL10.GL_BLEND ); // For premultiplied alpha: // GLES20.glBlendFunc( GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA ); GLES20.glBlendFunc( GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA ); GLES20.glEnable( GL10.GL_SCISSOR_TEST ); TextureCache.reload(); }
public Sky( boolean dayTime ) { super( 0, 0, 1, 1 ); texture = TextureCache.createGradient( dayTime ? day : night );
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; } }
@Override public void destroy() { super.destroy(); if (texture != null){ TextureCache.remove(FogOfWar.class); } } }
public FogTexture() { super( Bitmap.createBitmap( width2, height2, Bitmap.Config.ARGB_8888 ) ); filter( Texture.LINEAR, Texture.LINEAR ); TextureCache.add( FogOfWar.class, this ); }
public void onSurfaceCreated() { Blending.useDefault(); //refreshes texture and vertex data stored on the gpu TextureCache.reload(); RenderedText.reloadCache(); Vertexbuffer.refreshAllBuffers(); }
public Sky( boolean dayTime ) { super( 0, 0, 1, 1 ); texture = TextureCache.createGradient( dayTime ? day : night );
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; } }
@Override public void destroy() { super.destroy(); if (texture != null){ TextureCache.remove(FogOfWar.class); } } }
public static TextureFilm tiers() { if (tiers == null) { SmartTexture texture = TextureCache.get( Assets.ROGUE ); tiers = new TextureFilm( texture, texture.width, FRAME_HEIGHT ); } return tiers; }
public PseudoPixel() { super( TextureCache.createSolid( 0xFFFFFFFF ) ); }
public Halo() { super(); if (!TextureCache.contains( CACHE_KEY )) { Bitmap bmp = Bitmap.createBitmap( RADIUS * 2, RADIUS * 2, Bitmap.Config.ARGB_8888 ); Canvas canvas = new Canvas( bmp ); Paint paint = new Paint(); paint.setColor( 0xFFFFFFFF ); canvas.drawCircle( RADIUS, RADIUS, RADIUS * 0.75f, paint ); paint.setColor( 0x88FFFFFF ); canvas.drawCircle( RADIUS, RADIUS, RADIUS, paint ); TextureCache.add( CACHE_KEY, new SmartTexture( bmp ) ); } texture( CACHE_KEY ); origin.set( RADIUS ); }
public Gradient( int colors[] ) { super( Bitmap.createBitmap( colors.length, 1, Bitmap.Config.ARGB_8888 ) ); for (int i=0; i < colors.length; i++) { bitmap.setPixel( i, 0, colors[i] ); } bitmap( bitmap ); filter( LINEAR, LINEAR ); wrap( CLAMP, CLAMP ); TextureCache.add( Gradient.class, this ); } }
@Override public void onSurfaceCreated( GL10 gl, EGLConfig config ) { Blending.useDefault(); //refreshes texture and vertex data stored on the gpu TextureCache.reload(); RenderedText.reloadCache(); Vertexbuffer.refreshAllBuffers(); }
texture = TextureCache.createGradient( gradient );
public 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; } }