Revision 698ad0a8
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/sink/SinkRenderer.java | ||
---|---|---|
65 | 65 |
sink.add(new Static1D(1.0f)); |
66 | 66 |
sink.add(new Static1D(0.2f)); |
67 | 67 |
|
68 |
mEffects = new DistortedEffects(1);
|
|
68 |
mEffects = new DistortedEffects(); |
|
69 | 69 |
VertexEffectSink sinkEffect = new VertexEffectSink(sink, new Static3D(297, 280, 0), null); |
70 | 70 |
mEffects.apply(sinkEffect); |
71 | 71 |
|
... | ... | |
129 | 129 |
bmpHeight = bitmap.getHeight(); |
130 | 130 |
bmpWidth = bitmap.getWidth(); |
131 | 131 |
|
132 |
mEffects.setStretch(bmpWidth,bmpHeight,0); |
|
133 |
|
|
134 | 132 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
135 | 133 |
mTexture.setTexture(bitmap); |
136 |
if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth); |
|
134 |
if( mMesh==null ) |
|
135 |
{ |
|
136 |
mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth); |
|
137 |
mMesh.setStretch(bmpWidth,bmpHeight,0); |
|
138 |
} |
|
139 |
|
|
137 | 140 |
|
138 | 141 |
mScreen.detachAll(); |
139 | 142 |
mScreen.attach(mTexture,mEffects,mMesh); |
Also available in: Unified diff
Move the Effects.setStretch to Meshbase.setStretch