Revision 687263cc
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java | ||
---|---|---|
72 | 72 |
Static3D mPoint = new Static3D(305, 220, 0); |
73 | 73 |
|
74 | 74 |
mEffects = new DistortedEffects[NUM]; |
75 |
mEffects[0] = new DistortedEffects(); |
|
75 |
mEffects[0] = new DistortedEffects(1);
|
|
76 | 76 |
for(int i=1; i<NUM; i++) |
77 | 77 |
mEffects[i] = new DistortedEffects(mEffects[0], DistortedLibrary.CLONE_VERTEX| DistortedLibrary.CLONE_FRAGMENT); |
78 | 78 |
|
... | ... | |
174 | 174 |
bmpHeight = bitmap0.getHeight(); |
175 | 175 |
bmpWidth = bitmap0.getWidth(); |
176 | 176 |
|
177 |
mEffects[0].setStretch(bmpWidth,bmpHeight,0); |
|
178 |
|
|
177 | 179 |
if( mTexture==null ) |
178 | 180 |
{ |
179 | 181 |
mTexture = new DistortedTexture[NUM]; |
180 | 182 |
|
181 | 183 |
for(int i=0; i<NUM; i++) |
182 |
mTexture[i] = new DistortedTexture(bmpWidth,bmpHeight);
|
|
184 |
mTexture[i] = new DistortedTexture(); |
|
183 | 185 |
} |
184 | 186 |
|
185 | 187 |
mTexture[0].setTexture(bitmap0); |
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)