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/matrix3d/Matrix3DRenderer.java
23 23
import android.opengl.GLSurfaceView;
24 24

  
25 25
import org.distorted.library.Distorted;
26
import org.distorted.library.DistortedEffects;
27
import org.distorted.library.DistortedFramebuffer;
28 26
import org.distorted.library.DistortedScreen;
29
import org.distorted.library.MeshObject;
30 27
import org.distorted.library.DistortedTexture;
31 28

  
32 29
import javax.microedition.khronos.egl.EGLConfig;
......
38 35
{
39 36
    private GLSurfaceView mView;
40 37
    private DistortedTexture mTexture;
41
    private DistortedEffects mEffects;
42 38
    private DistortedScreen mScreen;
43
    private MeshObject mMesh;
44 39

  
45 40
    private int mWidth, mHeight;
46 41

  
......
49 44
    Matrix3DRenderer(GLSurfaceView v)
50 45
      {
51 46
      mView = v;
52

  
53 47
      Matrix3DActivity act = (Matrix3DActivity)v.getContext();
54

  
55
      mEffects= act.getEffects();
56 48
      mTexture= act.getTexture();
57
      mMesh = act.getMesh();
58 49
      mScreen = new DistortedScreen();
50
      mScreen.attach(mTexture,act.getEffects(),act.getMesh());
59 51
      }
60 52

  
61 53
///////////////////////////////////////////////////////////////////////////////////////////////////
......
63 55
    public void onDrawFrame(GL10 glUnused)
64 56
      {
65 57
      GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
66
      mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
58
      mScreen.render( System.currentTimeMillis() );
67 59
      }
68 60

  
69 61
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff