| 214 | 214 |     }
 | 
  | 215 | 215 | 
 | 
  | 216 | 216 | ///////////////////////////////////////////////////////////////////////////////////////////////////
 | 
  | 217 |  | // create SYSTEM or TREE framebuffers (those are just like normal FBOs, just hold information
 | 
  | 218 |  | // that they were autocreated only for the Library's internal purposes (SYSTEM) or for using
 | 
  | 219 |  | // inside a Tree of DistortedNodes (TREE)
 | 
  | 220 |  | // SYSTEM surfaces do not get removed in onDestroy().
 | 
  |  | 217 | // create a multi-framebuffer (1 object containing multiple FBOs)
 | 
  | 221 | 218 | 
 | 
  | 222 |  |   DistortedFramebuffer(int numcolors, int depthStencil, int type, int width, int height)
 | 
  |  | 219 |   DistortedFramebuffer(int numfbos, int numcolors, int depthStencil, int type, int width, int height)
 | 
  | 223 | 220 |     {
 | 
  | 224 |  |     super(width,height,NOT_CREATED_YET,1,numcolors,depthStencil,NOT_CREATED_YET, type);
 | 
  |  | 221 |     super(width,height,NOT_CREATED_YET,numfbos,numcolors,depthStencil,NOT_CREATED_YET, type);
 | 
  |  | 222 |     markForCreation();
 | 
  | 225 | 223 |     }
 | 
  | 226 | 224 | 
 | 
  | 227 | 225 | ///////////////////////////////////////////////////////////////////////////////////////////////////
 | 
  | 228 |  | // create a multi-framebuffer (1 object containing multiple FBOs)
 | 
  |  | 226 | // create SYSTEM or TREE framebuffers (those are just like normal FBOs, just hold information
 | 
  |  | 227 | // that they were autocreated only for the Library's internal purposes (SYSTEM) or for using
 | 
  |  | 228 | // inside a Tree of DistortedNodes (TREE)
 | 
  |  | 229 | // SYSTEM surfaces do not get removed in onDestroy().
 | 
  | 229 | 230 | 
 | 
  | 230 |  |   DistortedFramebuffer(int numfbos, int numcolors, int depthStencil, int type, int width, int height)
 | 
  |  | 231 |   DistortedFramebuffer(int numcolors, int depthStencil, int type, int width, int height)
 | 
  | 231 | 232 |     {
 | 
  | 232 |  |     super(width,height,NOT_CREATED_YET,numfbos,numcolors,depthStencil,NOT_CREATED_YET, type);
 | 
  |  | 233 |     this(1,numcolors,depthStencil,type,width,height);
 | 
  | 233 | 234 |     }
 | 
  | 234 | 235 | 
 | 
  | 235 | 236 | ///////////////////////////////////////////////////////////////////////////////////////////////////
 | 
  | ... | ... |  | 
  | 247 | 248 |   @SuppressWarnings("unused")
 | 
  | 248 | 249 |   public DistortedFramebuffer(int width, int height, int numcolors, int depthStencil)
 | 
  | 249 | 250 |     {
 | 
  | 250 |  |     super(width,height,NOT_CREATED_YET,1,numcolors,depthStencil,NOT_CREATED_YET,TYPE_USER);
 | 
  |  | 251 |     this(1,numcolors,depthStencil,TYPE_USER,width,height);
 | 
  | 251 | 252 |     }
 | 
  | 252 | 253 | 
 | 
  | 253 | 254 | ///////////////////////////////////////////////////////////////////////////////////////////////////
 | 
 
Correct the same bug for DistortedTextures and DistortedFramebuffers: only mark them for creation when we actually have everything ready, i.e. as the last statement in the constructor.