Project

General

Profile

« Previous | Next » 

Revision 5f2a53b6

Added by Leszek Koltunski about 7 years ago

Progress with VBOs - this time abstract out a new class, DistortedObject - i.e. everything that uploads something to GPU and thus needs to be auto re-created upon loss of the context.

View differences:

src/main/java/org/distorted/examples/fbo/FBORenderer.java
56 56
   private DistortedTexture mLisaTexture, mGridTexture;
57 57
   private DistortedScreen mScreen;
58 58
   private DistortedNode mRoot;
59
   private MeshFlat mMeshFlat;
60
   private MeshCubes mMeshCubes;
59 61
   private int lisaHeight, lisaWidth;
60 62
   private boolean mDepth;
61 63

  
......
166 168

  
167 169
      mEffects.abortAllEffects();
168 170

  
169
      mRoot = new DistortedNode(mLisaTexture, mEffects,new MeshFlat(1,1));
170
      mRoot.attach(mGridTexture,gridEffects,new MeshCubes(10,10,false));
171
      if( mMeshFlat==null ) mMeshFlat = new MeshFlat(1,1);
172
      if( mMeshCubes==null) mMeshCubes= new MeshCubes(10,10,false);
173

  
174
      mRoot = new DistortedNode(mLisaTexture, mEffects, mMeshFlat);
175
      mRoot.attach(mGridTexture,gridEffects,mMeshCubes);
171 176

  
172 177
      setDepthPriv();
173 178

  

Also available in: Unified diff