Revision 5f2a53b6
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java | ||
---|---|---|
65 | 65 |
|
66 | 66 |
private DistortedEffects mEffects; |
67 | 67 |
private DistortedTexture mTexture; |
68 |
private MeshFlat mMesh; |
|
68 | 69 |
private DistortedScreen mScreen; |
69 | 70 |
private int bmpHeight, bmpWidth; |
70 | 71 |
private SurfaceView mView; |
... | ... | |
259 | 260 |
if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight); |
260 | 261 |
mTexture.setTexture(bmp); |
261 | 262 |
|
263 |
if( mMesh==null ) mMesh = new MeshFlat(9,9*bmpHeight/bmpWidth); |
|
264 |
|
|
262 | 265 |
mScreen.detachAll(); |
263 |
mScreen.attach(mTexture,mEffects,new MeshFlat(9,9*bmpHeight/bmpWidth));
|
|
266 |
mScreen.attach(mTexture,mEffects,mMesh);
|
|
264 | 267 |
|
265 | 268 |
DistortedEffects.enableEffect(EffectNames.DISTORT); |
266 | 269 |
|
Also available in: Unified diff
Progress with VBOs - this time abstract out a new class, DistortedObject - i.e. everything that uploads something to GPU and thus needs to be auto re-created upon loss of the context.