Project

General

Profile

« Previous | Next » 

Revision fe59d375

Added by Leszek Koltunski about 7 years ago

Change the the render() API!

THis introduces some regressions with the Effects3D app.

View differences:

src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java
27 27
import org.distorted.examples.R;
28 28
import org.distorted.library.Distorted;
29 29
import org.distorted.library.DistortedEffects;
30
import org.distorted.library.DistortedFramebuffer;
31 30
import org.distorted.library.DistortedScreen;
32 31
import org.distorted.library.MeshFlat;
33 32
import org.distorted.library.DistortedTexture;
......
46 45
{
47 46
   private GLSurfaceView mView;
48 47
   private DistortedEffects mEffects;
49
   private DistortedTexture mTexture;
50
   private MeshFlat mMesh;
51 48
   private DistortedScreen mScreen;
52 49
   private AroundTheWorldEffectsManager mManager;
53 50
   private int mObjWidth, mObjHeight;
......
78 75
   public void onDrawFrame(GL10 glUnused) 
79 76
      {
80 77
      GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
81
      mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
78
      mScreen.render( System.currentTimeMillis() );
82 79
      }
83 80

  
84 81
///////////////////////////////////////////////////////////////////////////////////////////////////
......
130 127
      mObjWidth = bitmap.getWidth();
131 128
      mObjHeight= bitmap.getHeight();
132 129

  
133
      mTexture = new DistortedTexture(mObjWidth,mObjHeight);
134
      mTexture.setTexture(bitmap);
130
      DistortedTexture texture = new DistortedTexture(mObjWidth,mObjHeight);
131
      texture.setTexture(bitmap);
135 132

  
136
      mMesh = new MeshFlat(30,30*mObjHeight/mObjWidth);
133
      MeshFlat mesh = new MeshFlat(30,30*mObjHeight/mObjWidth);
134

  
135
      mScreen.detachAll();
136
      mScreen.attach(texture, mEffects, mesh );
137 137

  
138 138
      try
139 139
        {

Also available in: Unified diff