Revision 698ad0a8
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/examples/bean/BeanRenderer.java | ||
---|---|---|
88 | 88 |
mMove = new Static3D(0,0,0); |
89 | 89 |
mScale= new Static3D(1,1,1); |
90 | 90 |
|
91 |
mEffects = new DistortedEffects(1);
|
|
91 |
mEffects = new DistortedEffects(); |
|
92 | 92 |
mEffects.apply( new VertexEffectDistort(dynLeft , pointLeft , regionLeft) ); |
93 | 93 |
mEffects.apply( new VertexEffectDistort(dynRight, pointRight, regionRight)); |
94 | 94 |
mEffects.apply( new MatrixEffectScale(mScale) ); |
... | ... | |
149 | 149 |
mObjHeight = bitmap.getHeight(); |
150 | 150 |
mObjWidth = bitmap.getWidth(); |
151 | 151 |
|
152 |
mEffects.setStretch(mObjWidth,mObjHeight,0); |
|
153 |
|
|
154 | 152 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
155 | 153 |
mTexture.setTexture(bitmap); |
156 |
if( mMesh==null ) mMesh = new MeshRectangles(25,25*mObjHeight/mObjWidth); |
|
154 |
if( mMesh==null ) |
|
155 |
{ |
|
156 |
mMesh = new MeshRectangles(25,25*mObjHeight/mObjWidth); |
|
157 |
mMesh.setStretch(mObjWidth,mObjHeight,0); |
|
158 |
} |
|
157 | 159 |
|
158 | 160 |
mScreen.detachAll(); |
159 | 161 |
mScreen.attach(mTexture,mEffects,mMesh); |
Also available in: Unified diff
Move the Effects.setStretch to Meshbase.setStretch