Project

General

Profile

« Previous | Next » 

Revision 1eac2fbc

Added by Leszek Koltunski almost 2 years ago

Stars animation: looks like if we do not switch off the depthMask and stencilMask of the OverlayNode, then the crash on my physical LG phone goes away.

View differences:

src/main/java/org/distorted/overlays/OverlayStars.java
251 251

  
252 252
   public long startOverlay(DistortedScreen screen, ListenerOverlay listener, DataGeneric data)
253 253
      {
254
      if( mRandom==null ) mRandom = new Random();
255

  
254
      mRandom = new Random();
256 255
      mScreen = screen;
257 256
      mListener= listener;
258 257
      DataStars stars = (DataStars)data;
259 258
      mTotalStars = stars.getTotal();
260 259
      mNewStars   = stars.getNew();
261 260
      Resources res = stars.getResources();
262

  
263 261
      mWidth = mScreen.getWidth();
264 262
      mHeight= mScreen.getHeight();
265

  
266 263
      mIncrease = mNewStars>0;
267 264
      if( !mIncrease ) mNewStars = -mNewStars;
268

  
269 265
      mNode = createNode(res,mTotalStars,mIncrease);
270
      mNode.glDepthMask(false);
271
      mNode.glStencilMask(0);
272 266
      mNode.enableDepthStencil(InternalOutputSurface.NO_DEPTH_NO_STENCIL);
273 267
      mScreen.attach(mNode);
274 268

  

Also available in: Unified diff