Project

General

Profile

« Previous | Next » 

Revision 76f2d645

Added by Leszek Koltunski almost 8 years ago

A lot of different fixes.

A lot of issues still there:

1) if we only render part of the tree, tree isomorphism will sometimes not work correctly
2) when we change Effects that are inside Trees mid-render, even if we detach() the affected parts of the Tree first, for the last frame the new Effects will be used
3) Something is wrong wil the System FBOs after app restart (Blur & MultiBlur apps work erratically)

View differences:

src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
86 86
              "her people and restore",
87 87
              "freedom to the galaxy...." };      // four-dot.
88 88
   
89
  private final int NUM_STARS = 0;
89
  private final int NUM_STARS = 40;
90 90
   
91 91
  private final int CRAWL_COLOR = 0xffffe81f;
92 92
  private final int GFFA_COLOR  = 0xff0000ff;
......
118 118

  
119 119
  StarWarsRenderer(GLSurfaceView v)
120 120
    {
121
    android.util.Log.d("STAR WARS", "constructor");
122

  
121 123
    mView = v;
122 124

  
123 125
    mQuad = new MeshFlat(1,1);
......
145 147

  
146 148
  public void onPause()
147 149
    {
150
    android.util.Log.d("STAR WARS", "onPause");
151

  
148 152
    mWidth = 0;
149 153
    mHeight= 0;
150 154
    }
......
161 165
    
162 166
  public void onSurfaceChanged(GL10 glUnused, int width, int height) 
163 167
    {
168
    android.util.Log.d("STAR WARS", "surfaceChanged");
169

  
170

  
164 171
    if( mWidth!=width || mHeight!=height )  // after onPause() we get 2 calls here
165 172
      {
166 173
      mWidth = width;
......
186 193
    
187 194
  public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
188 195
    {
196
    android.util.Log.d("STAR WARS", "surfaceCreated");
197

  
189 198
    GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
190 199

  
191 200
    setupBitmaps();
......
206 215
    {
207 216
    mScreenTexture = new DistortedTexture(w,h);
208 217
    mRoot = new DistortedNode(mScreenTexture, mScreenEffects,mQuad);
209
      
218

  
210 219
    mCrawlBackgroundTexture = new DistortedTexture(w,(int)(Math.sqrt(3.0)*h));
211 220
       
212 221
    int randomA, randomX, randomY, randomTime;

Also available in: Unified diff