Project

General

Profile

« Previous | Next » 

Revision c658e742

Added by Leszek Koltunski almost 7 years ago

Add quality levels in Glow APP.

View differences:

src/main/java/org/distorted/examples/glow/GlowRenderer.java
52 52
   private GLSurfaceView mView;
53 53
   private DistortedTexture mLeaf;
54 54
   private DistortedScreen mScreen;
55
   private PostprocessEffectGlow mGlow;
55 56
   private int mRootW, mRootH;
56 57
   private Static3D mMove, mScale;
57 58
   private Static1D mRadius;
......
71 72
      mRadius= new Static1D(25);
72 73
      mColor = new Static4D(1.0f,0.0f,0.0f,0.5f); // half-transparent red
73 74

  
74
      PostprocessEffectGlow glow = new PostprocessEffectGlow(mRadius,mColor);
75
      glow.setQuality(EffectQuality.HIGHEST);
75
      mGlow  = new PostprocessEffectGlow(mRadius,mColor);
76 76

  
77 77
      DistortedEffects effects = new DistortedEffects();
78 78
      effects.apply(new MatrixEffectMove(mMove));
79 79
      effects.apply(new MatrixEffectScale(mScale));
80
      effects.apply(glow);
80
      effects.apply(mGlow);
81 81

  
82 82
      mScreen = new DistortedScreen();
83 83
      mScreen.attach(mLeaf, effects, new MeshFlat(1,1) );
......
85 85
      mScreen.setDebug(DistortedScreen.DEBUG_FPS);
86 86
      }
87 87

  
88
///////////////////////////////////////////////////////////////////////////////////////////////////
89

  
90
   void setQuality(EffectQuality quality)
91
      {
92
      mGlow.setQuality(quality);
93
      }
94

  
88 95
///////////////////////////////////////////////////////////////////////////////////////////////////
89 96

  
90 97
   int setGlowRadius(int glow)

Also available in: Unified diff