Revision 687263cc
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/catanddog/CatAndDogRenderer.java | ||
---|---|---|
92 | 92 |
diRotate.add(new Static1D( 0)); |
93 | 93 |
diRotate.add(new Static1D(360)); |
94 | 94 |
|
95 |
mEffects = new DistortedEffects(); |
|
95 |
mEffects = new DistortedEffects(1);
|
|
96 | 96 |
|
97 | 97 |
mEffects.apply( new MatrixEffectRotate( diRotate, new Static3D(0,0,1), mRotate) ); |
98 | 98 |
mEffects.apply( new MatrixEffectScale(diScale)); |
... | ... | |
142 | 142 |
mObjWidth = bitmap.getWidth(); |
143 | 143 |
mRotate.set(mObjWidth/2,mObjHeight/2,0); |
144 | 144 |
|
145 |
if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight); |
|
145 |
mEffects.setStretch(mObjWidth,mObjHeight,0); |
|
146 |
|
|
147 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
|
146 | 148 |
mTexture.setTexture(bitmap); |
147 | 149 |
|
148 | 150 |
mScreen.detachAll(); |
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)