Revision 3f07bedc
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/effects2d/Effects2DRenderer.java | ||
---|---|---|
41 | 41 |
|
42 | 42 |
public class Effects2DRenderer implements GLSurfaceView.Renderer, EffectListener |
43 | 43 |
{ |
44 |
public static final int NUMLINES = 10;
|
|
45 |
public static final int BWID = 300;
|
|
46 |
public static final int BHEI = 400;
|
|
44 |
private static final int NUMLINES = 10;
|
|
45 |
static final int BWID = 300; |
|
46 |
static final int BHEI = 400; |
|
47 | 47 |
|
48 |
private GLSurfaceView mView; |
|
49 |
public static DistortedBitmap mBackground; |
|
48 |
private Effects2DSurfaceView mView; |
|
50 | 49 |
private Paint mPaint; |
51 | 50 |
private int texWidth, texHeight; |
52 |
|
|
51 |
|
|
52 |
DistortedBitmap mBackground; |
|
53 |
|
|
53 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
54 | 55 |
|
55 |
public Effects2DRenderer(GLSurfaceView v)
|
|
56 |
Effects2DRenderer(Effects2DSurfaceView v)
|
|
56 | 57 |
{ |
57 | 58 |
mPaint = new Paint(); |
58 | 59 |
mPaint.setAntiAlias(true); |
... | ... | |
103 | 104 |
mBackground.abortEffects(EffectTypes.MATRIX); |
104 | 105 |
mBackground.scale( new Static3D((float)width/texWidth,(float)height/texHeight,1) ); |
105 | 106 |
Distorted.onSurfaceChanged(width,height); |
106 |
Effects2DSurfaceView.setScreenSize(width,height);
|
|
107 |
mView.setScreenSize(width,height);
|
|
107 | 108 |
} |
108 | 109 |
|
109 | 110 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Tidy up the 'Effects3D'