Revision b01acdaf
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/deform/DeformRenderer.java | ||
---|---|---|
26 | 26 |
import org.distorted.library.DistortedEffects; |
27 | 27 |
import org.distorted.library.DistortedFramebuffer; |
28 | 28 |
import org.distorted.library.DistortedTexture; |
29 |
import org.distorted.library.GridObject;
|
|
30 |
import org.distorted.library.GridFlat;
|
|
29 |
import org.distorted.library.MeshObject;
|
|
30 |
import org.distorted.library.MeshFlat;
|
|
31 | 31 |
|
32 | 32 |
import org.distorted.library.EffectNames; |
33 | 33 |
import org.distorted.library.EffectTypes; |
... | ... | |
53 | 53 |
private GLSurfaceView mView; |
54 | 54 |
private DistortedTexture fpsTexture, stretchTexture; |
55 | 55 |
private DistortedEffects fpsEffects, stretchEffects; |
56 |
private GridObject fpsGrid, stretchGrid;
|
|
56 |
private MeshObject fpsMesh, stretchMesh;
|
|
57 | 57 |
private DistortedFramebuffer mScreen; |
58 | 58 |
private Static3D touchPoint; |
59 | 59 |
|
... | ... | |
182 | 182 |
|
183 | 183 |
long time = System.currentTimeMillis(); |
184 | 184 |
|
185 |
mScreen.renderTo(stretchTexture,stretchGrid,stretchEffects,time);
|
|
185 |
mScreen.renderTo(stretchTexture, stretchMesh,stretchEffects,time);
|
|
186 | 186 |
|
187 | 187 |
mPaint.setColor(0xffffffff); |
188 | 188 |
fpsCanvas.drawRect(0, 0, fpsW, fpsH, mPaint); |
... | ... | |
190 | 190 |
fpsCanvas.drawText(fpsString, fpsW/2, 5*fpsH/6, mPaint); |
191 | 191 |
|
192 | 192 |
fpsTexture.setTexture(fpsBitmap); |
193 |
mScreen.renderTo(fpsTexture,fpsGrid,fpsEffects,time);
|
|
193 |
mScreen.renderTo(fpsTexture, fpsMesh,fpsEffects,time);
|
|
194 | 194 |
|
195 | 195 |
computeFPS(time); |
196 | 196 |
} |
... | ... | |
244 | 244 |
Canvas stretchCanvas; |
245 | 245 |
|
246 | 246 |
stretchTexture = new DistortedTexture(w,h); |
247 |
stretchGrid = new GridFlat(50,50*h/w);
|
|
247 |
stretchMesh = new MeshFlat(50,50*h/w);
|
|
248 | 248 |
Bitmap stretchBitmap = Bitmap.createBitmap(w,h, Bitmap.Config.ARGB_8888); |
249 | 249 |
stretchCanvas = new Canvas(stretchBitmap); |
250 | 250 |
|
... | ... | |
266 | 266 |
touchPoint= new Static3D(0,0,0); |
267 | 267 |
|
268 | 268 |
fpsTexture = new DistortedTexture(fpsW,fpsH); |
269 |
fpsGrid = new GridFlat(1,1);
|
|
269 |
fpsMesh = new MeshFlat(1,1);
|
|
270 | 270 |
|
271 | 271 |
fpsBitmap = Bitmap.createBitmap(fpsW,fpsH, Bitmap.Config.ARGB_8888); |
272 | 272 |
fpsCanvas = new Canvas(fpsBitmap); |
Also available in: Unified diff
Rename Grid to Mesh