Project

General

Profile

« Previous | Next » 

Revision f4c5a46e

Added by Leszek Koltunski over 4 years ago

1. New icon for PreDeform app
2. Library: advances with DeferredMeshJobs

View differences:

src/main/java/org/distorted/library/mesh/DeferredJobs.java
79 79
                              break;
80 80
        case JOB_TYPE_MERGE : break;
81 81
        case JOB_TYPE_JOIN  : break;
82
        case JOB_TYPE_COPY  : break;
82
        case JOB_TYPE_COPY  : mTarget.deepCopyAttribs1(mSource[0]);
83
                              break;
83 84
        }
84 85
      }
85 86

  
src/main/java/org/distorted/library/mesh/MeshBase.java
156 156

  
157 157
     if( deep )
158 158
       {
159
       mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_READ);
160
       mVertAttribs1= new float[mNumVertices*VERT1_ATTRIBS];
161

  
159 162
       mJobNode = new DeferredJobs.JobNode[1];
160 163

  
161 164
       if( original.mJobNode[0]!=null )
162 165
         {
163
         mJobNode[0] = new DeferredJobs.JobNode(original.mJobNode[0]);
166
         mJobNode[0] = DeferredJobs.copy(this,original);
167
         }
168
       else
169
         {
170
         deepCopyAttribs1(original);
164 171
         }
165

  
166
       mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_READ);
167
       mVertAttribs1= new float[mNumVertices*VERT1_ATTRIBS];
168
       System.arraycopy(original.mVertAttribs1,0,mVertAttribs1,0,mNumVertices*VERT1_ATTRIBS);
169
       mVBO1.invalidate();
170 172
       }
171 173
     else
172 174
       {
......
198 200
     mComponentAssociationH[variant] = GLES30.glGetUniformLocation( mProgramH, "vComponAssoc");
199 201
     }
200 202

  
203
///////////////////////////////////////////////////////////////////////////////////////////////////
204

  
205
   void deepCopyAttribs1(MeshBase original)
206
     {
207
     System.arraycopy(original.mVertAttribs1,0,mVertAttribs1,0,mNumVertices*VERT1_ATTRIBS);
208
     mVBO1.invalidate();
209
     }
210

  
201 211
///////////////////////////////////////////////////////////////////////////////////////////////////
202 212

  
203 213
   int numComponents()

Also available in: Unified diff