Project

General

Profile

« Previous | Next » 

Revision 13687207

Added by Leszek Koltunski about 7 years ago

Separate the Postprocessing Effects to their own DistortedEffectsPostprocess queue.
This partly breaks Multiblur (to be debugged)

View differences:

src/main/java/org/distorted/library/DistortedOutputSurface.java
133 133
      {
134 134
      child = children.get(i);
135 135
      currP = child.getPostprocess();
136
      currB = currP.getBucket();
136
      currB = currP==null ? 0 : currP.getBucket();
137 137

  
138
      if( i>0 && currB!=lastB ) numRenders += lastP.postprocess(time,this);
138
      if( lastB!=currB && lastB!=0 )
139
        {
140
        //android.util.Log.e("output", "i="+i+" postprocess and merge");
141
        numRenders += lastP.postprocess(time,this);
142
        }
139 143

  
140
      if( currB==0 ) numRenders += child.draw(time,this);
144
      if( currB==0 )
145
        {
146
        //android.util.Log.e("output", "i="+i+" draw to this");
147
        numRenders += child.draw(time,this);
148
        }
141 149
      else
142 150
        {
143 151
        if( mBuffer1==null )
......
146 154
          mBuffer2 = new DistortedFramebuffer(false                     , DistortedSurface.TYPE_TREE, mWidth, mHeight);
147 155
          }
148 156

  
157
        //android.util.Log.e("output", "i="+i+" draw to buffer");
149 158
        numRenders += child.draw(time,mBuffer1);
150
        if( i==num-1 ) numRenders += currP.postprocess(time,this);
159
        if( i==num-1 )
160
          {
161
          //android.util.Log.e("output", "i="+i+" postprocess and merge");
162
          numRenders += currP.postprocess(time,this);
163
          }
151 164
        }
152 165

  
153 166
      lastP = currP;

Also available in: Unified diff