Project

General

Profile

« Previous | Next » 

Revision f0604575

Added by Leszek Koltunski over 4 years ago

Progress (?) with Predeform: give up trying to render the Mesh in Activity1.

View differences:

src/main/java/org/distorted/library/main/DistortedTexture.java
65 65
        {
66 66
        mColorCreated = CREATED;
67 67
        GLES30.glGenTextures(1, mColorH, 0);
68
        GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mColorH[0]);
69
        GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_LINEAR );
70
        GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MAG_FILTER, GLES30.GL_LINEAR );
71
        GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE );
72
        GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE );
73
        GLUtils.texImage2D(GLES30.GL_TEXTURE_2D, 0, flipBitmap(mBmp), 0);
74
        }
75
      else
76
        {
77
        GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mColorH[0]);
78
        GLUtils.texSubImage2D(GLES30.GL_TEXTURE_2D, 0,0,0,flipBitmap(mBmp));
79 68
        }
80 69

  
70
      GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mColorH[0]);
71
      GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_LINEAR );
72
      GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MAG_FILTER, GLES30.GL_LINEAR );
73
      GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE );
74
      GLES30.glTexParameteri ( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE );
75
      GLUtils.texImage2D(GLES30.GL_TEXTURE_2D, 0, flipBitmap(mBmp), 0);
76
      GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, 0);
77

  
81 78
      mBmp = null;
82 79
      }
83 80
    }
src/main/java/org/distorted/library/main/InternalObject.java
47 47
  private static final int JOB_CREATE = 0;
48 48
  private static final int JOB_DELETE = 1;
49 49

  
50
  private class Job
50
  private static class Job
51 51
    {
52 52
    InternalObject object;
53 53
    int action;
......
133 133
          for (int i = 0; i < num; i++)
134 134
            {
135 135
            object = mDoneList.removeFirst();
136
            mToDoMap.put(object.mID, object.new Job(object, JOB_CREATE));
136
            Job job = new Job(object, JOB_CREATE);
137
            mToDoMap.put(object.mID,job);
137 138
            object.recreate();
138 139
            }
139 140
          }

Also available in: Unified diff