Revision 7451c98a
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java | ||
---|---|---|
111 | 111 |
private DistortedObjectTree mRoot, mBackground; |
112 | 112 |
private GridFlat mQuad; |
113 | 113 |
|
114 |
|
|
115 | 114 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
116 | 115 |
|
117 | 116 |
StarWarsRenderer(GLSurfaceView v) |
... | ... | |
172 | 171 |
|
173 | 172 |
private void setupScreen(int w, int h) |
174 | 173 |
{ |
175 |
mScreenTexture = new DistortedTexture(w,h,0);
|
|
174 |
mScreenTexture = new DistortedTexture(w,h); |
|
176 | 175 |
mRoot = new DistortedObjectTree(mScreenTexture,mScreenQueue,mQuad); |
177 | 176 |
|
178 |
mCrawlBackgroundTexture = new DistortedTexture(w,(int)(Math.sqrt(3.0)*h),0);
|
|
177 |
mCrawlBackgroundTexture = new DistortedTexture(w,(int)(Math.sqrt(3.0)*h)); |
|
179 | 178 |
|
180 | 179 |
int randomA, randomX, randomY, randomTime; |
181 | 180 |
float randomS, randomAlpha1, randomAlpha2; |
... | ... | |
257 | 256 |
paint.setTypeface(tf); |
258 | 257 |
|
259 | 258 |
///// create GFFA /////////////////// |
260 |
mGFFATexture = new DistortedTexture(GFFA_WIDTH, GFFA_HEIGHT, 0);
|
|
259 |
mGFFATexture = new DistortedTexture(GFFA_WIDTH,GFFA_HEIGHT);
|
|
261 | 260 |
bitmapGFFA = Bitmap.createBitmap(GFFA_WIDTH,GFFA_HEIGHT,Bitmap.Config.ARGB_8888); |
262 | 261 |
bitmapGFFA.eraseColor(0x00000000); |
263 | 262 |
Canvas gffaCanvas = new Canvas(bitmapGFFA); |
... | ... | |
270 | 269 |
mGFFATexture.setTexture(bitmapGFFA); |
271 | 270 |
|
272 | 271 |
///// create Logo /////////////////// |
273 |
mLogoTexture = new DistortedTexture(bitmapLogo.getWidth(),bitmapLogo.getHeight(),0);
|
|
272 |
mLogoTexture = new DistortedTexture(bitmapLogo.getWidth(),bitmapLogo.getHeight()); |
|
274 | 273 |
mLogoTexture.setTexture(bitmapLogo); |
275 | 274 |
|
276 | 275 |
///// create CRAWL ////////////////// |
277 |
mCrawlTexture = new DistortedTexture(CRAWL_WIDTH, CRAWL_HEIGHT, 0);
|
|
276 |
mCrawlTexture = new DistortedTexture(CRAWL_WIDTH,CRAWL_HEIGHT);
|
|
278 | 277 |
bitmapText = Bitmap.createBitmap(CRAWL_WIDTH,CRAWL_HEIGHT,Bitmap.Config.ARGB_8888); |
279 | 278 |
bitmapText.eraseColor(0x00000000); |
280 | 279 |
Canvas textCanvas = new Canvas(bitmapText); |
... | ... | |
288 | 287 |
mCrawlTexture.setTexture(bitmapText); |
289 | 288 |
|
290 | 289 |
///// create Stars /////////////////// |
291 |
mStarTexture = new DistortedTexture(bitmapStar.getWidth(),bitmapStar.getHeight(),0);
|
|
290 |
mStarTexture = new DistortedTexture(bitmapStar.getWidth(),bitmapStar.getHeight()); |
|
292 | 291 |
mStarTexture.setTexture(bitmapStar); |
293 | 292 |
|
294 | 293 |
gffaID = mGFFAQueue.getID(); |
Also available in: Unified diff
Hide the 'depth' of a DistortedTexture inside the library, so users do not get exposed to this weirdness.