Revision 687263cc
Added by Leszek Koltunski about 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(); |
|
91 |
mEffects = new DistortedEffects(1);
|
|
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) ); |
... | ... | |
148 | 148 |
|
149 | 149 |
mObjHeight = bitmap.getHeight(); |
150 | 150 |
mObjWidth = bitmap.getWidth(); |
151 |
|
|
152 |
if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight); |
|
151 |
|
|
152 |
mEffects.setStretch(mObjWidth,mObjHeight,0); |
|
153 |
|
|
154 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
|
153 | 155 |
mTexture.setTexture(bitmap); |
154 | 156 |
if( mMesh==null ) mMesh = new MeshRectangles(25,25*mObjHeight/mObjWidth); |
155 | 157 |
|
Also available in: Unified diff
Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)