Project

General

Profile

« Previous | Next » 

Revision 22f537a5

Added by Leszek Koltunski almost 4 years ago

Correct a subtle bug iin Framebuffer: in recreate(), we need to mark the FBOs as deleted on GPU; otherwise later we might delete them - and when we do, they might belong to another Framebuffer already!

View differences:

src/main/java/org/distorted/library/main/DistortedFramebuffer.java
187 187
      for(int i=0; i<mNumFBOs; i++) mDepthStencilH[i] = 0;
188 188
      }
189 189

  
190
    GLES30.glDeleteFramebuffers(mNumFBOs, mFBOH, 0);
191
    for(int i=0; i<mNumFBOs; i++) mFBOH[i] = 0;
190
    if( mNumFBOs>0 && mFBOH[0]>0 )
191
      {
192
      GLES30.glDeleteFramebuffers(mNumFBOs, mFBOH, 0);
193
      }
194

  
195
    for(int i=0; i<mNumFBOs; i++)
196
      {
197
      mFBOH[i] = 0;
198
      }
192 199
    }
193 200

  
194 201
///////////////////////////////////////////////////////////////////////////////////////////////////
......
206 213
      mDepthStencilCreated = NOT_CREATED_YET;
207 214
      mDepthStencilH[0] = 0;
208 215
      }
216
    for(int i=0; i<mNumFBOs; i++)
217
      {
218
      mFBOH[i] = 0;
219
      }
209 220
    }
210 221

  
211 222
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff