Project

General

Profile

« Previous | Next » 

Revision 36793c52

Added by Leszek Koltunski about 4 years ago

Replicate the 'INVALID_OPERATION trying to glMapBufferRange for the second time' bug.

View differences:

src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java
32 32
import org.distorted.library.effect.MatrixEffectScale;
33 33
import org.distorted.library.effect.VertexEffectDeform;
34 34
import org.distorted.library.effect.VertexEffectDisappear;
35
import org.distorted.library.effect.VertexEffectMove;
35 36
import org.distorted.library.effect.VertexEffectRotate;
37
import org.distorted.library.effect.VertexEffectScale;
36 38
import org.distorted.library.main.DistortedEffects;
37 39
import org.distorted.library.main.DistortedLibrary;
38 40
import org.distorted.library.main.DistortedScreen;
39 41
import org.distorted.library.main.DistortedTexture;
40 42
import org.distorted.library.mesh.MeshBase;
41 43
import org.distorted.library.mesh.MeshFile;
44
import org.distorted.library.mesh.MeshTriangle;
42 45
import org.distorted.library.type.DynamicQuat;
43 46
import org.distorted.library.type.Static3D;
44 47
import org.distorted.library.type.Static4D;
......
246 249
      Canvas canvas = new Canvas(bitmap);
247 250

  
248 251
      Paint paint = new Paint();
249
      paint.setColor(0xffffffff);
252
      paint.setColor(0xffffff55);
250 253
      paint.setStyle(Paint.Style.FILL);
251 254
      canvas.drawRect(0, 0, SIZE, SIZE, paint);
252 255

  
......
257 260

  
258 261
  private MeshBase createStaticMesh()
259 262
    {
260
    CubitFactory factory = CubitFactory.getInstance();
261
    return factory.createSkewbFaceMesh();
263
    MeshBase triangle = new MeshTriangle(5);
264

  
265
    VertexEffectMove move = new VertexEffectMove( new Static3D(1,0,0) );
266
    triangle.apply(move);
267

  
268
    triangle.mergeEffComponents();
269

  
270
    VertexEffectScale scale = new VertexEffectScale( new Static3D(2,1,1) );
271
    triangle.apply(scale);
272

  
273
    return triangle;
262 274
    }
263 275

  
264 276
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff