picrate 0.7.0-java → 0.8.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.mvn/wrapper/MavenWrapperDownloader.java +117 -0
- data/.mvn/wrapper/maven-wrapper.properties +2 -1
- data/.travis.yml +2 -5
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/Rakefile +15 -27
- data/docs/_config.yml +1 -1
- data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -1
- data/docs/_posts/2018-11-18-building-gem.md +1 -1
- data/lib/picrate/app.rb +1 -1
- data/lib/picrate/native_folder.rb +1 -1
- data/lib/picrate/version.rb +1 -1
- data/mvnw +127 -51
- data/mvnw.cmd +182 -0
- data/pom.rb +39 -30
- data/pom.xml +50 -37
- data/src/main/java/monkstone/ColorUtil.java +1 -1
- data/src/main/java/monkstone/core/LibraryProxy.java +0 -1
- data/src/main/java/monkstone/noise/SimplexNoise.java +1 -1
- data/src/main/java/monkstone/vecmath/GfxRender.java +87 -0
- data/src/main/java/monkstone/vecmath/ShapeRender.java +1 -1
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +48 -50
- data/src/main/java/processing/awt/PShapeJava2D.java +10 -0
- data/src/main/java/processing/awt/PSurfaceAWT.java +315 -371
- data/src/main/java/processing/core/PApplet.java +15424 -15495
- data/src/main/java/processing/core/PConstants.java +4 -4
- data/src/main/java/processing/core/PFont.java +394 -369
- data/src/main/java/processing/core/PGraphics.java +11 -10
- data/src/main/java/processing/core/PImage.java +1389 -1435
- data/src/main/java/processing/core/PMatrix2D.java +297 -294
- data/src/main/java/processing/core/PMatrix3D.java +641 -594
- data/src/main/java/processing/core/PShape.java +1755 -1784
- data/src/main/java/processing/core/PShapeOBJ.java +145 -133
- data/src/main/java/processing/core/PShapeSVG.java +808 -801
- data/src/main/java/processing/core/PStyle.java +141 -149
- data/src/main/java/processing/core/PSurface.java +111 -117
- data/src/main/java/processing/core/PSurfaceNone.java +178 -187
- data/src/main/java/processing/javafx/PGraphicsFX2D.java +349 -346
- data/src/main/java/processing/opengl/FontTexture.java +40 -59
- data/src/main/java/processing/opengl/FrameBuffer.java +28 -18
- data/src/main/java/processing/opengl/LinePath.java +7 -7
- data/src/main/java/processing/opengl/LineStroker.java +6 -10
- data/src/main/java/processing/opengl/PGL.java +56 -44
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +909 -2338
- data/src/main/java/processing/opengl/PJOGL.java +1722 -1763
- data/src/main/java/processing/opengl/PShader.java +1308 -1192
- data/src/main/java/processing/opengl/PShapeOpenGL.java +487 -1811
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +482 -497
- data/src/main/java/processing/opengl/Texture.java +99 -76
- data/src/main/java/processing/opengl/VertexBuffer.java +41 -43
- data/vendors/Rakefile +1 -1
- metadata +7 -4
@@ -64,415 +64,127 @@ import java.util.Stack;
|
|
64
64
|
*/
|
65
65
|
public class PShapeOpenGL extends PShape {
|
66
66
|
// Testing these constants, not use as they might go away...
|
67
|
-
|
68
|
-
/**
|
69
|
-
*
|
70
|
-
*/
|
71
67
|
static public final int POSITION = 0;
|
68
|
+
static public final int NORMAL = 1;
|
69
|
+
static public final int TEXCOORD = 2;
|
70
|
+
static public final int DIRECTION = 3;
|
71
|
+
static public final int OFFSET = 4;
|
72
|
+
|
73
|
+
static protected final int TRANSLATE = 0;
|
74
|
+
static protected final int ROTATE = 1;
|
75
|
+
static protected final int SCALE = 2;
|
76
|
+
static protected final int MATRIX = 3;
|
77
|
+
|
78
|
+
protected PGraphicsOpenGL pg;
|
79
|
+
protected PGL pgl;
|
80
|
+
protected int context; // The context that created this shape.
|
72
81
|
|
73
|
-
|
74
|
-
*
|
75
|
-
*/
|
76
|
-
static public final int NORMAL = 1;
|
77
|
-
|
78
|
-
/**
|
79
|
-
*
|
80
|
-
*/
|
81
|
-
static public final int TEXCOORD = 2;
|
82
|
-
|
83
|
-
/**
|
84
|
-
*
|
85
|
-
*/
|
86
|
-
static public final int DIRECTION = 3;
|
87
|
-
|
88
|
-
/**
|
89
|
-
*
|
90
|
-
*/
|
91
|
-
static public final int OFFSET = 4;
|
92
|
-
|
93
|
-
/**
|
94
|
-
*
|
95
|
-
*/
|
96
|
-
static protected final int TRANSLATE = 0;
|
97
|
-
|
98
|
-
/**
|
99
|
-
*
|
100
|
-
*/
|
101
|
-
static protected final int ROTATE = 1;
|
102
|
-
|
103
|
-
/**
|
104
|
-
*
|
105
|
-
*/
|
106
|
-
static protected final int SCALE = 2;
|
107
|
-
|
108
|
-
/**
|
109
|
-
*
|
110
|
-
*/
|
111
|
-
static protected final int MATRIX = 3;
|
112
|
-
|
113
|
-
/**
|
114
|
-
*
|
115
|
-
*/
|
116
|
-
protected PGraphicsOpenGL pg;
|
117
|
-
|
118
|
-
/**
|
119
|
-
*
|
120
|
-
*/
|
121
|
-
protected PGL pgl;
|
122
|
-
|
123
|
-
/**
|
124
|
-
*
|
125
|
-
*/
|
126
|
-
protected int context; // The context that created this shape.
|
127
|
-
|
128
|
-
/**
|
129
|
-
*
|
130
|
-
*/
|
131
|
-
protected PShapeOpenGL root;
|
82
|
+
protected PShapeOpenGL root;
|
132
83
|
|
133
84
|
// ........................................................
|
134
85
|
|
135
86
|
// Input, tessellated geometry
|
136
87
|
|
137
|
-
/**
|
138
|
-
*
|
139
|
-
*/
|
140
|
-
|
141
88
|
protected InGeometry inGeo;
|
89
|
+
protected TessGeometry tessGeo;
|
90
|
+
protected Tessellator tessellator;
|
142
91
|
|
143
|
-
|
144
|
-
*
|
145
|
-
*/
|
146
|
-
protected TessGeometry tessGeo;
|
147
|
-
|
148
|
-
/**
|
149
|
-
*
|
150
|
-
*/
|
151
|
-
protected Tessellator tessellator;
|
152
|
-
|
153
|
-
/**
|
154
|
-
*
|
155
|
-
*/
|
156
|
-
protected AttributeMap polyAttribs;
|
92
|
+
protected AttributeMap polyAttribs;
|
157
93
|
|
158
94
|
// ........................................................
|
159
95
|
|
160
96
|
// Texturing
|
161
97
|
|
162
|
-
/**
|
163
|
-
*
|
164
|
-
*/
|
165
|
-
|
166
98
|
protected HashSet<PImage> textures;
|
167
|
-
|
168
|
-
|
169
|
-
*
|
170
|
-
*/
|
171
|
-
protected boolean strokedTexture;
|
172
|
-
|
173
|
-
/**
|
174
|
-
*
|
175
|
-
*/
|
176
|
-
protected boolean untexChild;
|
99
|
+
protected boolean strokedTexture;
|
100
|
+
protected boolean untexChild;
|
177
101
|
|
178
102
|
// ........................................................
|
179
103
|
|
180
104
|
// OpenGL buffers
|
181
105
|
|
182
|
-
/**
|
183
|
-
*
|
184
|
-
*/
|
185
|
-
|
186
106
|
protected VertexBuffer bufPolyVertex;
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
*/
|
206
|
-
protected VertexBuffer bufPolyAmbient;
|
207
|
-
|
208
|
-
/**
|
209
|
-
*
|
210
|
-
*/
|
211
|
-
protected VertexBuffer bufPolySpecular;
|
212
|
-
|
213
|
-
/**
|
214
|
-
*
|
215
|
-
*/
|
216
|
-
protected VertexBuffer bufPolyEmissive;
|
217
|
-
|
218
|
-
/**
|
219
|
-
*
|
220
|
-
*/
|
221
|
-
protected VertexBuffer bufPolyShininess;
|
222
|
-
|
223
|
-
/**
|
224
|
-
*
|
225
|
-
*/
|
226
|
-
protected VertexBuffer bufPolyIndex;
|
227
|
-
|
228
|
-
/**
|
229
|
-
*
|
230
|
-
*/
|
231
|
-
protected VertexBuffer bufLineVertex;
|
232
|
-
|
233
|
-
/**
|
234
|
-
*
|
235
|
-
*/
|
236
|
-
protected VertexBuffer bufLineColor;
|
237
|
-
|
238
|
-
/**
|
239
|
-
*
|
240
|
-
*/
|
241
|
-
protected VertexBuffer bufLineAttrib;
|
242
|
-
|
243
|
-
/**
|
244
|
-
*
|
245
|
-
*/
|
246
|
-
protected VertexBuffer bufLineIndex;
|
247
|
-
|
248
|
-
/**
|
249
|
-
*
|
250
|
-
*/
|
251
|
-
protected VertexBuffer bufPointVertex;
|
252
|
-
|
253
|
-
/**
|
254
|
-
*
|
255
|
-
*/
|
256
|
-
protected VertexBuffer bufPointColor;
|
257
|
-
|
258
|
-
/**
|
259
|
-
*
|
260
|
-
*/
|
261
|
-
protected VertexBuffer bufPointAttrib;
|
262
|
-
|
263
|
-
/**
|
264
|
-
*
|
265
|
-
*/
|
266
|
-
protected VertexBuffer bufPointIndex;
|
107
|
+
protected VertexBuffer bufPolyColor;
|
108
|
+
protected VertexBuffer bufPolyNormal;
|
109
|
+
protected VertexBuffer bufPolyTexcoord;
|
110
|
+
protected VertexBuffer bufPolyAmbient;
|
111
|
+
protected VertexBuffer bufPolySpecular;
|
112
|
+
protected VertexBuffer bufPolyEmissive;
|
113
|
+
protected VertexBuffer bufPolyShininess;
|
114
|
+
protected VertexBuffer bufPolyIndex;
|
115
|
+
|
116
|
+
protected VertexBuffer bufLineVertex;
|
117
|
+
protected VertexBuffer bufLineColor;
|
118
|
+
protected VertexBuffer bufLineAttrib;
|
119
|
+
protected VertexBuffer bufLineIndex;
|
120
|
+
|
121
|
+
protected VertexBuffer bufPointVertex;
|
122
|
+
protected VertexBuffer bufPointColor;
|
123
|
+
protected VertexBuffer bufPointAttrib;
|
124
|
+
protected VertexBuffer bufPointIndex;
|
267
125
|
|
268
126
|
// Testing this field, not use as it might go away...
|
269
|
-
|
270
|
-
/**
|
271
|
-
*
|
272
|
-
*/
|
273
127
|
public int glUsage = PGL.STATIC_DRAW;
|
274
128
|
|
275
129
|
// ........................................................
|
276
130
|
|
277
131
|
// Offsets for geometry aggregation and update.
|
278
132
|
|
279
|
-
/**
|
280
|
-
*
|
281
|
-
*/
|
282
|
-
|
283
133
|
protected int polyVertCopyOffset;
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
protected int polyVertexOffset;
|
319
|
-
|
320
|
-
/**
|
321
|
-
*
|
322
|
-
*/
|
323
|
-
protected int polyVertexAbs;
|
324
|
-
|
325
|
-
/**
|
326
|
-
*
|
327
|
-
*/
|
328
|
-
protected int polyVertexRel;
|
329
|
-
|
330
|
-
/**
|
331
|
-
*
|
332
|
-
*/
|
333
|
-
protected int lineIndexOffset;
|
334
|
-
|
335
|
-
/**
|
336
|
-
*
|
337
|
-
*/
|
338
|
-
protected int lineVertexOffset;
|
339
|
-
|
340
|
-
/**
|
341
|
-
*
|
342
|
-
*/
|
343
|
-
protected int lineVertexAbs;
|
344
|
-
|
345
|
-
/**
|
346
|
-
*
|
347
|
-
*/
|
348
|
-
protected int lineVertexRel;
|
349
|
-
|
350
|
-
/**
|
351
|
-
*
|
352
|
-
*/
|
353
|
-
protected int pointIndexOffset;
|
354
|
-
|
355
|
-
/**
|
356
|
-
*
|
357
|
-
*/
|
358
|
-
protected int pointVertexOffset;
|
359
|
-
|
360
|
-
/**
|
361
|
-
*
|
362
|
-
*/
|
363
|
-
protected int pointVertexAbs;
|
364
|
-
|
365
|
-
/**
|
366
|
-
*
|
367
|
-
*/
|
368
|
-
protected int pointVertexRel;
|
369
|
-
|
370
|
-
/**
|
371
|
-
*
|
372
|
-
*/
|
373
|
-
protected int firstPolyIndexCache;
|
374
|
-
|
375
|
-
/**
|
376
|
-
*
|
377
|
-
*/
|
378
|
-
protected int lastPolyIndexCache;
|
379
|
-
|
380
|
-
/**
|
381
|
-
*
|
382
|
-
*/
|
383
|
-
protected int firstLineIndexCache;
|
384
|
-
|
385
|
-
/**
|
386
|
-
*
|
387
|
-
*/
|
388
|
-
protected int lastLineIndexCache;
|
389
|
-
|
390
|
-
/**
|
391
|
-
*
|
392
|
-
*/
|
393
|
-
protected int firstPointIndexCache;
|
394
|
-
|
395
|
-
/**
|
396
|
-
*
|
397
|
-
*/
|
398
|
-
protected int lastPointIndexCache;
|
399
|
-
|
400
|
-
/**
|
401
|
-
*
|
402
|
-
*/
|
403
|
-
protected int firstPolyVertex;
|
404
|
-
|
405
|
-
/**
|
406
|
-
*
|
407
|
-
*/
|
408
|
-
protected int lastPolyVertex;
|
409
|
-
|
410
|
-
/**
|
411
|
-
*
|
412
|
-
*/
|
413
|
-
protected int firstLineVertex;
|
414
|
-
|
415
|
-
/**
|
416
|
-
*
|
417
|
-
*/
|
418
|
-
protected int lastLineVertex;
|
419
|
-
|
420
|
-
/**
|
421
|
-
*
|
422
|
-
*/
|
423
|
-
protected int firstPointVertex;
|
424
|
-
|
425
|
-
/**
|
426
|
-
*
|
427
|
-
*/
|
428
|
-
protected int lastPointVertex;
|
134
|
+
protected int polyIndCopyOffset;
|
135
|
+
protected int lineVertCopyOffset;
|
136
|
+
protected int lineIndCopyOffset;
|
137
|
+
protected int pointVertCopyOffset;
|
138
|
+
protected int pointIndCopyOffset;
|
139
|
+
|
140
|
+
protected int polyIndexOffset;
|
141
|
+
protected int polyVertexOffset;
|
142
|
+
protected int polyVertexAbs;
|
143
|
+
protected int polyVertexRel;
|
144
|
+
|
145
|
+
protected int lineIndexOffset;
|
146
|
+
protected int lineVertexOffset;
|
147
|
+
protected int lineVertexAbs;
|
148
|
+
protected int lineVertexRel;
|
149
|
+
|
150
|
+
protected int pointIndexOffset;
|
151
|
+
protected int pointVertexOffset;
|
152
|
+
protected int pointVertexAbs;
|
153
|
+
protected int pointVertexRel;
|
154
|
+
|
155
|
+
protected int firstPolyIndexCache;
|
156
|
+
protected int lastPolyIndexCache;
|
157
|
+
protected int firstLineIndexCache;
|
158
|
+
protected int lastLineIndexCache;
|
159
|
+
protected int firstPointIndexCache;
|
160
|
+
protected int lastPointIndexCache;
|
161
|
+
|
162
|
+
protected int firstPolyVertex;
|
163
|
+
protected int lastPolyVertex;
|
164
|
+
protected int firstLineVertex;
|
165
|
+
protected int lastLineVertex;
|
166
|
+
protected int firstPointVertex;
|
167
|
+
protected int lastPointVertex;
|
429
168
|
|
430
169
|
// ........................................................
|
431
170
|
|
432
171
|
// Geometric transformations.
|
433
172
|
|
434
|
-
/**
|
435
|
-
*
|
436
|
-
*/
|
437
|
-
|
438
173
|
protected PMatrix transform;
|
439
|
-
|
440
|
-
/**
|
441
|
-
*
|
442
|
-
*/
|
443
|
-
protected Stack<PMatrix> transformStack;
|
174
|
+
protected Stack<PMatrix> transformStack;
|
444
175
|
|
445
176
|
// ........................................................
|
446
177
|
|
447
178
|
// State/rendering flags
|
448
179
|
|
449
|
-
/**
|
450
|
-
*
|
451
|
-
*/
|
452
|
-
|
453
180
|
protected boolean tessellated;
|
454
|
-
|
455
|
-
/**
|
456
|
-
*
|
457
|
-
*/
|
458
|
-
protected boolean needBufferInit = false;
|
181
|
+
protected boolean needBufferInit = false;
|
459
182
|
|
460
183
|
// Flag to indicate if the shape can have holes or not.
|
461
|
-
|
462
|
-
/**
|
463
|
-
*
|
464
|
-
*/
|
465
184
|
protected boolean solid = true;
|
466
185
|
|
467
|
-
|
468
|
-
|
469
|
-
*/
|
470
|
-
protected boolean breakShape = false;
|
471
|
-
|
472
|
-
/**
|
473
|
-
*
|
474
|
-
*/
|
475
|
-
protected boolean shapeCreated = false;
|
186
|
+
protected boolean breakShape = false;
|
187
|
+
protected boolean shapeCreated = false;
|
476
188
|
|
477
189
|
// These variables indicate if the shape contains
|
478
190
|
// polygon, line and/or point geometry. In the case of
|
@@ -481,409 +193,122 @@ public class PShapeOpenGL extends PShape {
|
|
481
193
|
// However, for 2D shapes the poly geometry contains all of
|
482
194
|
// the three since the same rendering shader applies to
|
483
195
|
// fill, line and point geometry.
|
484
|
-
|
485
|
-
/**
|
486
|
-
*
|
487
|
-
*/
|
488
196
|
protected boolean hasPolys;
|
489
|
-
|
490
|
-
|
491
|
-
*
|
492
|
-
*/
|
493
|
-
protected boolean hasLines;
|
494
|
-
|
495
|
-
/**
|
496
|
-
*
|
497
|
-
*/
|
498
|
-
protected boolean hasPoints;
|
197
|
+
protected boolean hasLines;
|
198
|
+
protected boolean hasPoints;
|
499
199
|
|
500
200
|
// ........................................................
|
501
201
|
|
502
202
|
// Bezier and Catmull-Rom curves
|
503
203
|
|
504
|
-
/**
|
505
|
-
*
|
506
|
-
*/
|
507
|
-
|
508
204
|
protected int bezierDetail;
|
205
|
+
protected int curveDetail;
|
206
|
+
protected float curveTightness;
|
509
207
|
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
protected int curveDetail;
|
514
|
-
|
515
|
-
/**
|
516
|
-
*
|
517
|
-
*/
|
518
|
-
protected float curveTightness;
|
519
|
-
|
520
|
-
/**
|
521
|
-
*
|
522
|
-
*/
|
523
|
-
protected int savedBezierDetail;
|
524
|
-
|
525
|
-
/**
|
526
|
-
*
|
527
|
-
*/
|
528
|
-
protected int savedCurveDetail;
|
529
|
-
|
530
|
-
/**
|
531
|
-
*
|
532
|
-
*/
|
533
|
-
protected float savedCurveTightness;
|
208
|
+
protected int savedBezierDetail;
|
209
|
+
protected int savedCurveDetail;
|
210
|
+
protected float savedCurveTightness;
|
534
211
|
|
535
212
|
// ........................................................
|
536
213
|
|
537
214
|
// Normals
|
538
215
|
|
539
|
-
|
540
|
-
*
|
541
|
-
*/
|
542
|
-
|
543
|
-
protected float normalX,
|
544
|
-
|
545
|
-
/**
|
546
|
-
*
|
547
|
-
*/
|
548
|
-
normalY,
|
549
|
-
|
550
|
-
/**
|
551
|
-
*
|
552
|
-
*/
|
553
|
-
normalZ;
|
216
|
+
protected float normalX, normalY, normalZ;
|
554
217
|
|
555
218
|
// normal calculated per triangle
|
556
|
-
|
557
|
-
/**
|
558
|
-
*
|
559
|
-
*/
|
560
219
|
static protected final int NORMAL_MODE_AUTO = 0;
|
561
220
|
// one normal manually specified per shape
|
562
|
-
|
563
|
-
/**
|
564
|
-
*
|
565
|
-
*/
|
566
221
|
static protected final int NORMAL_MODE_SHAPE = 1;
|
567
222
|
// normals specified for each shape vertex
|
568
|
-
|
569
|
-
/**
|
570
|
-
*
|
571
|
-
*/
|
572
223
|
static protected final int NORMAL_MODE_VERTEX = 2;
|
573
224
|
|
574
225
|
// Current mode for normals, one of AUTO, SHAPE, or VERTEX
|
575
|
-
|
576
|
-
/**
|
577
|
-
*
|
578
|
-
*/
|
579
226
|
protected int normalMode;
|
580
227
|
|
581
228
|
// ........................................................
|
582
229
|
|
583
230
|
// Modification variables (used only by the root shape)
|
584
231
|
|
585
|
-
/**
|
586
|
-
*
|
587
|
-
*/
|
588
|
-
|
589
232
|
protected boolean modified;
|
590
233
|
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
*/
|
639
|
-
protected boolean modifiedLineColors;
|
640
|
-
|
641
|
-
/**
|
642
|
-
*
|
643
|
-
*/
|
644
|
-
protected boolean modifiedLineAttributes;
|
645
|
-
|
646
|
-
/**
|
647
|
-
*
|
648
|
-
*/
|
649
|
-
protected boolean modifiedPointVertices;
|
650
|
-
|
651
|
-
/**
|
652
|
-
*
|
653
|
-
*/
|
654
|
-
protected boolean modifiedPointColors;
|
655
|
-
|
656
|
-
/**
|
657
|
-
*
|
658
|
-
*/
|
659
|
-
protected boolean modifiedPointAttributes;
|
660
|
-
|
661
|
-
/**
|
662
|
-
*
|
663
|
-
*/
|
664
|
-
protected int firstModifiedPolyVertex;
|
665
|
-
|
666
|
-
/**
|
667
|
-
*
|
668
|
-
*/
|
669
|
-
protected int lastModifiedPolyVertex;
|
670
|
-
|
671
|
-
/**
|
672
|
-
*
|
673
|
-
*/
|
674
|
-
protected int firstModifiedPolyColor;
|
675
|
-
|
676
|
-
/**
|
677
|
-
*
|
678
|
-
*/
|
679
|
-
protected int lastModifiedPolyColor;
|
680
|
-
|
681
|
-
/**
|
682
|
-
*
|
683
|
-
*/
|
684
|
-
protected int firstModifiedPolyNormal;
|
685
|
-
|
686
|
-
/**
|
687
|
-
*
|
688
|
-
*/
|
689
|
-
protected int lastModifiedPolyNormal;
|
690
|
-
|
691
|
-
/**
|
692
|
-
*
|
693
|
-
*/
|
694
|
-
protected int firstModifiedPolyTexcoord;
|
695
|
-
|
696
|
-
/**
|
697
|
-
*
|
698
|
-
*/
|
699
|
-
protected int lastModifiedPolyTexcoord;
|
700
|
-
|
701
|
-
/**
|
702
|
-
*
|
703
|
-
*/
|
704
|
-
protected int firstModifiedPolyAmbient;
|
705
|
-
|
706
|
-
/**
|
707
|
-
*
|
708
|
-
*/
|
709
|
-
protected int lastModifiedPolyAmbient;
|
710
|
-
|
711
|
-
/**
|
712
|
-
*
|
713
|
-
*/
|
714
|
-
protected int firstModifiedPolySpecular;
|
715
|
-
|
716
|
-
/**
|
717
|
-
*
|
718
|
-
*/
|
719
|
-
protected int lastModifiedPolySpecular;
|
720
|
-
|
721
|
-
/**
|
722
|
-
*
|
723
|
-
*/
|
724
|
-
protected int firstModifiedPolyEmissive;
|
725
|
-
|
726
|
-
/**
|
727
|
-
*
|
728
|
-
*/
|
729
|
-
protected int lastModifiedPolyEmissive;
|
730
|
-
|
731
|
-
/**
|
732
|
-
*
|
733
|
-
*/
|
734
|
-
protected int firstModifiedPolyShininess;
|
735
|
-
|
736
|
-
/**
|
737
|
-
*
|
738
|
-
*/
|
739
|
-
protected int lastModifiedPolyShininess;
|
740
|
-
|
741
|
-
/**
|
742
|
-
*
|
743
|
-
*/
|
744
|
-
protected int firstModifiedLineVertex;
|
745
|
-
|
746
|
-
/**
|
747
|
-
*
|
748
|
-
*/
|
749
|
-
protected int lastModifiedLineVertex;
|
750
|
-
|
751
|
-
/**
|
752
|
-
*
|
753
|
-
*/
|
754
|
-
protected int firstModifiedLineColor;
|
755
|
-
|
756
|
-
/**
|
757
|
-
*
|
758
|
-
*/
|
759
|
-
protected int lastModifiedLineColor;
|
760
|
-
|
761
|
-
/**
|
762
|
-
*
|
763
|
-
*/
|
764
|
-
protected int firstModifiedLineAttribute;
|
765
|
-
|
766
|
-
/**
|
767
|
-
*
|
768
|
-
*/
|
769
|
-
protected int lastModifiedLineAttribute;
|
770
|
-
|
771
|
-
/**
|
772
|
-
*
|
773
|
-
*/
|
774
|
-
protected int firstModifiedPointVertex;
|
775
|
-
|
776
|
-
/**
|
777
|
-
*
|
778
|
-
*/
|
779
|
-
protected int lastModifiedPointVertex;
|
780
|
-
|
781
|
-
/**
|
782
|
-
*
|
783
|
-
*/
|
784
|
-
protected int firstModifiedPointColor;
|
785
|
-
|
786
|
-
/**
|
787
|
-
*
|
788
|
-
*/
|
789
|
-
protected int lastModifiedPointColor;
|
790
|
-
|
791
|
-
/**
|
792
|
-
*
|
793
|
-
*/
|
794
|
-
protected int firstModifiedPointAttribute;
|
795
|
-
|
796
|
-
/**
|
797
|
-
*
|
798
|
-
*/
|
799
|
-
protected int lastModifiedPointAttribute;
|
234
|
+
protected boolean modifiedPolyVertices;
|
235
|
+
protected boolean modifiedPolyColors;
|
236
|
+
protected boolean modifiedPolyNormals;
|
237
|
+
protected boolean modifiedPolyTexCoords;
|
238
|
+
protected boolean modifiedPolyAmbient;
|
239
|
+
protected boolean modifiedPolySpecular;
|
240
|
+
protected boolean modifiedPolyEmissive;
|
241
|
+
protected boolean modifiedPolyShininess;
|
242
|
+
|
243
|
+
protected boolean modifiedLineVertices;
|
244
|
+
protected boolean modifiedLineColors;
|
245
|
+
protected boolean modifiedLineAttributes;
|
246
|
+
|
247
|
+
protected boolean modifiedPointVertices;
|
248
|
+
protected boolean modifiedPointColors;
|
249
|
+
protected boolean modifiedPointAttributes;
|
250
|
+
|
251
|
+
protected int firstModifiedPolyVertex;
|
252
|
+
protected int lastModifiedPolyVertex;
|
253
|
+
protected int firstModifiedPolyColor;
|
254
|
+
protected int lastModifiedPolyColor;
|
255
|
+
protected int firstModifiedPolyNormal;
|
256
|
+
protected int lastModifiedPolyNormal;
|
257
|
+
protected int firstModifiedPolyTexcoord;
|
258
|
+
protected int lastModifiedPolyTexcoord;
|
259
|
+
protected int firstModifiedPolyAmbient;
|
260
|
+
protected int lastModifiedPolyAmbient;
|
261
|
+
protected int firstModifiedPolySpecular;
|
262
|
+
protected int lastModifiedPolySpecular;
|
263
|
+
protected int firstModifiedPolyEmissive;
|
264
|
+
protected int lastModifiedPolyEmissive;
|
265
|
+
protected int firstModifiedPolyShininess;
|
266
|
+
protected int lastModifiedPolyShininess;
|
267
|
+
|
268
|
+
protected int firstModifiedLineVertex;
|
269
|
+
protected int lastModifiedLineVertex;
|
270
|
+
protected int firstModifiedLineColor;
|
271
|
+
protected int lastModifiedLineColor;
|
272
|
+
protected int firstModifiedLineAttribute;
|
273
|
+
protected int lastModifiedLineAttribute;
|
274
|
+
|
275
|
+
protected int firstModifiedPointVertex;
|
276
|
+
protected int lastModifiedPointVertex;
|
277
|
+
protected int firstModifiedPointColor;
|
278
|
+
protected int lastModifiedPointColor;
|
279
|
+
protected int firstModifiedPointAttribute;
|
280
|
+
protected int lastModifiedPointAttribute;
|
800
281
|
|
801
282
|
// ........................................................
|
802
283
|
|
803
284
|
// Saved style variables to style can be re-enabled after disableStyle,
|
804
285
|
// although it won't work if properties are defined on a per-vertex basis.
|
805
286
|
|
806
|
-
/**
|
807
|
-
*
|
808
|
-
*/
|
809
|
-
|
810
287
|
protected boolean savedStroke;
|
288
|
+
protected int savedStrokeColor;
|
289
|
+
protected float savedStrokeWeight;
|
290
|
+
protected int savedStrokeCap;
|
291
|
+
protected int savedStrokeJoin;
|
811
292
|
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
*/
|
825
|
-
protected int savedStrokeCap;
|
826
|
-
|
827
|
-
/**
|
828
|
-
*
|
829
|
-
*/
|
830
|
-
protected int savedStrokeJoin;
|
831
|
-
|
832
|
-
/**
|
833
|
-
*
|
834
|
-
*/
|
835
|
-
protected boolean savedFill;
|
836
|
-
|
837
|
-
/**
|
838
|
-
*
|
839
|
-
*/
|
840
|
-
protected int savedFillColor;
|
841
|
-
|
842
|
-
/**
|
843
|
-
*
|
844
|
-
*/
|
845
|
-
protected boolean savedTint;
|
846
|
-
|
847
|
-
/**
|
848
|
-
*
|
849
|
-
*/
|
850
|
-
protected int savedTintColor;
|
851
|
-
|
852
|
-
/**
|
853
|
-
*
|
854
|
-
*/
|
855
|
-
protected int savedAmbientColor;
|
856
|
-
|
857
|
-
/**
|
858
|
-
*
|
859
|
-
*/
|
860
|
-
protected int savedSpecularColor;
|
861
|
-
|
862
|
-
/**
|
863
|
-
*
|
864
|
-
*/
|
865
|
-
protected int savedEmissiveColor;
|
866
|
-
|
867
|
-
/**
|
868
|
-
*
|
869
|
-
*/
|
870
|
-
protected float savedShininess;
|
871
|
-
|
872
|
-
/**
|
873
|
-
*
|
874
|
-
*/
|
875
|
-
protected int savedTextureMode;
|
293
|
+
protected boolean savedFill;
|
294
|
+
protected int savedFillColor;
|
295
|
+
|
296
|
+
protected boolean savedTint;
|
297
|
+
protected int savedTintColor;
|
298
|
+
|
299
|
+
protected int savedAmbientColor;
|
300
|
+
protected int savedSpecularColor;
|
301
|
+
protected int savedEmissiveColor;
|
302
|
+
protected float savedShininess;
|
303
|
+
|
304
|
+
protected int savedTextureMode;
|
876
305
|
|
877
306
|
|
878
307
|
PShapeOpenGL() {
|
879
308
|
}
|
880
309
|
|
881
|
-
|
882
|
-
|
883
|
-
* @param pg
|
884
|
-
* @param family
|
885
|
-
*/
|
886
|
-
public PShapeOpenGL(PGraphicsOpenGL pg, int family) {
|
310
|
+
|
311
|
+
public PShapeOpenGL(PGraphicsOpenGL pg, int family) {
|
887
312
|
this.pg = pg;
|
888
313
|
this.family = family;
|
889
314
|
|
@@ -978,10 +403,7 @@ public class PShapeOpenGL extends PShape {
|
|
978
403
|
}
|
979
404
|
|
980
405
|
|
981
|
-
/** Create a shape from the PRIMITIVE family, using this kind and these params
|
982
|
-
* @param pg
|
983
|
-
* @param kind
|
984
|
-
* @param p */
|
406
|
+
/** Create a shape from the PRIMITIVE family, using this kind and these params */
|
985
407
|
public PShapeOpenGL(PGraphicsOpenGL pg, int kind, float... p) {
|
986
408
|
this(pg, PRIMITIVE);
|
987
409
|
setKind(kind);
|
@@ -1079,11 +501,8 @@ public class PShapeOpenGL extends PShape {
|
|
1079
501
|
markForTessellation();
|
1080
502
|
}
|
1081
503
|
|
1082
|
-
|
1083
|
-
|
1084
|
-
* @param root
|
1085
|
-
*/
|
1086
|
-
protected void updateRoot(PShape root) {
|
504
|
+
|
505
|
+
protected void updateRoot(PShape root) {
|
1087
506
|
this.root = (PShapeOpenGL) root;
|
1088
507
|
if (family == GROUP) {
|
1089
508
|
for (int i = 0; i < childCount; i++) {
|
@@ -1099,13 +518,6 @@ public class PShapeOpenGL extends PShape {
|
|
1099
518
|
//
|
1100
519
|
// Shape creation (temporary hack)
|
1101
520
|
|
1102
|
-
/**
|
1103
|
-
*
|
1104
|
-
* @param pg
|
1105
|
-
* @param src
|
1106
|
-
* @return
|
1107
|
-
*/
|
1108
|
-
|
1109
521
|
|
1110
522
|
public static PShapeOpenGL createShape(PGraphicsOpenGL pg, PShape src) {
|
1111
523
|
PShapeOpenGL dest = null;
|
@@ -1161,14 +573,6 @@ public class PShapeOpenGL extends PShape {
|
|
1161
573
|
}
|
1162
574
|
*/
|
1163
575
|
|
1164
|
-
/**
|
1165
|
-
*
|
1166
|
-
* @param pg
|
1167
|
-
* @param src
|
1168
|
-
* @param dest
|
1169
|
-
*/
|
1170
|
-
|
1171
|
-
|
1172
576
|
static public void copyGroup(PGraphicsOpenGL pg, PShape src, PShape dest) {
|
1173
577
|
copyMatrix(src, dest);
|
1174
578
|
copyStyles(src, dest);
|
@@ -1245,11 +649,8 @@ public class PShapeOpenGL extends PShape {
|
|
1245
649
|
return depth;
|
1246
650
|
}
|
1247
651
|
|
1248
|
-
|
1249
|
-
|
1250
|
-
* @param min
|
1251
|
-
*/
|
1252
|
-
protected void getVertexMin(PVector min) {
|
652
|
+
|
653
|
+
protected void getVertexMin(PVector min) {
|
1253
654
|
updateTessellation();
|
1254
655
|
|
1255
656
|
if (family == GROUP) {
|
@@ -1272,11 +673,8 @@ public class PShapeOpenGL extends PShape {
|
|
1272
673
|
}
|
1273
674
|
}
|
1274
675
|
|
1275
|
-
|
1276
|
-
|
1277
|
-
* @param max
|
1278
|
-
*/
|
1279
|
-
protected void getVertexMax(PVector max) {
|
676
|
+
|
677
|
+
protected void getVertexMax(PVector max) {
|
1280
678
|
updateTessellation();
|
1281
679
|
|
1282
680
|
if (family == GROUP) {
|
@@ -1299,13 +697,8 @@ public class PShapeOpenGL extends PShape {
|
|
1299
697
|
}
|
1300
698
|
}
|
1301
699
|
|
1302
|
-
|
1303
|
-
|
1304
|
-
* @param sum
|
1305
|
-
* @param count
|
1306
|
-
* @return
|
1307
|
-
*/
|
1308
|
-
protected int getVertexSum(PVector sum, int count) {
|
700
|
+
|
701
|
+
protected int getVertexSum(PVector sum, int count) {
|
1309
702
|
updateTessellation();
|
1310
703
|
|
1311
704
|
if (family == GROUP) {
|
@@ -1338,11 +731,6 @@ public class PShapeOpenGL extends PShape {
|
|
1338
731
|
|
1339
732
|
// Drawing methods
|
1340
733
|
|
1341
|
-
/**
|
1342
|
-
*
|
1343
|
-
* @param mode
|
1344
|
-
*/
|
1345
|
-
|
1346
734
|
|
1347
735
|
@Override
|
1348
736
|
public void setTextureMode(int mode) {
|
@@ -1361,11 +749,8 @@ public class PShapeOpenGL extends PShape {
|
|
1361
749
|
}
|
1362
750
|
}
|
1363
751
|
|
1364
|
-
|
1365
|
-
|
1366
|
-
* @param mode
|
1367
|
-
*/
|
1368
|
-
protected void setTextureModeImpl(int mode) {
|
752
|
+
|
753
|
+
protected void setTextureModeImpl(int mode) {
|
1369
754
|
if (textureMode == mode) return;
|
1370
755
|
textureMode = mode;
|
1371
756
|
if (image != null) {
|
@@ -1379,11 +764,8 @@ public class PShapeOpenGL extends PShape {
|
|
1379
764
|
}
|
1380
765
|
}
|
1381
766
|
|
1382
|
-
|
1383
|
-
|
1384
|
-
* @param tex
|
1385
|
-
*/
|
1386
|
-
@Override
|
767
|
+
|
768
|
+
@Override
|
1387
769
|
public void setTexture(PImage tex) {
|
1388
770
|
if (openShape) {
|
1389
771
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setTexture()");
|
@@ -1400,11 +782,8 @@ public class PShapeOpenGL extends PShape {
|
|
1400
782
|
}
|
1401
783
|
}
|
1402
784
|
|
1403
|
-
|
1404
|
-
|
1405
|
-
* @param tex
|
1406
|
-
*/
|
1407
|
-
protected void setTextureImpl(PImage tex) {
|
785
|
+
|
786
|
+
protected void setTextureImpl(PImage tex) {
|
1408
787
|
PImage image0 = image;
|
1409
788
|
image = tex;
|
1410
789
|
|
@@ -1434,12 +813,8 @@ public class PShapeOpenGL extends PShape {
|
|
1434
813
|
}
|
1435
814
|
}
|
1436
815
|
|
1437
|
-
|
1438
|
-
|
1439
|
-
* @param uFactor
|
1440
|
-
* @param vFactor
|
1441
|
-
*/
|
1442
|
-
protected void scaleTextureUV(float uFactor, float vFactor) {
|
816
|
+
|
817
|
+
protected void scaleTextureUV(float uFactor, float vFactor) {
|
1443
818
|
if (PGraphicsOpenGL.same(uFactor, 1) &&
|
1444
819
|
PGraphicsOpenGL.same(vFactor, 1)) return;
|
1445
820
|
|
@@ -1469,11 +844,8 @@ public class PShapeOpenGL extends PShape {
|
|
1469
844
|
}
|
1470
845
|
}
|
1471
846
|
|
1472
|
-
|
1473
|
-
|
1474
|
-
* @param tex
|
1475
|
-
*/
|
1476
|
-
protected void addTexture(PImage tex) {
|
847
|
+
|
848
|
+
protected void addTexture(PImage tex) {
|
1477
849
|
if (textures == null) {
|
1478
850
|
textures = new HashSet<PImage>();
|
1479
851
|
}
|
@@ -1483,12 +855,8 @@ public class PShapeOpenGL extends PShape {
|
|
1483
855
|
}
|
1484
856
|
}
|
1485
857
|
|
1486
|
-
|
1487
|
-
|
1488
|
-
* @param tex
|
1489
|
-
* @param caller
|
1490
|
-
*/
|
1491
|
-
protected void removeTexture(PImage tex, PShapeOpenGL caller) {
|
858
|
+
|
859
|
+
protected void removeTexture(PImage tex, PShapeOpenGL caller) {
|
1492
860
|
if (textures == null || !textures.contains(tex)) return; // Nothing to remove.
|
1493
861
|
|
1494
862
|
// First check that none of the child shapes have texture tex...
|
@@ -1517,20 +885,13 @@ public class PShapeOpenGL extends PShape {
|
|
1517
885
|
}
|
1518
886
|
}
|
1519
887
|
|
1520
|
-
|
1521
|
-
|
1522
|
-
* @param newValue
|
1523
|
-
*/
|
1524
|
-
protected void strokedTexture(boolean newValue) {
|
888
|
+
|
889
|
+
protected void strokedTexture(boolean newValue) {
|
1525
890
|
strokedTexture(newValue, null);
|
1526
891
|
}
|
1527
892
|
|
1528
|
-
|
1529
|
-
|
1530
|
-
* @param newValue
|
1531
|
-
* @param caller
|
1532
|
-
*/
|
1533
|
-
protected void strokedTexture(boolean newValue, PShapeOpenGL caller) {
|
893
|
+
|
894
|
+
protected void strokedTexture(boolean newValue, PShapeOpenGL caller) {
|
1534
895
|
if (strokedTexture == newValue) return; // Nothing to change.
|
1535
896
|
|
1536
897
|
if (newValue) {
|
@@ -1554,20 +915,13 @@ public class PShapeOpenGL extends PShape {
|
|
1554
915
|
}
|
1555
916
|
}
|
1556
917
|
|
1557
|
-
|
1558
|
-
|
1559
|
-
* @param newValue
|
1560
|
-
*/
|
1561
|
-
protected void untexChild(boolean newValue) {
|
918
|
+
|
919
|
+
protected void untexChild(boolean newValue) {
|
1562
920
|
untexChild(newValue, null);
|
1563
921
|
}
|
1564
922
|
|
1565
|
-
|
1566
|
-
|
1567
|
-
* @param newValue
|
1568
|
-
* @param caller
|
1569
|
-
*/
|
1570
|
-
protected void untexChild(boolean newValue, PShapeOpenGL caller) {
|
923
|
+
|
924
|
+
protected void untexChild(boolean newValue, PShapeOpenGL caller) {
|
1571
925
|
if (untexChild == newValue) return; // Nothing to change.
|
1572
926
|
|
1573
927
|
if (newValue) {
|
@@ -1591,11 +945,8 @@ public class PShapeOpenGL extends PShape {
|
|
1591
945
|
}
|
1592
946
|
}
|
1593
947
|
|
1594
|
-
|
1595
|
-
|
1596
|
-
* @return
|
1597
|
-
*/
|
1598
|
-
protected boolean hasTexture() {
|
948
|
+
|
949
|
+
protected boolean hasTexture() {
|
1599
950
|
if (family == GROUP) {
|
1600
951
|
return textures != null && 0 < textures.size();
|
1601
952
|
} else {
|
@@ -1603,12 +954,8 @@ public class PShapeOpenGL extends PShape {
|
|
1603
954
|
}
|
1604
955
|
}
|
1605
956
|
|
1606
|
-
|
1607
|
-
|
1608
|
-
* @param tex
|
1609
|
-
* @return
|
1610
|
-
*/
|
1611
|
-
protected boolean hasTexture(PImage tex) {
|
957
|
+
|
958
|
+
protected boolean hasTexture(PImage tex) {
|
1612
959
|
if (family == GROUP) {
|
1613
960
|
return textures != null && textures.contains(tex);
|
1614
961
|
} else {
|
@@ -1616,11 +963,8 @@ public class PShapeOpenGL extends PShape {
|
|
1616
963
|
}
|
1617
964
|
}
|
1618
965
|
|
1619
|
-
|
1620
|
-
|
1621
|
-
* @return
|
1622
|
-
*/
|
1623
|
-
protected boolean hasStrokedTexture() {
|
966
|
+
|
967
|
+
protected boolean hasStrokedTexture() {
|
1624
968
|
if (family == GROUP) {
|
1625
969
|
return strokedTexture;
|
1626
970
|
} else {
|
@@ -1628,11 +972,8 @@ public class PShapeOpenGL extends PShape {
|
|
1628
972
|
}
|
1629
973
|
}
|
1630
974
|
|
1631
|
-
|
1632
|
-
|
1633
|
-
* @param solid
|
1634
|
-
*/
|
1635
|
-
@Override
|
975
|
+
|
976
|
+
@Override
|
1636
977
|
public void solid(boolean solid) {
|
1637
978
|
if (family == GROUP) {
|
1638
979
|
for (int i = 0; i < childCount; i++) {
|
@@ -1644,80 +985,47 @@ public class PShapeOpenGL extends PShape {
|
|
1644
985
|
}
|
1645
986
|
}
|
1646
987
|
|
1647
|
-
|
1648
|
-
|
1649
|
-
*/
|
1650
|
-
@Override
|
988
|
+
|
989
|
+
@Override
|
1651
990
|
protected void beginContourImpl() {
|
1652
991
|
breakShape = true;
|
1653
992
|
}
|
1654
993
|
|
1655
|
-
|
1656
|
-
|
1657
|
-
*/
|
1658
|
-
@Override
|
994
|
+
|
995
|
+
@Override
|
1659
996
|
protected void endContourImpl() {
|
1660
997
|
}
|
1661
998
|
|
1662
|
-
|
1663
|
-
|
1664
|
-
* @param x
|
1665
|
-
* @param y
|
1666
|
-
*/
|
1667
|
-
@Override
|
999
|
+
|
1000
|
+
@Override
|
1668
1001
|
public void vertex(float x, float y) {
|
1669
1002
|
vertexImpl(x, y, 0, 0, 0);
|
1670
1003
|
if (image != null)
|
1671
1004
|
PGraphics.showWarning(PGraphicsOpenGL.MISSING_UV_TEXCOORDS_ERROR);
|
1672
1005
|
}
|
1673
1006
|
|
1674
|
-
|
1675
|
-
|
1676
|
-
* @param x
|
1677
|
-
* @param y
|
1678
|
-
* @param u
|
1679
|
-
* @param v
|
1680
|
-
*/
|
1681
|
-
@Override
|
1007
|
+
|
1008
|
+
@Override
|
1682
1009
|
public void vertex(float x, float y, float u, float v) {
|
1683
1010
|
vertexImpl(x, y, 0, u, v);
|
1684
1011
|
}
|
1685
1012
|
|
1686
|
-
|
1687
|
-
|
1688
|
-
* @param x
|
1689
|
-
* @param y
|
1690
|
-
* @param z
|
1691
|
-
*/
|
1692
|
-
@Override
|
1013
|
+
|
1014
|
+
@Override
|
1693
1015
|
public void vertex(float x, float y, float z) {
|
1694
1016
|
vertexImpl(x, y, z, 0, 0);
|
1695
1017
|
if (image != null)
|
1696
1018
|
PGraphics.showWarning(PGraphicsOpenGL.MISSING_UV_TEXCOORDS_ERROR);
|
1697
1019
|
}
|
1698
1020
|
|
1699
|
-
|
1700
|
-
|
1701
|
-
* @param x
|
1702
|
-
* @param y
|
1703
|
-
* @param z
|
1704
|
-
* @param u
|
1705
|
-
* @param v
|
1706
|
-
*/
|
1707
|
-
@Override
|
1021
|
+
|
1022
|
+
@Override
|
1708
1023
|
public void vertex(float x, float y, float z, float u, float v) {
|
1709
1024
|
vertexImpl(x, y, z, u, v);
|
1710
1025
|
}
|
1711
1026
|
|
1712
|
-
|
1713
|
-
|
1714
|
-
* @param x
|
1715
|
-
* @param y
|
1716
|
-
* @param z
|
1717
|
-
* @param u
|
1718
|
-
* @param v
|
1719
|
-
*/
|
1720
|
-
protected void vertexImpl(float x, float y, float z, float u, float v) {
|
1027
|
+
|
1028
|
+
protected void vertexImpl(float x, float y, float z, float u, float v) {
|
1721
1029
|
if (!openShape) {
|
1722
1030
|
PGraphics.showWarning(OUTSIDE_BEGIN_END_ERROR, "vertex()");
|
1723
1031
|
return;
|
@@ -1765,11 +1073,8 @@ public class PShapeOpenGL extends PShape {
|
|
1765
1073
|
markForTessellation();
|
1766
1074
|
}
|
1767
1075
|
|
1768
|
-
|
1769
|
-
|
1770
|
-
* @return
|
1771
|
-
*/
|
1772
|
-
protected boolean vertexBreak() {
|
1076
|
+
|
1077
|
+
protected boolean vertexBreak() {
|
1773
1078
|
if (breakShape) {
|
1774
1079
|
breakShape = false;
|
1775
1080
|
return true;
|
@@ -1777,13 +1082,8 @@ public class PShapeOpenGL extends PShape {
|
|
1777
1082
|
return false;
|
1778
1083
|
}
|
1779
1084
|
|
1780
|
-
|
1781
|
-
|
1782
|
-
* @param nx
|
1783
|
-
* @param ny
|
1784
|
-
* @param nz
|
1785
|
-
*/
|
1786
|
-
@Override
|
1085
|
+
|
1086
|
+
@Override
|
1787
1087
|
public void normal(float nx, float ny, float nz) {
|
1788
1088
|
if (!openShape) {
|
1789
1089
|
PGraphics.showWarning(OUTSIDE_BEGIN_END_ERROR, "normal()");
|
@@ -1810,90 +1110,55 @@ public class PShapeOpenGL extends PShape {
|
|
1810
1110
|
}
|
1811
1111
|
}
|
1812
1112
|
|
1813
|
-
|
1814
|
-
|
1815
|
-
* @param name
|
1816
|
-
* @param x
|
1817
|
-
* @param y
|
1818
|
-
* @param z
|
1819
|
-
*/
|
1820
|
-
@Override
|
1113
|
+
|
1114
|
+
@Override
|
1821
1115
|
public void attribPosition(String name, float x, float y, float z) {
|
1822
1116
|
VertexAttribute attrib = attribImpl(name, VertexAttribute.POSITION,
|
1823
1117
|
PGL.FLOAT, 3);
|
1824
1118
|
if (attrib != null) attrib.set(x, y, z);
|
1825
1119
|
}
|
1826
1120
|
|
1827
|
-
|
1828
|
-
|
1829
|
-
* @param name
|
1830
|
-
* @param nx
|
1831
|
-
* @param ny
|
1832
|
-
* @param nz
|
1833
|
-
*/
|
1834
|
-
@Override
|
1121
|
+
|
1122
|
+
@Override
|
1835
1123
|
public void attribNormal(String name, float nx, float ny, float nz) {
|
1836
1124
|
VertexAttribute attrib = attribImpl(name, VertexAttribute.NORMAL,
|
1837
1125
|
PGL.FLOAT, 3);
|
1838
1126
|
if (attrib != null) attrib.set(nx, ny, nz);
|
1839
1127
|
}
|
1840
1128
|
|
1841
|
-
|
1842
|
-
|
1843
|
-
* @param name
|
1844
|
-
* @param color
|
1845
|
-
*/
|
1846
|
-
@Override
|
1129
|
+
|
1130
|
+
@Override
|
1847
1131
|
public void attribColor(String name, int color) {
|
1848
1132
|
VertexAttribute attrib = attribImpl(name, VertexAttribute.COLOR, PGL.INT, 1);
|
1849
1133
|
if (attrib != null) attrib.set(new int[] {color});
|
1850
1134
|
}
|
1851
1135
|
|
1852
|
-
|
1853
|
-
|
1854
|
-
* @param name
|
1855
|
-
* @param values
|
1856
|
-
*/
|
1857
|
-
@Override
|
1136
|
+
|
1137
|
+
@Override
|
1858
1138
|
public void attrib(String name, float... values) {
|
1859
1139
|
VertexAttribute attrib = attribImpl(name, VertexAttribute.OTHER, PGL.FLOAT,
|
1860
1140
|
values.length);
|
1861
1141
|
if (attrib != null) attrib.set(values);
|
1862
1142
|
}
|
1863
1143
|
|
1864
|
-
|
1865
|
-
|
1866
|
-
* @param name
|
1867
|
-
* @param values
|
1868
|
-
*/
|
1869
|
-
@Override
|
1144
|
+
|
1145
|
+
@Override
|
1870
1146
|
public void attrib(String name, int... values) {
|
1871
1147
|
VertexAttribute attrib = attribImpl(name, VertexAttribute.OTHER, PGL.INT,
|
1872
1148
|
values.length);
|
1873
1149
|
if (attrib != null) attrib.set(values);
|
1874
1150
|
}
|
1875
1151
|
|
1876
|
-
|
1877
|
-
|
1878
|
-
* @param name
|
1879
|
-
* @param values
|
1880
|
-
*/
|
1881
|
-
@Override
|
1152
|
+
|
1153
|
+
@Override
|
1882
1154
|
public void attrib(String name, boolean... values) {
|
1883
1155
|
VertexAttribute attrib = attribImpl(name, VertexAttribute.OTHER, PGL.BOOL,
|
1884
1156
|
values.length);
|
1885
1157
|
if (attrib != null) attrib.set(values);
|
1886
1158
|
}
|
1887
1159
|
|
1888
|
-
|
1889
|
-
|
1890
|
-
* @param name
|
1891
|
-
* @param kind
|
1892
|
-
* @param type
|
1893
|
-
* @param size
|
1894
|
-
* @return
|
1895
|
-
*/
|
1896
|
-
protected VertexAttribute attribImpl(String name, int kind, int type, int size) {
|
1160
|
+
|
1161
|
+
protected VertexAttribute attribImpl(String name, int kind, int type, int size) {
|
1897
1162
|
if (4 < size) {
|
1898
1163
|
PGraphics.showWarning("Vertex attributes cannot have more than 4 values");
|
1899
1164
|
return null;
|
@@ -1919,11 +1184,8 @@ public class PShapeOpenGL extends PShape {
|
|
1919
1184
|
return attrib;
|
1920
1185
|
}
|
1921
1186
|
|
1922
|
-
|
1923
|
-
|
1924
|
-
* @param mode
|
1925
|
-
*/
|
1926
|
-
@Override
|
1187
|
+
|
1188
|
+
@Override
|
1927
1189
|
public void endShape(int mode) {
|
1928
1190
|
super.endShape(mode);
|
1929
1191
|
|
@@ -1936,11 +1198,8 @@ public class PShapeOpenGL extends PShape {
|
|
1936
1198
|
shapeCreated = true;
|
1937
1199
|
}
|
1938
1200
|
|
1939
|
-
|
1940
|
-
|
1941
|
-
* @param source
|
1942
|
-
*/
|
1943
|
-
@Override
|
1201
|
+
|
1202
|
+
@Override
|
1944
1203
|
public void setParams(float[] source) {
|
1945
1204
|
if (family != PRIMITIVE) {
|
1946
1205
|
PGraphics.showWarning("Parameters can only be set to PRIMITIVE shapes");
|
@@ -1952,14 +1211,8 @@ public class PShapeOpenGL extends PShape {
|
|
1952
1211
|
shapeCreated = true;
|
1953
1212
|
}
|
1954
1213
|
|
1955
|
-
|
1956
|
-
|
1957
|
-
* @param vcount
|
1958
|
-
* @param verts
|
1959
|
-
* @param ccount
|
1960
|
-
* @param codes
|
1961
|
-
*/
|
1962
|
-
@Override
|
1214
|
+
|
1215
|
+
@Override
|
1963
1216
|
public void setPath(int vcount, float[][] verts, int ccount, int[] codes) {
|
1964
1217
|
if (family != PATH) {
|
1965
1218
|
PGraphics.showWarning("Vertex coordinates and codes can only be set to " +
|
@@ -2035,12 +1288,8 @@ public class PShapeOpenGL extends PShape {
|
|
2035
1288
|
}
|
2036
1289
|
}
|
2037
1290
|
|
2038
|
-
|
2039
|
-
|
2040
|
-
* @param x
|
2041
|
-
* @param y
|
2042
|
-
*/
|
2043
|
-
@Override
|
1291
|
+
|
1292
|
+
@Override
|
2044
1293
|
public void scale(float x, float y) {
|
2045
1294
|
if (is3D) {
|
2046
1295
|
transform(SCALE, x, y, 1);
|
@@ -2055,52 +1304,23 @@ public class PShapeOpenGL extends PShape {
|
|
2055
1304
|
transform(SCALE, x, y, z);
|
2056
1305
|
}
|
2057
1306
|
|
2058
|
-
|
2059
|
-
|
2060
|
-
* @param source
|
2061
|
-
*/
|
2062
|
-
@Override
|
1307
|
+
|
1308
|
+
@Override
|
2063
1309
|
public void applyMatrix(PMatrix2D source) {
|
2064
1310
|
transform(MATRIX, source.m00, source.m01, source.m02,
|
2065
1311
|
source.m10, source.m11, source.m12);
|
2066
1312
|
}
|
2067
1313
|
|
2068
|
-
|
2069
|
-
|
2070
|
-
* @param n00
|
2071
|
-
* @param n01
|
2072
|
-
* @param n02
|
2073
|
-
* @param n10
|
2074
|
-
* @param n11
|
2075
|
-
* @param n12
|
2076
|
-
*/
|
2077
|
-
@Override
|
1314
|
+
|
1315
|
+
@Override
|
2078
1316
|
public void applyMatrix(float n00, float n01, float n02,
|
2079
1317
|
float n10, float n11, float n12) {
|
2080
1318
|
transform(MATRIX, n00, n01, n02,
|
2081
1319
|
n10, n11, n12);
|
2082
1320
|
}
|
2083
1321
|
|
2084
|
-
|
2085
|
-
|
2086
|
-
* @param n00
|
2087
|
-
* @param n01
|
2088
|
-
* @param n02
|
2089
|
-
* @param n03
|
2090
|
-
* @param n10
|
2091
|
-
* @param n11
|
2092
|
-
* @param n12
|
2093
|
-
* @param n13
|
2094
|
-
* @param n20
|
2095
|
-
* @param n21
|
2096
|
-
* @param n22
|
2097
|
-
* @param n23
|
2098
|
-
* @param n30
|
2099
|
-
* @param n31
|
2100
|
-
* @param n32
|
2101
|
-
* @param n33
|
2102
|
-
*/
|
2103
|
-
@Override
|
1322
|
+
|
1323
|
+
@Override
|
2104
1324
|
public void applyMatrix(float n00, float n01, float n02, float n03,
|
2105
1325
|
float n10, float n11, float n12, float n13,
|
2106
1326
|
float n20, float n21, float n22, float n23,
|
@@ -2135,12 +1355,8 @@ public class PShapeOpenGL extends PShape {
|
|
2135
1355
|
}
|
2136
1356
|
}
|
2137
1357
|
|
2138
|
-
|
2139
|
-
|
2140
|
-
* @param type
|
2141
|
-
* @param args
|
2142
|
-
*/
|
2143
|
-
protected void transform(int type, float... args) {
|
1358
|
+
|
1359
|
+
protected void transform(int type, float... args) {
|
2144
1360
|
int dimensions = is3D ? 3 : 2;
|
2145
1361
|
checkMatrix(dimensions);
|
2146
1362
|
if (transform == null) {
|
@@ -2199,10 +1415,8 @@ public class PShapeOpenGL extends PShape {
|
|
2199
1415
|
if (tessellated) applyMatrixImpl(transform);
|
2200
1416
|
}
|
2201
1417
|
|
2202
|
-
|
2203
|
-
|
2204
|
-
*/
|
2205
|
-
protected void pushTransform() {
|
1418
|
+
|
1419
|
+
protected void pushTransform() {
|
2206
1420
|
if (transformStack == null) transformStack = new Stack<PMatrix>();
|
2207
1421
|
PMatrix mat;
|
2208
1422
|
if (transform instanceof PMatrix2D) {
|
@@ -2214,20 +1428,13 @@ public class PShapeOpenGL extends PShape {
|
|
2214
1428
|
transformStack.push(mat);
|
2215
1429
|
}
|
2216
1430
|
|
2217
|
-
|
2218
|
-
|
2219
|
-
* @return
|
2220
|
-
*/
|
2221
|
-
protected PMatrix popTransform() {
|
1431
|
+
|
1432
|
+
protected PMatrix popTransform() {
|
2222
1433
|
if (transformStack == null || transformStack.size() == 0) return null;
|
2223
1434
|
return transformStack.pop();
|
2224
1435
|
}
|
2225
1436
|
|
2226
|
-
|
2227
|
-
*
|
2228
|
-
* @param matrix
|
2229
|
-
*/
|
2230
|
-
protected void applyMatrixImpl(PMatrix matrix) {
|
1437
|
+
protected void applyMatrixImpl(PMatrix matrix) {
|
2231
1438
|
if (hasPolys) {
|
2232
1439
|
tessGeo.applyMatrixOnPolyGeometry(matrix,
|
2233
1440
|
firstPolyVertex, lastPolyVertex);
|
@@ -2264,11 +1471,6 @@ public class PShapeOpenGL extends PShape {
|
|
2264
1471
|
|
2265
1472
|
// Bezier curves
|
2266
1473
|
|
2267
|
-
/**
|
2268
|
-
*
|
2269
|
-
* @param detail
|
2270
|
-
*/
|
2271
|
-
|
2272
1474
|
|
2273
1475
|
@Override
|
2274
1476
|
public void bezierDetail(int detail) {
|
@@ -2279,16 +1481,8 @@ public class PShapeOpenGL extends PShape {
|
|
2279
1481
|
//pg.bezierDetail(detail); // setting the detail in the renderer, WTF??
|
2280
1482
|
}
|
2281
1483
|
|
2282
|
-
|
2283
|
-
|
2284
|
-
* @param x2
|
2285
|
-
* @param y2
|
2286
|
-
* @param x3
|
2287
|
-
* @param y3
|
2288
|
-
* @param x4
|
2289
|
-
* @param y4
|
2290
|
-
*/
|
2291
|
-
@Override
|
1484
|
+
|
1485
|
+
@Override
|
2292
1486
|
public void bezierVertex(float x2, float y2,
|
2293
1487
|
float x3, float y3,
|
2294
1488
|
float x4, float y4) {
|
@@ -2297,19 +1491,8 @@ public class PShapeOpenGL extends PShape {
|
|
2297
1491
|
x4, y4, 0);
|
2298
1492
|
}
|
2299
1493
|
|
2300
|
-
|
2301
|
-
|
2302
|
-
* @param x2
|
2303
|
-
* @param y2
|
2304
|
-
* @param z2
|
2305
|
-
* @param x3
|
2306
|
-
* @param y3
|
2307
|
-
* @param z3
|
2308
|
-
* @param x4
|
2309
|
-
* @param y4
|
2310
|
-
* @param z4
|
2311
|
-
*/
|
2312
|
-
@Override
|
1494
|
+
|
1495
|
+
@Override
|
2313
1496
|
public void bezierVertex(float x2, float y2, float z2,
|
2314
1497
|
float x3, float y3, float z3,
|
2315
1498
|
float x4, float y4, float z4) {
|
@@ -2318,19 +1501,8 @@ public class PShapeOpenGL extends PShape {
|
|
2318
1501
|
x4, y4, z4);
|
2319
1502
|
}
|
2320
1503
|
|
2321
|
-
|
2322
|
-
|
2323
|
-
* @param x2
|
2324
|
-
* @param y2
|
2325
|
-
* @param z2
|
2326
|
-
* @param x3
|
2327
|
-
* @param y3
|
2328
|
-
* @param z3
|
2329
|
-
* @param x4
|
2330
|
-
* @param y4
|
2331
|
-
* @param z4
|
2332
|
-
*/
|
2333
|
-
protected void bezierVertexImpl(float x2, float y2, float z2,
|
1504
|
+
|
1505
|
+
protected void bezierVertexImpl(float x2, float y2, float z2,
|
2334
1506
|
float x3, float y3, float z3,
|
2335
1507
|
float x4, float y4, float z4) {
|
2336
1508
|
inGeo.setMaterial(fillColor, strokeColor, strokeWeight,
|
@@ -2341,46 +1513,24 @@ public class PShapeOpenGL extends PShape {
|
|
2341
1513
|
x4, y4, z4, vertexBreak());
|
2342
1514
|
}
|
2343
1515
|
|
2344
|
-
|
2345
|
-
|
2346
|
-
* @param cx
|
2347
|
-
* @param cy
|
2348
|
-
* @param x3
|
2349
|
-
* @param y3
|
2350
|
-
*/
|
2351
|
-
@Override
|
1516
|
+
|
1517
|
+
@Override
|
2352
1518
|
public void quadraticVertex(float cx, float cy,
|
2353
1519
|
float x3, float y3) {
|
2354
1520
|
quadraticVertexImpl(cx, cy, 0,
|
2355
1521
|
x3, y3, 0);
|
2356
1522
|
}
|
2357
1523
|
|
2358
|
-
|
2359
|
-
|
2360
|
-
* @param cx
|
2361
|
-
* @param cy
|
2362
|
-
* @param cz
|
2363
|
-
* @param x3
|
2364
|
-
* @param y3
|
2365
|
-
* @param z3
|
2366
|
-
*/
|
2367
|
-
@Override
|
1524
|
+
|
1525
|
+
@Override
|
2368
1526
|
public void quadraticVertex(float cx, float cy, float cz,
|
2369
1527
|
float x3, float y3, float z3) {
|
2370
1528
|
quadraticVertexImpl(cx, cy, cz,
|
2371
1529
|
x3, y3, z3);
|
2372
1530
|
}
|
2373
1531
|
|
2374
|
-
|
2375
|
-
|
2376
|
-
* @param cx
|
2377
|
-
* @param cy
|
2378
|
-
* @param cz
|
2379
|
-
* @param x3
|
2380
|
-
* @param y3
|
2381
|
-
* @param z3
|
2382
|
-
*/
|
2383
|
-
protected void quadraticVertexImpl(float cx, float cy, float cz,
|
1532
|
+
|
1533
|
+
protected void quadraticVertexImpl(float cx, float cy, float cz,
|
2384
1534
|
float x3, float y3, float z3) {
|
2385
1535
|
inGeo.setMaterial(fillColor, strokeColor, strokeWeight,
|
2386
1536
|
ambientColor, specularColor, emissiveColor, shininess);
|
@@ -2396,11 +1546,6 @@ public class PShapeOpenGL extends PShape {
|
|
2396
1546
|
|
2397
1547
|
// Catmull-Rom curves
|
2398
1548
|
|
2399
|
-
/**
|
2400
|
-
*
|
2401
|
-
* @param detail
|
2402
|
-
*/
|
2403
|
-
|
2404
1549
|
|
2405
1550
|
@Override
|
2406
1551
|
public void curveDetail(int detail) {
|
@@ -2411,11 +1556,8 @@ public class PShapeOpenGL extends PShape {
|
|
2411
1556
|
}
|
2412
1557
|
}
|
2413
1558
|
|
2414
|
-
|
2415
|
-
|
2416
|
-
* @param tightness
|
2417
|
-
*/
|
2418
|
-
@Override
|
1559
|
+
|
1560
|
+
@Override
|
2419
1561
|
public void curveTightness(float tightness) {
|
2420
1562
|
curveTightness = tightness;
|
2421
1563
|
// pg.curveTightness(tightness);
|
@@ -2424,34 +1566,20 @@ public class PShapeOpenGL extends PShape {
|
|
2424
1566
|
}
|
2425
1567
|
}
|
2426
1568
|
|
2427
|
-
|
2428
|
-
|
2429
|
-
* @param x
|
2430
|
-
* @param y
|
2431
|
-
*/
|
2432
|
-
@Override
|
1569
|
+
|
1570
|
+
@Override
|
2433
1571
|
public void curveVertex(float x, float y) {
|
2434
1572
|
curveVertexImpl(x, y, 0);
|
2435
1573
|
}
|
2436
1574
|
|
2437
|
-
|
2438
|
-
|
2439
|
-
* @param x
|
2440
|
-
* @param y
|
2441
|
-
* @param z
|
2442
|
-
*/
|
2443
|
-
@Override
|
1575
|
+
|
1576
|
+
@Override
|
2444
1577
|
public void curveVertex(float x, float y, float z) {
|
2445
1578
|
curveVertexImpl(x, y, z);
|
2446
1579
|
}
|
2447
1580
|
|
2448
|
-
|
2449
|
-
|
2450
|
-
* @param x
|
2451
|
-
* @param y
|
2452
|
-
* @param z
|
2453
|
-
*/
|
2454
|
-
protected void curveVertexImpl(float x, float y, float z) {
|
1581
|
+
|
1582
|
+
protected void curveVertexImpl(float x, float y, float z) {
|
2455
1583
|
inGeo.setMaterial(fillColor, strokeColor, strokeWeight,
|
2456
1584
|
ambientColor, specularColor, emissiveColor, shininess);
|
2457
1585
|
inGeo.setNormal(normalX, normalY, normalZ);
|
@@ -2491,32 +1619,20 @@ public class PShapeOpenGL extends PShape {
|
|
2491
1619
|
return vec;
|
2492
1620
|
}
|
2493
1621
|
|
2494
|
-
|
2495
|
-
|
2496
|
-
* @param index
|
2497
|
-
* @return
|
2498
|
-
*/
|
2499
|
-
@Override
|
1622
|
+
|
1623
|
+
@Override
|
2500
1624
|
public float getVertexX(int index) {
|
2501
1625
|
return inGeo.vertices[3 * index + 0];
|
2502
1626
|
}
|
2503
1627
|
|
2504
|
-
|
2505
|
-
|
2506
|
-
* @param index
|
2507
|
-
* @return
|
2508
|
-
*/
|
2509
|
-
@Override
|
1628
|
+
|
1629
|
+
@Override
|
2510
1630
|
public float getVertexY(int index) {
|
2511
1631
|
return inGeo.vertices[3 * index + 1];
|
2512
1632
|
}
|
2513
1633
|
|
2514
|
-
|
2515
|
-
|
2516
|
-
* @param index
|
2517
|
-
* @return
|
2518
|
-
*/
|
2519
|
-
@Override
|
1634
|
+
|
1635
|
+
@Override
|
2520
1636
|
public float getVertexZ(int index) {
|
2521
1637
|
return inGeo.vertices[3 * index + 2];
|
2522
1638
|
}
|
@@ -2587,13 +1703,8 @@ public class PShapeOpenGL extends PShape {
|
|
2587
1703
|
markForTessellation();
|
2588
1704
|
}
|
2589
1705
|
|
2590
|
-
|
2591
|
-
|
2592
|
-
* @param index
|
2593
|
-
* @param vec
|
2594
|
-
* @return
|
2595
|
-
*/
|
2596
|
-
@Override
|
1706
|
+
|
1707
|
+
@Override
|
2597
1708
|
public PVector getNormal(int index, PVector vec) {
|
2598
1709
|
if (vec == null) {
|
2599
1710
|
vec = new PVector();
|
@@ -2604,44 +1715,26 @@ public class PShapeOpenGL extends PShape {
|
|
2604
1715
|
return vec;
|
2605
1716
|
}
|
2606
1717
|
|
2607
|
-
|
2608
|
-
|
2609
|
-
* @param index
|
2610
|
-
* @return
|
2611
|
-
*/
|
2612
|
-
@Override
|
1718
|
+
|
1719
|
+
@Override
|
2613
1720
|
public float getNormalX(int index) {
|
2614
1721
|
return inGeo.normals[3 * index + 0];
|
2615
1722
|
}
|
2616
1723
|
|
2617
|
-
|
2618
|
-
|
2619
|
-
* @param index
|
2620
|
-
* @return
|
2621
|
-
*/
|
2622
|
-
@Override
|
1724
|
+
|
1725
|
+
@Override
|
2623
1726
|
public float getNormalY(int index) {
|
2624
1727
|
return inGeo.normals[3 * index + 1];
|
2625
1728
|
}
|
2626
1729
|
|
2627
|
-
|
2628
|
-
|
2629
|
-
* @param index
|
2630
|
-
* @return
|
2631
|
-
*/
|
2632
|
-
@Override
|
1730
|
+
|
1731
|
+
@Override
|
2633
1732
|
public float getNormalZ(int index) {
|
2634
1733
|
return inGeo.normals[3 * index + 2];
|
2635
1734
|
}
|
2636
1735
|
|
2637
|
-
|
2638
|
-
|
2639
|
-
* @param index
|
2640
|
-
* @param nx
|
2641
|
-
* @param ny
|
2642
|
-
* @param nz
|
2643
|
-
*/
|
2644
|
-
@Override
|
1736
|
+
|
1737
|
+
@Override
|
2645
1738
|
public void setNormal(int index, float nx, float ny, float nz) {
|
2646
1739
|
if (openShape) {
|
2647
1740
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setNormal()");
|
@@ -2654,13 +1747,8 @@ public class PShapeOpenGL extends PShape {
|
|
2654
1747
|
markForTessellation();
|
2655
1748
|
}
|
2656
1749
|
|
2657
|
-
|
2658
|
-
|
2659
|
-
* @param name
|
2660
|
-
* @param index
|
2661
|
-
* @param values
|
2662
|
-
*/
|
2663
|
-
@Override
|
1750
|
+
|
1751
|
+
@Override
|
2664
1752
|
public void setAttrib(String name, int index, float... values) {
|
2665
1753
|
if (openShape) {
|
2666
1754
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setNormal()");
|
@@ -2675,13 +1763,8 @@ public class PShapeOpenGL extends PShape {
|
|
2675
1763
|
markForTessellation();
|
2676
1764
|
}
|
2677
1765
|
|
2678
|
-
|
2679
|
-
|
2680
|
-
* @param name
|
2681
|
-
* @param index
|
2682
|
-
* @param values
|
2683
|
-
*/
|
2684
|
-
@Override
|
1766
|
+
|
1767
|
+
@Override
|
2685
1768
|
public void setAttrib(String name, int index, int... values) {
|
2686
1769
|
if (openShape) {
|
2687
1770
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setNormal()");
|
@@ -2696,13 +1779,8 @@ public class PShapeOpenGL extends PShape {
|
|
2696
1779
|
markForTessellation();
|
2697
1780
|
}
|
2698
1781
|
|
2699
|
-
|
2700
|
-
|
2701
|
-
* @param name
|
2702
|
-
* @param index
|
2703
|
-
* @param values
|
2704
|
-
*/
|
2705
|
-
@Override
|
1782
|
+
|
1783
|
+
@Override
|
2706
1784
|
public void setAttrib(String name, int index, boolean... values) {
|
2707
1785
|
if (openShape) {
|
2708
1786
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setNormal()");
|
@@ -2717,33 +1795,20 @@ public class PShapeOpenGL extends PShape {
|
|
2717
1795
|
markForTessellation();
|
2718
1796
|
}
|
2719
1797
|
|
2720
|
-
|
2721
|
-
|
2722
|
-
* @param index
|
2723
|
-
* @return
|
2724
|
-
*/
|
2725
|
-
@Override
|
1798
|
+
|
1799
|
+
@Override
|
2726
1800
|
public float getTextureU(int index) {
|
2727
1801
|
return inGeo.texcoords[2 * index + 0];
|
2728
1802
|
}
|
2729
1803
|
|
2730
|
-
|
2731
|
-
|
2732
|
-
* @param index
|
2733
|
-
* @return
|
2734
|
-
*/
|
2735
|
-
@Override
|
1804
|
+
|
1805
|
+
@Override
|
2736
1806
|
public float getTextureV(int index) {
|
2737
1807
|
return inGeo.texcoords[2 * index + 1];
|
2738
1808
|
}
|
2739
1809
|
|
2740
|
-
|
2741
|
-
|
2742
|
-
* @param index
|
2743
|
-
* @param u
|
2744
|
-
* @param v
|
2745
|
-
*/
|
2746
|
-
@Override
|
1810
|
+
|
1811
|
+
@Override
|
2747
1812
|
public void setTextureUV(int index, float u, float v) {
|
2748
1813
|
if (openShape) {
|
2749
1814
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setTextureUV()");
|
@@ -2760,12 +1825,8 @@ public class PShapeOpenGL extends PShape {
|
|
2760
1825
|
markForTessellation();
|
2761
1826
|
}
|
2762
1827
|
|
2763
|
-
|
2764
|
-
|
2765
|
-
* @param index
|
2766
|
-
* @return
|
2767
|
-
*/
|
2768
|
-
@Override
|
1828
|
+
|
1829
|
+
@Override
|
2769
1830
|
public int getFill(int index) {
|
2770
1831
|
if (family != GROUP && image == null) {
|
2771
1832
|
return PGL.nativeToJavaARGB(inGeo.colors[index]);
|
@@ -2811,11 +1872,8 @@ public class PShapeOpenGL extends PShape {
|
|
2811
1872
|
}
|
2812
1873
|
}
|
2813
1874
|
|
2814
|
-
|
2815
|
-
|
2816
|
-
* @param fill
|
2817
|
-
*/
|
2818
|
-
protected void setFillImpl(int fill) {
|
1875
|
+
|
1876
|
+
protected void setFillImpl(int fill) {
|
2819
1877
|
if (fillColor == fill) return;
|
2820
1878
|
fillColor = fill;
|
2821
1879
|
|
@@ -2862,12 +1920,8 @@ public class PShapeOpenGL extends PShape {
|
|
2862
1920
|
}
|
2863
1921
|
}
|
2864
1922
|
|
2865
|
-
|
2866
|
-
|
2867
|
-
* @param index
|
2868
|
-
* @return
|
2869
|
-
*/
|
2870
|
-
@Override
|
1923
|
+
|
1924
|
+
@Override
|
2871
1925
|
public int getTint(int index) {
|
2872
1926
|
if (family != GROUP && image != null) {
|
2873
1927
|
return PGL.nativeToJavaARGB(inGeo.colors[index]);
|
@@ -2876,11 +1930,8 @@ public class PShapeOpenGL extends PShape {
|
|
2876
1930
|
}
|
2877
1931
|
}
|
2878
1932
|
|
2879
|
-
|
2880
|
-
|
2881
|
-
* @param tint
|
2882
|
-
*/
|
2883
|
-
@Override
|
1933
|
+
|
1934
|
+
@Override
|
2884
1935
|
public void setTint(boolean tint) {
|
2885
1936
|
if (openShape) {
|
2886
1937
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setTint()");
|
@@ -2898,11 +1949,8 @@ public class PShapeOpenGL extends PShape {
|
|
2898
1949
|
this.tint = tint;
|
2899
1950
|
}
|
2900
1951
|
|
2901
|
-
|
2902
|
-
|
2903
|
-
* @param tint
|
2904
|
-
*/
|
2905
|
-
@Override
|
1952
|
+
|
1953
|
+
@Override
|
2906
1954
|
public void setTint(int tint) {
|
2907
1955
|
if (openShape) {
|
2908
1956
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setTint()");
|
@@ -2919,11 +1967,8 @@ public class PShapeOpenGL extends PShape {
|
|
2919
1967
|
}
|
2920
1968
|
}
|
2921
1969
|
|
2922
|
-
|
2923
|
-
|
2924
|
-
* @param tint
|
2925
|
-
*/
|
2926
|
-
protected void setTintImpl(int tint) {
|
1970
|
+
|
1971
|
+
protected void setTintImpl(int tint) {
|
2927
1972
|
if (tintColor == tint) return;
|
2928
1973
|
tintColor = tint;
|
2929
1974
|
|
@@ -2947,12 +1992,8 @@ public class PShapeOpenGL extends PShape {
|
|
2947
1992
|
}
|
2948
1993
|
}
|
2949
1994
|
|
2950
|
-
|
2951
|
-
|
2952
|
-
* @param index
|
2953
|
-
* @param tint
|
2954
|
-
*/
|
2955
|
-
@Override
|
1995
|
+
|
1996
|
+
@Override
|
2956
1997
|
public void setTint(int index, int tint) {
|
2957
1998
|
if (openShape) {
|
2958
1999
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setTint()");
|
@@ -2965,12 +2006,8 @@ public class PShapeOpenGL extends PShape {
|
|
2965
2006
|
}
|
2966
2007
|
}
|
2967
2008
|
|
2968
|
-
|
2969
|
-
|
2970
|
-
* @param index
|
2971
|
-
* @return
|
2972
|
-
*/
|
2973
|
-
@Override
|
2009
|
+
|
2010
|
+
@Override
|
2974
2011
|
public int getStroke(int index) {
|
2975
2012
|
if (family != GROUP) {
|
2976
2013
|
return PGL.nativeToJavaARGB(inGeo.strokeColors[index]);
|
@@ -2998,11 +2035,8 @@ public class PShapeOpenGL extends PShape {
|
|
2998
2035
|
}
|
2999
2036
|
}
|
3000
2037
|
|
3001
|
-
|
3002
|
-
|
3003
|
-
* @param stroke
|
3004
|
-
*/
|
3005
|
-
protected void setStrokeImpl(boolean stroke) {
|
2038
|
+
|
2039
|
+
protected void setStrokeImpl(boolean stroke) {
|
3006
2040
|
if (this.stroke != stroke) {
|
3007
2041
|
if (stroke) {
|
3008
2042
|
// Before there was no stroke, now there is stroke, so current stroke
|
@@ -3040,11 +2074,8 @@ public class PShapeOpenGL extends PShape {
|
|
3040
2074
|
}
|
3041
2075
|
}
|
3042
2076
|
|
3043
|
-
|
3044
|
-
|
3045
|
-
* @param stroke
|
3046
|
-
*/
|
3047
|
-
protected void setStrokeImpl(int stroke) {
|
2077
|
+
|
2078
|
+
protected void setStrokeImpl(int stroke) {
|
3048
2079
|
if (strokeColor == stroke) return;
|
3049
2080
|
strokeColor = stroke;
|
3050
2081
|
|
@@ -3088,12 +2119,8 @@ public class PShapeOpenGL extends PShape {
|
|
3088
2119
|
markForTessellation();
|
3089
2120
|
}
|
3090
2121
|
|
3091
|
-
|
3092
|
-
|
3093
|
-
* @param index
|
3094
|
-
* @return
|
3095
|
-
*/
|
3096
|
-
@Override
|
2122
|
+
|
2123
|
+
@Override
|
3097
2124
|
public float getStrokeWeight(int index) {
|
3098
2125
|
if (family != GROUP) {
|
3099
2126
|
return inGeo.strokeWeights[index];
|
@@ -3102,11 +2129,8 @@ public class PShapeOpenGL extends PShape {
|
|
3102
2129
|
}
|
3103
2130
|
}
|
3104
2131
|
|
3105
|
-
|
3106
|
-
|
3107
|
-
* @param weight
|
3108
|
-
*/
|
3109
|
-
@Override
|
2132
|
+
|
2133
|
+
@Override
|
3110
2134
|
public void setStrokeWeight(float weight) {
|
3111
2135
|
if (openShape) {
|
3112
2136
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setStrokeWeight()");
|
@@ -3123,11 +2147,8 @@ public class PShapeOpenGL extends PShape {
|
|
3123
2147
|
}
|
3124
2148
|
}
|
3125
2149
|
|
3126
|
-
|
3127
|
-
|
3128
|
-
* @param weight
|
3129
|
-
*/
|
3130
|
-
protected void setStrokeWeightImpl(float weight) {
|
2150
|
+
|
2151
|
+
protected void setStrokeWeightImpl(float weight) {
|
3131
2152
|
if (PGraphicsOpenGL.same(strokeWeight, weight)) return;
|
3132
2153
|
float oldWeight = strokeWeight;
|
3133
2154
|
strokeWeight = weight;
|
@@ -3165,12 +2186,8 @@ public class PShapeOpenGL extends PShape {
|
|
3165
2186
|
}
|
3166
2187
|
}
|
3167
2188
|
|
3168
|
-
|
3169
|
-
|
3170
|
-
* @param index
|
3171
|
-
* @param weight
|
3172
|
-
*/
|
3173
|
-
@Override
|
2189
|
+
|
2190
|
+
@Override
|
3174
2191
|
public void setStrokeWeight(int index, float weight) {
|
3175
2192
|
if (openShape) {
|
3176
2193
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setStrokeWeight()");
|
@@ -3181,11 +2198,8 @@ public class PShapeOpenGL extends PShape {
|
|
3181
2198
|
markForTessellation();
|
3182
2199
|
}
|
3183
2200
|
|
3184
|
-
|
3185
|
-
|
3186
|
-
* @param join
|
3187
|
-
*/
|
3188
|
-
@Override
|
2201
|
+
|
2202
|
+
@Override
|
3189
2203
|
public void setStrokeJoin(int join) {
|
3190
2204
|
if (openShape) {
|
3191
2205
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setStrokeJoin()");
|
@@ -3208,11 +2222,8 @@ public class PShapeOpenGL extends PShape {
|
|
3208
2222
|
}
|
3209
2223
|
}
|
3210
2224
|
|
3211
|
-
|
3212
|
-
|
3213
|
-
* @param cap
|
3214
|
-
*/
|
3215
|
-
@Override
|
2225
|
+
|
2226
|
+
@Override
|
3216
2227
|
public void setStrokeCap(int cap) {
|
3217
2228
|
if (openShape) {
|
3218
2229
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setStrokeCap()");
|
@@ -3235,12 +2246,8 @@ public class PShapeOpenGL extends PShape {
|
|
3235
2246
|
}
|
3236
2247
|
}
|
3237
2248
|
|
3238
|
-
|
3239
|
-
|
3240
|
-
* @param index
|
3241
|
-
* @return
|
3242
|
-
*/
|
3243
|
-
@Override
|
2249
|
+
|
2250
|
+
@Override
|
3244
2251
|
public int getAmbient(int index) {
|
3245
2252
|
if (family != GROUP) {
|
3246
2253
|
return PGL.nativeToJavaARGB(inGeo.ambient[index]);
|
@@ -3249,11 +2256,8 @@ public class PShapeOpenGL extends PShape {
|
|
3249
2256
|
}
|
3250
2257
|
}
|
3251
2258
|
|
3252
|
-
|
3253
|
-
|
3254
|
-
* @param ambient
|
3255
|
-
*/
|
3256
|
-
@Override
|
2259
|
+
|
2260
|
+
@Override
|
3257
2261
|
public void setAmbient(int ambient) {
|
3258
2262
|
if (openShape) {
|
3259
2263
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setAmbient()");
|
@@ -3270,11 +2274,8 @@ public class PShapeOpenGL extends PShape {
|
|
3270
2274
|
}
|
3271
2275
|
}
|
3272
2276
|
|
3273
|
-
|
3274
|
-
|
3275
|
-
* @param ambient
|
3276
|
-
*/
|
3277
|
-
protected void setAmbientImpl(int ambient) {
|
2277
|
+
|
2278
|
+
protected void setAmbientImpl(int ambient) {
|
3278
2279
|
if (ambientColor == ambient) return;
|
3279
2280
|
ambientColor = ambient;
|
3280
2281
|
|
@@ -3297,12 +2298,8 @@ public class PShapeOpenGL extends PShape {
|
|
3297
2298
|
setAmbient = true;
|
3298
2299
|
}
|
3299
2300
|
|
3300
|
-
|
3301
|
-
|
3302
|
-
* @param index
|
3303
|
-
* @param ambient
|
3304
|
-
*/
|
3305
|
-
@Override
|
2301
|
+
|
2302
|
+
@Override
|
3306
2303
|
public void setAmbient(int index, int ambient) {
|
3307
2304
|
if (openShape) {
|
3308
2305
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setAmbient()");
|
@@ -3314,12 +2311,8 @@ public class PShapeOpenGL extends PShape {
|
|
3314
2311
|
setAmbient = true;
|
3315
2312
|
}
|
3316
2313
|
|
3317
|
-
|
3318
|
-
|
3319
|
-
* @param index
|
3320
|
-
* @return
|
3321
|
-
*/
|
3322
|
-
@Override
|
2314
|
+
|
2315
|
+
@Override
|
3323
2316
|
public int getSpecular(int index) {
|
3324
2317
|
if (family == GROUP) {
|
3325
2318
|
return PGL.nativeToJavaARGB(inGeo.specular[index]);
|
@@ -3328,11 +2321,8 @@ public class PShapeOpenGL extends PShape {
|
|
3328
2321
|
}
|
3329
2322
|
}
|
3330
2323
|
|
3331
|
-
|
3332
|
-
|
3333
|
-
* @param specular
|
3334
|
-
*/
|
3335
|
-
@Override
|
2324
|
+
|
2325
|
+
@Override
|
3336
2326
|
public void setSpecular(int specular) {
|
3337
2327
|
if (openShape) {
|
3338
2328
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setSpecular()");
|
@@ -3349,11 +2339,8 @@ public class PShapeOpenGL extends PShape {
|
|
3349
2339
|
}
|
3350
2340
|
}
|
3351
2341
|
|
3352
|
-
|
3353
|
-
|
3354
|
-
* @param specular
|
3355
|
-
*/
|
3356
|
-
protected void setSpecularImpl(int specular) {
|
2342
|
+
|
2343
|
+
protected void setSpecularImpl(int specular) {
|
3357
2344
|
if (specularColor == specular) return;
|
3358
2345
|
specularColor = specular;
|
3359
2346
|
|
@@ -3375,12 +2362,8 @@ public class PShapeOpenGL extends PShape {
|
|
3375
2362
|
}
|
3376
2363
|
}
|
3377
2364
|
|
3378
|
-
|
3379
|
-
|
3380
|
-
* @param index
|
3381
|
-
* @param specular
|
3382
|
-
*/
|
3383
|
-
@Override
|
2365
|
+
|
2366
|
+
@Override
|
3384
2367
|
public void setSpecular(int index, int specular) {
|
3385
2368
|
if (openShape) {
|
3386
2369
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setSpecular()");
|
@@ -3391,12 +2374,8 @@ public class PShapeOpenGL extends PShape {
|
|
3391
2374
|
markForTessellation();
|
3392
2375
|
}
|
3393
2376
|
|
3394
|
-
|
3395
|
-
|
3396
|
-
* @param index
|
3397
|
-
* @return
|
3398
|
-
*/
|
3399
|
-
@Override
|
2377
|
+
|
2378
|
+
@Override
|
3400
2379
|
public int getEmissive(int index) {
|
3401
2380
|
if (family == GROUP) {
|
3402
2381
|
return PGL.nativeToJavaARGB(inGeo.emissive[index]);
|
@@ -3405,11 +2384,8 @@ public class PShapeOpenGL extends PShape {
|
|
3405
2384
|
}
|
3406
2385
|
}
|
3407
2386
|
|
3408
|
-
|
3409
|
-
|
3410
|
-
* @param emissive
|
3411
|
-
*/
|
3412
|
-
@Override
|
2387
|
+
|
2388
|
+
@Override
|
3413
2389
|
public void setEmissive(int emissive) {
|
3414
2390
|
if (openShape) {
|
3415
2391
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setEmissive()");
|
@@ -3426,11 +2402,8 @@ public class PShapeOpenGL extends PShape {
|
|
3426
2402
|
}
|
3427
2403
|
}
|
3428
2404
|
|
3429
|
-
|
3430
|
-
|
3431
|
-
* @param emissive
|
3432
|
-
*/
|
3433
|
-
protected void setEmissiveImpl(int emissive) {
|
2405
|
+
|
2406
|
+
protected void setEmissiveImpl(int emissive) {
|
3434
2407
|
if (emissiveColor == emissive) return;
|
3435
2408
|
emissiveColor = emissive;
|
3436
2409
|
|
@@ -3452,12 +2425,8 @@ public class PShapeOpenGL extends PShape {
|
|
3452
2425
|
}
|
3453
2426
|
}
|
3454
2427
|
|
3455
|
-
|
3456
|
-
|
3457
|
-
* @param index
|
3458
|
-
* @param emissive
|
3459
|
-
*/
|
3460
|
-
@Override
|
2428
|
+
|
2429
|
+
@Override
|
3461
2430
|
public void setEmissive(int index, int emissive) {
|
3462
2431
|
if (openShape) {
|
3463
2432
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setEmissive()");
|
@@ -3468,12 +2437,8 @@ public class PShapeOpenGL extends PShape {
|
|
3468
2437
|
markForTessellation();
|
3469
2438
|
}
|
3470
2439
|
|
3471
|
-
|
3472
|
-
|
3473
|
-
* @param index
|
3474
|
-
* @return
|
3475
|
-
*/
|
3476
|
-
@Override
|
2440
|
+
|
2441
|
+
@Override
|
3477
2442
|
public float getShininess(int index) {
|
3478
2443
|
if (family == GROUP) {
|
3479
2444
|
return inGeo.shininess[index];
|
@@ -3482,11 +2447,8 @@ public class PShapeOpenGL extends PShape {
|
|
3482
2447
|
}
|
3483
2448
|
}
|
3484
2449
|
|
3485
|
-
|
3486
|
-
|
3487
|
-
* @param shininess
|
3488
|
-
*/
|
3489
|
-
@Override
|
2450
|
+
|
2451
|
+
@Override
|
3490
2452
|
public void setShininess(float shininess) {
|
3491
2453
|
if (openShape) {
|
3492
2454
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setShininess()");
|
@@ -3503,11 +2465,8 @@ public class PShapeOpenGL extends PShape {
|
|
3503
2465
|
}
|
3504
2466
|
}
|
3505
2467
|
|
3506
|
-
|
3507
|
-
|
3508
|
-
* @param shininess
|
3509
|
-
*/
|
3510
|
-
protected void setShininessImpl(float shininess) {
|
2468
|
+
|
2469
|
+
protected void setShininessImpl(float shininess) {
|
3511
2470
|
if (PGraphicsOpenGL.same(this.shininess, shininess)) return;
|
3512
2471
|
this.shininess = shininess;
|
3513
2472
|
|
@@ -3527,12 +2486,8 @@ public class PShapeOpenGL extends PShape {
|
|
3527
2486
|
}
|
3528
2487
|
}
|
3529
2488
|
|
3530
|
-
|
3531
|
-
|
3532
|
-
* @param index
|
3533
|
-
* @param shine
|
3534
|
-
*/
|
3535
|
-
@Override
|
2489
|
+
|
2490
|
+
@Override
|
3536
2491
|
public void setShininess(int index, float shine) {
|
3537
2492
|
if (openShape) {
|
3538
2493
|
PGraphics.showWarning(INSIDE_BEGIN_END_ERROR, "setShininess()");
|
@@ -3549,11 +2504,8 @@ public class PShapeOpenGL extends PShape {
|
|
3549
2504
|
|
3550
2505
|
// Vertex codes
|
3551
2506
|
|
3552
|
-
|
3553
|
-
|
3554
|
-
* @return
|
3555
|
-
*/
|
3556
|
-
@Override
|
2507
|
+
|
2508
|
+
@Override
|
3557
2509
|
public int[] getVertexCodes() {
|
3558
2510
|
if (family == GROUP) return null;
|
3559
2511
|
else {
|
@@ -3567,11 +2519,8 @@ public class PShapeOpenGL extends PShape {
|
|
3567
2519
|
}
|
3568
2520
|
}
|
3569
2521
|
|
3570
|
-
|
3571
|
-
|
3572
|
-
* @return
|
3573
|
-
*/
|
3574
|
-
@Override
|
2522
|
+
|
2523
|
+
@Override
|
3575
2524
|
public int getVertexCodeCount() {
|
3576
2525
|
if (family == GROUP) return 0;
|
3577
2526
|
else {
|
@@ -3587,8 +2536,6 @@ public class PShapeOpenGL extends PShape {
|
|
3587
2536
|
|
3588
2537
|
/**
|
3589
2538
|
* One of VERTEX, BEZIER_VERTEX, CURVE_VERTEX, or BREAK.
|
3590
|
-
* @param index
|
3591
|
-
* @return
|
3592
2539
|
*/
|
3593
2540
|
@Override
|
3594
2541
|
public int getVertexCode(int index) {
|
@@ -3602,11 +2549,6 @@ public class PShapeOpenGL extends PShape {
|
|
3602
2549
|
|
3603
2550
|
// Tessellated geometry getter.
|
3604
2551
|
|
3605
|
-
/**
|
3606
|
-
*
|
3607
|
-
* @return
|
3608
|
-
*/
|
3609
|
-
|
3610
2552
|
|
3611
2553
|
@Override
|
3612
2554
|
public PShape getTessellation() {
|
@@ -3707,13 +2649,6 @@ public class PShapeOpenGL extends PShape {
|
|
3707
2649
|
}
|
3708
2650
|
|
3709
2651
|
// Testing this method, not use as it might go away...
|
3710
|
-
|
3711
|
-
/**
|
3712
|
-
*
|
3713
|
-
* @param kind
|
3714
|
-
* @param data
|
3715
|
-
* @return
|
3716
|
-
*/
|
3717
2652
|
public float[] getTessellation(int kind, int data) {
|
3718
2653
|
updateTessellation();
|
3719
2654
|
|
@@ -3815,10 +2750,6 @@ public class PShapeOpenGL extends PShape {
|
|
3815
2750
|
|
3816
2751
|
// Tessellation
|
3817
2752
|
|
3818
|
-
/**
|
3819
|
-
*
|
3820
|
-
*/
|
3821
|
-
|
3822
2753
|
|
3823
2754
|
protected void updateTessellation() {
|
3824
2755
|
if (!root.tessellated) {
|
@@ -3829,18 +2760,14 @@ public class PShapeOpenGL extends PShape {
|
|
3829
2760
|
}
|
3830
2761
|
}
|
3831
2762
|
|
3832
|
-
|
3833
|
-
|
3834
|
-
*/
|
3835
|
-
protected void markForTessellation() {
|
2763
|
+
|
2764
|
+
protected void markForTessellation() {
|
3836
2765
|
root.tessellated = false;
|
3837
2766
|
tessellated = false;
|
3838
2767
|
}
|
3839
2768
|
|
3840
|
-
|
3841
|
-
|
3842
|
-
*/
|
3843
|
-
protected void initModified() {
|
2769
|
+
|
2770
|
+
protected void initModified() {
|
3844
2771
|
modified = false;
|
3845
2772
|
|
3846
2773
|
modifiedPolyVertices = false;
|
@@ -3892,10 +2819,8 @@ public class PShapeOpenGL extends PShape {
|
|
3892
2819
|
lastModifiedPointAttribute = PConstants.MIN_INT;
|
3893
2820
|
}
|
3894
2821
|
|
3895
|
-
|
3896
|
-
|
3897
|
-
*/
|
3898
|
-
protected void tessellate() {
|
2822
|
+
|
2823
|
+
protected void tessellate() {
|
3899
2824
|
if (root == this && parent == null) { // Root shape
|
3900
2825
|
if (polyAttribs == null) {
|
3901
2826
|
polyAttribs = PGraphicsOpenGL.newAttributeMap();
|
@@ -3920,10 +2845,8 @@ public class PShapeOpenGL extends PShape {
|
|
3920
2845
|
}
|
3921
2846
|
}
|
3922
2847
|
|
3923
|
-
|
3924
|
-
|
3925
|
-
*/
|
3926
|
-
protected void collectPolyAttribs() {
|
2848
|
+
|
2849
|
+
protected void collectPolyAttribs() {
|
3927
2850
|
AttributeMap rootAttribs = root.polyAttribs;
|
3928
2851
|
|
3929
2852
|
if (family == GROUP) {
|
@@ -3947,10 +2870,7 @@ public class PShapeOpenGL extends PShape {
|
|
3947
2870
|
}
|
3948
2871
|
}
|
3949
2872
|
|
3950
|
-
|
3951
|
-
*
|
3952
|
-
*/
|
3953
|
-
protected void tessellateImpl() {
|
2873
|
+
protected void tessellateImpl() {
|
3954
2874
|
tessGeo = root.tessGeo;
|
3955
2875
|
|
3956
2876
|
firstPolyIndexCache = -1;
|
@@ -4084,10 +3004,8 @@ public class PShapeOpenGL extends PShape {
|
|
4084
3004
|
tessellated = true;
|
4085
3005
|
}
|
4086
3006
|
|
4087
|
-
|
4088
|
-
|
4089
|
-
*/
|
4090
|
-
protected void tessellatePoint() {
|
3007
|
+
|
3008
|
+
protected void tessellatePoint() {
|
4091
3009
|
float x = 0, y = 0, z = 0;
|
4092
3010
|
if (params.length == 2) {
|
4093
3011
|
x = params[0];
|
@@ -4106,10 +3024,8 @@ public class PShapeOpenGL extends PShape {
|
|
4106
3024
|
tessellator.tessellatePoints();
|
4107
3025
|
}
|
4108
3026
|
|
4109
|
-
|
4110
|
-
|
4111
|
-
*/
|
4112
|
-
protected void tessellateLine() {
|
3027
|
+
|
3028
|
+
protected void tessellateLine() {
|
4113
3029
|
float x1 = 0, y1 = 0, z1 = 0;
|
4114
3030
|
float x2 = 0, y2 = 0, z2 = 0;
|
4115
3031
|
if (params.length == 4) {
|
@@ -4135,10 +3051,8 @@ public class PShapeOpenGL extends PShape {
|
|
4135
3051
|
tessellator.tessellateLines();
|
4136
3052
|
}
|
4137
3053
|
|
4138
|
-
|
4139
|
-
|
4140
|
-
*/
|
4141
|
-
protected void tessellateTriangle() {
|
3054
|
+
|
3055
|
+
protected void tessellateTriangle() {
|
4142
3056
|
float x1 = 0, y1 = 0;
|
4143
3057
|
float x2 = 0, y2 = 0;
|
4144
3058
|
float x3 = 0, y3 = 0;
|
@@ -4161,10 +3075,8 @@ public class PShapeOpenGL extends PShape {
|
|
4161
3075
|
tessellator.tessellateTriangles();
|
4162
3076
|
}
|
4163
3077
|
|
4164
|
-
|
4165
|
-
|
4166
|
-
*/
|
4167
|
-
protected void tessellateQuad() {
|
3078
|
+
|
3079
|
+
protected void tessellateQuad() {
|
4168
3080
|
float x1 = 0, y1 = 0;
|
4169
3081
|
float x2 = 0, y2 = 0;
|
4170
3082
|
float x3 = 0, y3 = 0;
|
@@ -4191,10 +3103,8 @@ public class PShapeOpenGL extends PShape {
|
|
4191
3103
|
tessellator.tessellateQuads();
|
4192
3104
|
}
|
4193
3105
|
|
4194
|
-
|
4195
|
-
|
4196
|
-
*/
|
4197
|
-
protected void tessellateRect() {
|
3106
|
+
|
3107
|
+
protected void tessellateRect() {
|
4198
3108
|
float a = 0, b = 0, c = 0, d = 0;
|
4199
3109
|
float tl = 0, tr = 0, br = 0, bl = 0;
|
4200
3110
|
boolean rounded = false;
|
@@ -4277,10 +3187,8 @@ public class PShapeOpenGL extends PShape {
|
|
4277
3187
|
}
|
4278
3188
|
}
|
4279
3189
|
|
4280
|
-
|
4281
|
-
|
4282
|
-
*/
|
4283
|
-
protected void tessellateEllipse() {
|
3190
|
+
|
3191
|
+
protected void tessellateEllipse() {
|
4284
3192
|
float a = 0, b = 0, c = 0, d = 0;
|
4285
3193
|
int mode = ellipseMode;
|
4286
3194
|
|
@@ -4328,10 +3236,8 @@ public class PShapeOpenGL extends PShape {
|
|
4328
3236
|
tessellator.tessellateTriangleFan();
|
4329
3237
|
}
|
4330
3238
|
|
4331
|
-
|
4332
|
-
|
4333
|
-
*/
|
4334
|
-
protected void tessellateArc() {
|
3239
|
+
|
3240
|
+
protected void tessellateArc() {
|
4335
3241
|
float a = 0, b = 0, c = 0, d = 0;
|
4336
3242
|
float start = 0, stop = 0;
|
4337
3243
|
int mode = ellipseMode;
|
@@ -4392,10 +3298,8 @@ public class PShapeOpenGL extends PShape {
|
|
4392
3298
|
}
|
4393
3299
|
}
|
4394
3300
|
|
4395
|
-
|
4396
|
-
|
4397
|
-
*/
|
4398
|
-
protected void tessellateBox() {
|
3301
|
+
|
3302
|
+
protected void tessellateBox() {
|
4399
3303
|
float w = 0, h = 0, d = 0;
|
4400
3304
|
if (params.length == 1) {
|
4401
3305
|
w = h = d = params[0];
|
@@ -4411,10 +3315,8 @@ public class PShapeOpenGL extends PShape {
|
|
4411
3315
|
tessellator.tessellateQuads();
|
4412
3316
|
}
|
4413
3317
|
|
4414
|
-
|
4415
|
-
|
4416
|
-
*/
|
4417
|
-
protected void tessellateSphere() {
|
3318
|
+
|
3319
|
+
protected void tessellateSphere() {
|
4418
3320
|
float r = 0;
|
4419
3321
|
int nu = sphereDetailU;
|
4420
3322
|
int nv = sphereDetailV;
|
@@ -4448,10 +3350,8 @@ public class PShapeOpenGL extends PShape {
|
|
4448
3350
|
}
|
4449
3351
|
}
|
4450
3352
|
|
4451
|
-
|
4452
|
-
|
4453
|
-
*/
|
4454
|
-
protected void tessellatePath() {
|
3353
|
+
|
3354
|
+
protected void tessellatePath() {
|
4455
3355
|
if (vertices == null) return;
|
4456
3356
|
|
4457
3357
|
inGeo.setMaterial(fillColor, strokeColor, strokeWeight,
|
@@ -4577,29 +3477,20 @@ public class PShapeOpenGL extends PShape {
|
|
4577
3477
|
if (curv) restoreCurveVertexSettings();
|
4578
3478
|
}
|
4579
3479
|
|
4580
|
-
|
4581
|
-
*
|
4582
|
-
*/
|
4583
|
-
protected void saveBezierVertexSettings() {
|
3480
|
+
protected void saveBezierVertexSettings() {
|
4584
3481
|
savedBezierDetail = pg.bezierDetail;
|
4585
3482
|
if (pg.bezierDetail != bezierDetail) {
|
4586
3483
|
pg.bezierDetail(bezierDetail);
|
4587
3484
|
}
|
4588
3485
|
}
|
4589
3486
|
|
4590
|
-
|
4591
|
-
*
|
4592
|
-
*/
|
4593
|
-
protected void restoreBezierVertexSettings() {
|
3487
|
+
protected void restoreBezierVertexSettings() {
|
4594
3488
|
if (savedBezierDetail != bezierDetail) {
|
4595
3489
|
pg.bezierDetail(savedBezierDetail);
|
4596
3490
|
}
|
4597
3491
|
}
|
4598
3492
|
|
4599
|
-
|
4600
|
-
*
|
4601
|
-
*/
|
4602
|
-
protected void saveCurveVertexSettings() {
|
3493
|
+
protected void saveCurveVertexSettings() {
|
4603
3494
|
savedCurveDetail = pg.curveDetail;
|
4604
3495
|
savedCurveTightness = pg.curveTightness;
|
4605
3496
|
if (pg.curveDetail != curveDetail) {
|
@@ -4610,10 +3501,7 @@ public class PShapeOpenGL extends PShape {
|
|
4610
3501
|
}
|
4611
3502
|
}
|
4612
3503
|
|
4613
|
-
|
4614
|
-
*
|
4615
|
-
*/
|
4616
|
-
protected void restoreCurveVertexSettings() {
|
3504
|
+
protected void restoreCurveVertexSettings() {
|
4617
3505
|
if (savedCurveDetail != curveDetail) {
|
4618
3506
|
pg.curveDetail(savedCurveDetail);
|
4619
3507
|
}
|
@@ -4628,10 +3516,8 @@ public class PShapeOpenGL extends PShape {
|
|
4628
3516
|
|
4629
3517
|
// Aggregation
|
4630
3518
|
|
4631
|
-
|
4632
|
-
|
4633
|
-
*/
|
4634
|
-
protected void aggregate() {
|
3519
|
+
|
3520
|
+
protected void aggregate() {
|
4635
3521
|
if (root == this && parent == null) {
|
4636
3522
|
// Initializing auxiliary variables in root node
|
4637
3523
|
// needed for aggregation.
|
@@ -4683,10 +3569,6 @@ public class PShapeOpenGL extends PShape {
|
|
4683
3569
|
// vertices (4 + 5 + 6 + 3 = 18) being rendered, while calling
|
4684
3570
|
// draw() from either child groups 0 or 1 should result in the first
|
4685
3571
|
// 4 vertices or the last 14 vertices being rendered, respectively.
|
4686
|
-
|
4687
|
-
/**
|
4688
|
-
*
|
4689
|
-
*/
|
4690
3572
|
protected void aggregateImpl() {
|
4691
3573
|
if (family == GROUP) {
|
4692
3574
|
// Recursively aggregating the child shapes.
|
@@ -4736,10 +3618,6 @@ public class PShapeOpenGL extends PShape {
|
|
4736
3618
|
|
4737
3619
|
|
4738
3620
|
// Updates the index cache for the range that corresponds to this shape.
|
4739
|
-
|
4740
|
-
/**
|
4741
|
-
*
|
4742
|
-
*/
|
4743
3621
|
protected void updatePolyIndexCache() {
|
4744
3622
|
IndexCache cache = tessGeo.polyIndexCache;
|
4745
3623
|
if (family == GROUP) {
|
@@ -4840,22 +3718,14 @@ public class PShapeOpenGL extends PShape {
|
|
4840
3718
|
}
|
4841
3719
|
}
|
4842
3720
|
|
4843
|
-
|
4844
|
-
|
4845
|
-
* @param n
|
4846
|
-
* @return
|
4847
|
-
*/
|
4848
|
-
protected boolean startStrokedTex(int n) {
|
3721
|
+
|
3722
|
+
protected boolean startStrokedTex(int n) {
|
4849
3723
|
return image != null && (n == firstLineIndexCache ||
|
4850
3724
|
n == firstPointIndexCache);
|
4851
3725
|
}
|
4852
3726
|
|
4853
|
-
|
4854
|
-
|
4855
|
-
* @param n
|
4856
|
-
* @param vert
|
4857
|
-
*/
|
4858
|
-
protected void setFirstStrokeVertex(int n, int vert) {
|
3727
|
+
|
3728
|
+
protected void setFirstStrokeVertex(int n, int vert) {
|
4859
3729
|
if (n == firstLineIndexCache && firstLineVertex == -1) {
|
4860
3730
|
firstLineVertex = lastLineVertex = vert;
|
4861
3731
|
}
|
@@ -4864,11 +3734,7 @@ public class PShapeOpenGL extends PShape {
|
|
4864
3734
|
}
|
4865
3735
|
}
|
4866
3736
|
|
4867
|
-
|
4868
|
-
*
|
4869
|
-
* @param vert
|
4870
|
-
*/
|
4871
|
-
protected void setLastStrokeVertex(int vert) {
|
3737
|
+
protected void setLastStrokeVertex(int vert) {
|
4872
3738
|
if (-1 < lastLineVertex) {
|
4873
3739
|
lastLineVertex = vert;
|
4874
3740
|
}
|
@@ -4877,10 +3743,7 @@ public class PShapeOpenGL extends PShape {
|
|
4877
3743
|
}
|
4878
3744
|
}
|
4879
3745
|
|
4880
|
-
|
4881
|
-
*
|
4882
|
-
*/
|
4883
|
-
protected void updateLineIndexCache() {
|
3746
|
+
protected void updateLineIndexCache() {
|
4884
3747
|
IndexCache cache = tessGeo.lineIndexCache;
|
4885
3748
|
if (family == GROUP) {
|
4886
3749
|
firstLineIndexCache = lastLineIndexCache = -1;
|
@@ -4942,10 +3805,8 @@ public class PShapeOpenGL extends PShape {
|
|
4942
3805
|
}
|
4943
3806
|
}
|
4944
3807
|
|
4945
|
-
|
4946
|
-
|
4947
|
-
*/
|
4948
|
-
protected void updatePointIndexCache() {
|
3808
|
+
|
3809
|
+
protected void updatePointIndexCache() {
|
4949
3810
|
IndexCache cache = tessGeo.pointIndexCache;
|
4950
3811
|
if (family == GROUP) {
|
4951
3812
|
firstPointIndexCache = lastPointIndexCache = -1;
|
@@ -5020,10 +3881,6 @@ public class PShapeOpenGL extends PShape {
|
|
5020
3881
|
|
5021
3882
|
// Buffer initialization
|
5022
3883
|
|
5023
|
-
/**
|
5024
|
-
*
|
5025
|
-
*/
|
5026
|
-
|
5027
3884
|
|
5028
3885
|
protected void initBuffers() {
|
5029
3886
|
boolean outdated = contextIsOutdated();
|
@@ -5044,10 +3901,8 @@ public class PShapeOpenGL extends PShape {
|
|
5044
3901
|
needBufferInit = false;
|
5045
3902
|
}
|
5046
3903
|
|
5047
|
-
|
5048
|
-
|
5049
|
-
*/
|
5050
|
-
protected void initPolyBuffers() {
|
3904
|
+
|
3905
|
+
protected void initPolyBuffers() {
|
5051
3906
|
int size = tessGeo.polyVertexCount;
|
5052
3907
|
int sizef = size * PGL.SIZEOF_FLOAT;
|
5053
3908
|
int sizei = size * PGL.SIZEOF_INT;
|
@@ -5130,10 +3985,8 @@ public class PShapeOpenGL extends PShape {
|
|
5130
3985
|
pgl.bindBuffer(PGL.ELEMENT_ARRAY_BUFFER, 0);
|
5131
3986
|
}
|
5132
3987
|
|
5133
|
-
|
5134
|
-
|
5135
|
-
*/
|
5136
|
-
protected void initLineBuffers() {
|
3988
|
+
|
3989
|
+
protected void initLineBuffers() {
|
5137
3990
|
int size = tessGeo.lineVertexCount;
|
5138
3991
|
int sizef = size * PGL.SIZEOF_FLOAT;
|
5139
3992
|
int sizei = size * PGL.SIZEOF_INT;
|
@@ -5172,10 +4025,8 @@ public class PShapeOpenGL extends PShape {
|
|
5172
4025
|
pgl.bindBuffer(PGL.ELEMENT_ARRAY_BUFFER, 0);
|
5173
4026
|
}
|
5174
4027
|
|
5175
|
-
|
5176
|
-
|
5177
|
-
*/
|
5178
|
-
protected void initPointBuffers() {
|
4028
|
+
|
4029
|
+
protected void initPointBuffers() {
|
5179
4030
|
int size = tessGeo.pointVertexCount;
|
5180
4031
|
int sizef = size * PGL.SIZEOF_FLOAT;
|
5181
4032
|
int sizei = size * PGL.SIZEOF_INT;
|
@@ -5214,11 +4065,8 @@ public class PShapeOpenGL extends PShape {
|
|
5214
4065
|
pgl.bindBuffer(PGL.ELEMENT_ARRAY_BUFFER, 0);
|
5215
4066
|
}
|
5216
4067
|
|
5217
|
-
|
5218
|
-
|
5219
|
-
* @return
|
5220
|
-
*/
|
5221
|
-
protected boolean contextIsOutdated() {
|
4068
|
+
|
4069
|
+
protected boolean contextIsOutdated() {
|
5222
4070
|
boolean outdated = !pgl.contextIsCurrent(context);
|
5223
4071
|
if (outdated) {
|
5224
4072
|
bufPolyVertex.dispose();
|
@@ -5254,10 +4102,6 @@ public class PShapeOpenGL extends PShape {
|
|
5254
4102
|
|
5255
4103
|
// Geometry update
|
5256
4104
|
|
5257
|
-
/**
|
5258
|
-
*
|
5259
|
-
*/
|
5260
|
-
|
5261
4105
|
|
5262
4106
|
protected void updateGeometry() {
|
5263
4107
|
root.initBuffers();
|
@@ -5266,10 +4110,8 @@ public class PShapeOpenGL extends PShape {
|
|
5266
4110
|
}
|
5267
4111
|
}
|
5268
4112
|
|
5269
|
-
|
5270
|
-
|
5271
|
-
*/
|
5272
|
-
protected void updateGeometryImpl() {
|
4113
|
+
|
4114
|
+
protected void updateGeometryImpl() {
|
5273
4115
|
if (modifiedPolyVertices) {
|
5274
4116
|
int offset = firstModifiedPolyVertex;
|
5275
4117
|
int size = lastModifiedPolyVertex - offset + 1;
|
@@ -5399,12 +4241,8 @@ public class PShapeOpenGL extends PShape {
|
|
5399
4241
|
modified = false;
|
5400
4242
|
}
|
5401
4243
|
|
5402
|
-
|
5403
|
-
|
5404
|
-
* @param offset
|
5405
|
-
* @param size
|
5406
|
-
*/
|
5407
|
-
protected void copyPolyVertices(int offset, int size) {
|
4244
|
+
|
4245
|
+
protected void copyPolyVertices(int offset, int size) {
|
5408
4246
|
tessGeo.updatePolyVerticesBuffer(offset, size);
|
5409
4247
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyVertex.glId);
|
5410
4248
|
tessGeo.polyVerticesBuffer.position(4 * offset);
|
@@ -5414,12 +4252,8 @@ public class PShapeOpenGL extends PShape {
|
|
5414
4252
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5415
4253
|
}
|
5416
4254
|
|
5417
|
-
|
5418
|
-
|
5419
|
-
* @param offset
|
5420
|
-
* @param size
|
5421
|
-
*/
|
5422
|
-
protected void copyPolyColors(int offset, int size) {
|
4255
|
+
|
4256
|
+
protected void copyPolyColors(int offset, int size) {
|
5423
4257
|
tessGeo.updatePolyColorsBuffer(offset, size);
|
5424
4258
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyColor.glId);
|
5425
4259
|
tessGeo.polyColorsBuffer.position(offset);
|
@@ -5429,12 +4263,8 @@ public class PShapeOpenGL extends PShape {
|
|
5429
4263
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5430
4264
|
}
|
5431
4265
|
|
5432
|
-
|
5433
|
-
|
5434
|
-
* @param offset
|
5435
|
-
* @param size
|
5436
|
-
*/
|
5437
|
-
protected void copyPolyNormals(int offset, int size) {
|
4266
|
+
|
4267
|
+
protected void copyPolyNormals(int offset, int size) {
|
5438
4268
|
tessGeo.updatePolyNormalsBuffer(offset, size);
|
5439
4269
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyNormal.glId);
|
5440
4270
|
tessGeo.polyNormalsBuffer.position(3 * offset);
|
@@ -5444,12 +4274,8 @@ public class PShapeOpenGL extends PShape {
|
|
5444
4274
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5445
4275
|
}
|
5446
4276
|
|
5447
|
-
|
5448
|
-
|
5449
|
-
* @param offset
|
5450
|
-
* @param size
|
5451
|
-
*/
|
5452
|
-
protected void copyPolyTexCoords(int offset, int size) {
|
4277
|
+
|
4278
|
+
protected void copyPolyTexCoords(int offset, int size) {
|
5453
4279
|
tessGeo.updatePolyTexCoordsBuffer(offset, size);
|
5454
4280
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyTexcoord.glId);
|
5455
4281
|
tessGeo.polyTexCoordsBuffer.position(2 * offset);
|
@@ -5459,12 +4285,8 @@ public class PShapeOpenGL extends PShape {
|
|
5459
4285
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5460
4286
|
}
|
5461
4287
|
|
5462
|
-
|
5463
|
-
|
5464
|
-
* @param offset
|
5465
|
-
* @param size
|
5466
|
-
*/
|
5467
|
-
protected void copyPolyAmbient(int offset, int size) {
|
4288
|
+
|
4289
|
+
protected void copyPolyAmbient(int offset, int size) {
|
5468
4290
|
tessGeo.updatePolyAmbientBuffer(offset, size);
|
5469
4291
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyAmbient.glId);
|
5470
4292
|
tessGeo.polyAmbientBuffer.position(offset);
|
@@ -5474,12 +4296,8 @@ public class PShapeOpenGL extends PShape {
|
|
5474
4296
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5475
4297
|
}
|
5476
4298
|
|
5477
|
-
|
5478
|
-
|
5479
|
-
* @param offset
|
5480
|
-
* @param size
|
5481
|
-
*/
|
5482
|
-
protected void copyPolySpecular(int offset, int size) {
|
4299
|
+
|
4300
|
+
protected void copyPolySpecular(int offset, int size) {
|
5483
4301
|
tessGeo.updatePolySpecularBuffer(offset, size);
|
5484
4302
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolySpecular.glId);
|
5485
4303
|
tessGeo.polySpecularBuffer.position(offset);
|
@@ -5489,12 +4307,8 @@ public class PShapeOpenGL extends PShape {
|
|
5489
4307
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5490
4308
|
}
|
5491
4309
|
|
5492
|
-
|
5493
|
-
|
5494
|
-
* @param offset
|
5495
|
-
* @param size
|
5496
|
-
*/
|
5497
|
-
protected void copyPolyEmissive(int offset, int size) {
|
4310
|
+
|
4311
|
+
protected void copyPolyEmissive(int offset, int size) {
|
5498
4312
|
tessGeo.updatePolyEmissiveBuffer(offset, size);
|
5499
4313
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyEmissive.glId);
|
5500
4314
|
tessGeo.polyEmissiveBuffer.position(offset);
|
@@ -5504,12 +4318,8 @@ public class PShapeOpenGL extends PShape {
|
|
5504
4318
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5505
4319
|
}
|
5506
4320
|
|
5507
|
-
|
5508
|
-
|
5509
|
-
* @param offset
|
5510
|
-
* @param size
|
5511
|
-
*/
|
5512
|
-
protected void copyPolyShininess(int offset, int size) {
|
4321
|
+
|
4322
|
+
protected void copyPolyShininess(int offset, int size) {
|
5513
4323
|
tessGeo.updatePolyShininessBuffer(offset, size);
|
5514
4324
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyShininess.glId);
|
5515
4325
|
tessGeo.polyShininessBuffer.position(offset);
|
@@ -5519,13 +4329,8 @@ public class PShapeOpenGL extends PShape {
|
|
5519
4329
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5520
4330
|
}
|
5521
4331
|
|
5522
|
-
|
5523
|
-
|
5524
|
-
* @param attrib
|
5525
|
-
* @param offset
|
5526
|
-
* @param size
|
5527
|
-
*/
|
5528
|
-
protected void copyPolyAttrib(VertexAttribute attrib, int offset, int size) {
|
4332
|
+
|
4333
|
+
protected void copyPolyAttrib(VertexAttribute attrib, int offset, int size) {
|
5529
4334
|
tessGeo.updateAttribBuffer(attrib.name, offset, size);
|
5530
4335
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, attrib.buf.glId);
|
5531
4336
|
Buffer buf = tessGeo.polyAttribBuffers.get(attrib.name);
|
@@ -5536,12 +4341,8 @@ public class PShapeOpenGL extends PShape {
|
|
5536
4341
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5537
4342
|
}
|
5538
4343
|
|
5539
|
-
|
5540
|
-
|
5541
|
-
* @param offset
|
5542
|
-
* @param size
|
5543
|
-
*/
|
5544
|
-
protected void copyLineVertices(int offset, int size) {
|
4344
|
+
|
4345
|
+
protected void copyLineVertices(int offset, int size) {
|
5545
4346
|
tessGeo.updateLineVerticesBuffer(offset, size);
|
5546
4347
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufLineVertex.glId);
|
5547
4348
|
tessGeo.lineVerticesBuffer.position(4 * offset);
|
@@ -5551,12 +4352,8 @@ public class PShapeOpenGL extends PShape {
|
|
5551
4352
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5552
4353
|
}
|
5553
4354
|
|
5554
|
-
|
5555
|
-
|
5556
|
-
* @param offset
|
5557
|
-
* @param size
|
5558
|
-
*/
|
5559
|
-
protected void copyLineColors(int offset, int size) {
|
4355
|
+
|
4356
|
+
protected void copyLineColors(int offset, int size) {
|
5560
4357
|
tessGeo.updateLineColorsBuffer(offset, size);
|
5561
4358
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufLineColor.glId);
|
5562
4359
|
tessGeo.lineColorsBuffer.position(offset);
|
@@ -5566,12 +4363,8 @@ public class PShapeOpenGL extends PShape {
|
|
5566
4363
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5567
4364
|
}
|
5568
4365
|
|
5569
|
-
|
5570
|
-
|
5571
|
-
* @param offset
|
5572
|
-
* @param size
|
5573
|
-
*/
|
5574
|
-
protected void copyLineAttributes(int offset, int size) {
|
4366
|
+
|
4367
|
+
protected void copyLineAttributes(int offset, int size) {
|
5575
4368
|
tessGeo.updateLineDirectionsBuffer(offset, size);
|
5576
4369
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufLineAttrib.glId);
|
5577
4370
|
tessGeo.lineDirectionsBuffer.position(4 * offset);
|
@@ -5581,12 +4374,8 @@ public class PShapeOpenGL extends PShape {
|
|
5581
4374
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5582
4375
|
}
|
5583
4376
|
|
5584
|
-
|
5585
|
-
|
5586
|
-
* @param offset
|
5587
|
-
* @param size
|
5588
|
-
*/
|
5589
|
-
protected void copyPointVertices(int offset, int size) {
|
4377
|
+
|
4378
|
+
protected void copyPointVertices(int offset, int size) {
|
5590
4379
|
tessGeo.updatePointVerticesBuffer(offset, size);
|
5591
4380
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPointVertex.glId);
|
5592
4381
|
tessGeo.pointVerticesBuffer.position(4 * offset);
|
@@ -5596,12 +4385,8 @@ public class PShapeOpenGL extends PShape {
|
|
5596
4385
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5597
4386
|
}
|
5598
4387
|
|
5599
|
-
|
5600
|
-
|
5601
|
-
* @param offset
|
5602
|
-
* @param size
|
5603
|
-
*/
|
5604
|
-
protected void copyPointColors(int offset, int size) {
|
4388
|
+
|
4389
|
+
protected void copyPointColors(int offset, int size) {
|
5605
4390
|
tessGeo.updatePointColorsBuffer(offset, size);
|
5606
4391
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPointColor.glId);
|
5607
4392
|
tessGeo.pointColorsBuffer.position(offset);
|
@@ -5611,12 +4396,8 @@ public class PShapeOpenGL extends PShape {
|
|
5611
4396
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5612
4397
|
}
|
5613
4398
|
|
5614
|
-
|
5615
|
-
|
5616
|
-
* @param offset
|
5617
|
-
* @param size
|
5618
|
-
*/
|
5619
|
-
protected void copyPointAttributes(int offset, int size) {
|
4399
|
+
|
4400
|
+
protected void copyPointAttributes(int offset, int size) {
|
5620
4401
|
tessGeo.updatePointOffsetsBuffer(offset, size);
|
5621
4402
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPointAttrib.glId);
|
5622
4403
|
tessGeo.pointOffsetsBuffer.position(2 * offset);
|
@@ -5626,181 +4407,120 @@ public class PShapeOpenGL extends PShape {
|
|
5626
4407
|
pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);
|
5627
4408
|
}
|
5628
4409
|
|
5629
|
-
|
5630
|
-
|
5631
|
-
* @param first
|
5632
|
-
* @param last
|
5633
|
-
*/
|
5634
|
-
protected void setModifiedPolyVertices(int first, int last) {
|
4410
|
+
|
4411
|
+
protected void setModifiedPolyVertices(int first, int last) {
|
5635
4412
|
if (first < firstModifiedPolyVertex) firstModifiedPolyVertex = first;
|
5636
4413
|
if (last > lastModifiedPolyVertex) lastModifiedPolyVertex = last;
|
5637
4414
|
modifiedPolyVertices = true;
|
5638
4415
|
modified = true;
|
5639
4416
|
}
|
5640
4417
|
|
5641
|
-
|
5642
|
-
|
5643
|
-
* @param first
|
5644
|
-
* @param last
|
5645
|
-
*/
|
5646
|
-
protected void setModifiedPolyColors(int first, int last) {
|
4418
|
+
|
4419
|
+
protected void setModifiedPolyColors(int first, int last) {
|
5647
4420
|
if (first < firstModifiedPolyColor) firstModifiedPolyColor = first;
|
5648
4421
|
if (last > lastModifiedPolyColor) lastModifiedPolyColor = last;
|
5649
4422
|
modifiedPolyColors = true;
|
5650
4423
|
modified = true;
|
5651
4424
|
}
|
5652
4425
|
|
5653
|
-
|
5654
|
-
|
5655
|
-
* @param first
|
5656
|
-
* @param last
|
5657
|
-
*/
|
5658
|
-
protected void setModifiedPolyNormals(int first, int last) {
|
4426
|
+
|
4427
|
+
protected void setModifiedPolyNormals(int first, int last) {
|
5659
4428
|
if (first < firstModifiedPolyNormal) firstModifiedPolyNormal = first;
|
5660
4429
|
if (last > lastModifiedPolyNormal) lastModifiedPolyNormal = last;
|
5661
4430
|
modifiedPolyNormals = true;
|
5662
4431
|
modified = true;
|
5663
4432
|
}
|
5664
4433
|
|
5665
|
-
|
5666
|
-
|
5667
|
-
* @param first
|
5668
|
-
* @param last
|
5669
|
-
*/
|
5670
|
-
protected void setModifiedPolyTexCoords(int first, int last) {
|
4434
|
+
|
4435
|
+
protected void setModifiedPolyTexCoords(int first, int last) {
|
5671
4436
|
if (first < firstModifiedPolyTexcoord) firstModifiedPolyTexcoord = first;
|
5672
4437
|
if (last > lastModifiedPolyTexcoord) lastModifiedPolyTexcoord = last;
|
5673
4438
|
modifiedPolyTexCoords = true;
|
5674
4439
|
modified = true;
|
5675
4440
|
}
|
5676
4441
|
|
5677
|
-
|
5678
|
-
|
5679
|
-
* @param first
|
5680
|
-
* @param last
|
5681
|
-
*/
|
5682
|
-
protected void setModifiedPolyAmbient(int first, int last) {
|
4442
|
+
|
4443
|
+
protected void setModifiedPolyAmbient(int first, int last) {
|
5683
4444
|
if (first < firstModifiedPolyAmbient) firstModifiedPolyAmbient = first;
|
5684
4445
|
if (last > lastModifiedPolyAmbient) lastModifiedPolyAmbient = last;
|
5685
4446
|
modifiedPolyAmbient = true;
|
5686
4447
|
modified = true;
|
5687
4448
|
}
|
5688
4449
|
|
5689
|
-
|
5690
|
-
|
5691
|
-
* @param first
|
5692
|
-
* @param last
|
5693
|
-
*/
|
5694
|
-
protected void setModifiedPolySpecular(int first, int last) {
|
4450
|
+
|
4451
|
+
protected void setModifiedPolySpecular(int first, int last) {
|
5695
4452
|
if (first < firstModifiedPolySpecular) firstModifiedPolySpecular = first;
|
5696
4453
|
if (last > lastModifiedPolySpecular) lastModifiedPolySpecular = last;
|
5697
4454
|
modifiedPolySpecular = true;
|
5698
4455
|
modified = true;
|
5699
4456
|
}
|
5700
4457
|
|
5701
|
-
|
5702
|
-
|
5703
|
-
* @param first
|
5704
|
-
* @param last
|
5705
|
-
*/
|
5706
|
-
protected void setModifiedPolyEmissive(int first, int last) {
|
4458
|
+
|
4459
|
+
protected void setModifiedPolyEmissive(int first, int last) {
|
5707
4460
|
if (first < firstModifiedPolyEmissive) firstModifiedPolyEmissive = first;
|
5708
4461
|
if (last > lastModifiedPolyEmissive) lastModifiedPolyEmissive = last;
|
5709
4462
|
modifiedPolyEmissive = true;
|
5710
4463
|
modified = true;
|
5711
4464
|
}
|
5712
4465
|
|
5713
|
-
|
5714
|
-
|
5715
|
-
* @param first
|
5716
|
-
* @param last
|
5717
|
-
*/
|
5718
|
-
protected void setModifiedPolyShininess(int first, int last) {
|
4466
|
+
|
4467
|
+
protected void setModifiedPolyShininess(int first, int last) {
|
5719
4468
|
if (first < firstModifiedPolyShininess) firstModifiedPolyShininess = first;
|
5720
4469
|
if (last > lastModifiedPolyShininess) lastModifiedPolyShininess = last;
|
5721
4470
|
modifiedPolyShininess = true;
|
5722
4471
|
modified = true;
|
5723
4472
|
}
|
5724
4473
|
|
5725
|
-
|
5726
|
-
|
5727
|
-
* @param attrib
|
5728
|
-
* @param first
|
5729
|
-
* @param last
|
5730
|
-
*/
|
5731
|
-
protected void setModifiedPolyAttrib(VertexAttribute attrib, int first, int last) {
|
4474
|
+
|
4475
|
+
protected void setModifiedPolyAttrib(VertexAttribute attrib, int first, int last) {
|
5732
4476
|
if (first < attrib.firstModified) attrib.firstModified = first;
|
5733
4477
|
if (last > attrib.lastModified) attrib.lastModified = last;
|
5734
4478
|
attrib.modified = true;
|
5735
4479
|
modified = true;
|
5736
4480
|
}
|
5737
4481
|
|
5738
|
-
|
5739
|
-
|
5740
|
-
* @param first
|
5741
|
-
* @param last
|
5742
|
-
*/
|
5743
|
-
protected void setModifiedLineVertices(int first, int last) {
|
4482
|
+
|
4483
|
+
protected void setModifiedLineVertices(int first, int last) {
|
5744
4484
|
if (first < firstModifiedLineVertex) firstModifiedLineVertex = first;
|
5745
4485
|
if (last > lastModifiedLineVertex) lastModifiedLineVertex = last;
|
5746
4486
|
modifiedLineVertices = true;
|
5747
4487
|
modified = true;
|
5748
4488
|
}
|
5749
4489
|
|
5750
|
-
|
5751
|
-
|
5752
|
-
* @param first
|
5753
|
-
* @param last
|
5754
|
-
*/
|
5755
|
-
protected void setModifiedLineColors(int first, int last) {
|
4490
|
+
|
4491
|
+
protected void setModifiedLineColors(int first, int last) {
|
5756
4492
|
if (first < firstModifiedLineColor) firstModifiedLineColor = first;
|
5757
4493
|
if (last > lastModifiedLineColor) lastModifiedLineColor = last;
|
5758
4494
|
modifiedLineColors = true;
|
5759
4495
|
modified = true;
|
5760
4496
|
}
|
5761
4497
|
|
5762
|
-
|
5763
|
-
|
5764
|
-
* @param first
|
5765
|
-
* @param last
|
5766
|
-
*/
|
5767
|
-
protected void setModifiedLineAttributes(int first, int last) {
|
4498
|
+
|
4499
|
+
protected void setModifiedLineAttributes(int first, int last) {
|
5768
4500
|
if (first < firstModifiedLineAttribute) firstModifiedLineAttribute = first;
|
5769
4501
|
if (last > lastModifiedLineAttribute) lastModifiedLineAttribute = last;
|
5770
4502
|
modifiedLineAttributes = true;
|
5771
4503
|
modified = true;
|
5772
4504
|
}
|
5773
4505
|
|
5774
|
-
|
5775
|
-
|
5776
|
-
* @param first
|
5777
|
-
* @param last
|
5778
|
-
*/
|
5779
|
-
protected void setModifiedPointVertices(int first, int last) {
|
4506
|
+
|
4507
|
+
protected void setModifiedPointVertices(int first, int last) {
|
5780
4508
|
if (first < firstModifiedPointVertex) firstModifiedPointVertex = first;
|
5781
4509
|
if (last > lastModifiedPointVertex) lastModifiedPointVertex = last;
|
5782
4510
|
modifiedPointVertices = true;
|
5783
4511
|
modified = true;
|
5784
4512
|
}
|
5785
4513
|
|
5786
|
-
|
5787
|
-
|
5788
|
-
* @param first
|
5789
|
-
* @param last
|
5790
|
-
*/
|
5791
|
-
protected void setModifiedPointColors(int first, int last) {
|
4514
|
+
|
4515
|
+
protected void setModifiedPointColors(int first, int last) {
|
5792
4516
|
if (first < firstModifiedPointColor) firstModifiedPointColor = first;
|
5793
4517
|
if (last > lastModifiedPointColor) lastModifiedPointColor = last;
|
5794
4518
|
modifiedPointColors = true;
|
5795
4519
|
modified = true;
|
5796
4520
|
}
|
5797
4521
|
|
5798
|
-
|
5799
|
-
|
5800
|
-
* @param first
|
5801
|
-
* @param last
|
5802
|
-
*/
|
5803
|
-
protected void setModifiedPointAttributes(int first, int last) {
|
4522
|
+
|
4523
|
+
protected void setModifiedPointAttributes(int first, int last) {
|
5804
4524
|
if (first < firstModifiedPointAttribute) firstModifiedPointAttribute = first;
|
5805
4525
|
if (last > lastModifiedPointAttribute) lastModifiedPointAttribute = last;
|
5806
4526
|
modifiedPointAttributes = true;
|
@@ -5878,11 +4598,8 @@ public class PShapeOpenGL extends PShape {
|
|
5878
4598
|
super.enableStyle();
|
5879
4599
|
}
|
5880
4600
|
|
5881
|
-
|
5882
|
-
|
5883
|
-
* @param g
|
5884
|
-
*/
|
5885
|
-
@Override
|
4601
|
+
|
4602
|
+
@Override
|
5886
4603
|
protected void styles(PGraphics g) {
|
5887
4604
|
if (g instanceof PGraphicsOpenGL) {
|
5888
4605
|
if (g.stroke) {
|
@@ -6066,23 +4783,14 @@ public class PShapeOpenGL extends PShape {
|
|
6066
4783
|
// so they cannot rendered in a single call.
|
6067
4784
|
// Or accurate 2D mode is enabled, which forces each
|
6068
4785
|
// shape to be rendered separately.
|
6069
|
-
|
6070
|
-
/**
|
6071
|
-
*
|
6072
|
-
* @param g
|
6073
|
-
* @return
|
6074
|
-
*/
|
6075
4786
|
protected boolean fragmentedGroup(PGraphicsOpenGL g) {
|
6076
4787
|
return g.getHint(DISABLE_OPTIMIZED_STROKE) ||
|
6077
4788
|
(textures != null && (1 < textures.size() || untexChild)) ||
|
6078
4789
|
strokedTexture;
|
6079
4790
|
}
|
6080
4791
|
|
6081
|
-
|
6082
|
-
|
6083
|
-
* @param g
|
6084
|
-
*/
|
6085
|
-
@Override
|
4792
|
+
|
4793
|
+
@Override
|
6086
4794
|
protected void pre(PGraphics g) {
|
6087
4795
|
if (g instanceof PGraphicsOpenGL) {
|
6088
4796
|
if (!style) {
|
@@ -6093,11 +4801,8 @@ public class PShapeOpenGL extends PShape {
|
|
6093
4801
|
}
|
6094
4802
|
}
|
6095
4803
|
|
6096
|
-
|
6097
|
-
|
6098
|
-
* @param g
|
6099
|
-
*/
|
6100
|
-
@Override
|
4804
|
+
|
4805
|
+
@Override
|
6101
4806
|
protected void post(PGraphics g) {
|
6102
4807
|
if (g instanceof PGraphicsOpenGL) {
|
6103
4808
|
} else {
|
@@ -6105,11 +4810,8 @@ public class PShapeOpenGL extends PShape {
|
|
6105
4810
|
}
|
6106
4811
|
}
|
6107
4812
|
|
6108
|
-
|
6109
|
-
|
6110
|
-
* @param g
|
6111
|
-
*/
|
6112
|
-
@Override
|
4813
|
+
|
4814
|
+
@Override
|
6113
4815
|
protected void drawGeometry(PGraphics g) {
|
6114
4816
|
vertexCount = inGeo.vertexCount;
|
6115
4817
|
vertices = inGeo.getVertexData();
|
@@ -6123,12 +4825,6 @@ public class PShapeOpenGL extends PShape {
|
|
6123
4825
|
|
6124
4826
|
// Render the geometry stored in the root shape as VBOs, for the vertices
|
6125
4827
|
// corresponding to this shape. Sometimes we can have root == this.
|
6126
|
-
|
6127
|
-
/**
|
6128
|
-
*
|
6129
|
-
* @param g
|
6130
|
-
* @param texture
|
6131
|
-
*/
|
6132
4828
|
protected void render(PGraphicsOpenGL g, PImage texture) {
|
6133
4829
|
if (root == null) {
|
6134
4830
|
// Some error. Root should never be null. At least it should be 'this'.
|
@@ -6162,12 +4858,8 @@ public class PShapeOpenGL extends PShape {
|
|
6162
4858
|
}
|
6163
4859
|
}
|
6164
4860
|
|
6165
|
-
|
6166
|
-
|
6167
|
-
* @param g
|
6168
|
-
* @param textureImage
|
6169
|
-
*/
|
6170
|
-
protected void renderPolys(PGraphicsOpenGL g, PImage textureImage) {
|
4861
|
+
|
4862
|
+
protected void renderPolys(PGraphicsOpenGL g, PImage textureImage) {
|
6171
4863
|
boolean customShader = g.polyShader != null;
|
6172
4864
|
boolean needNormals = customShader ? g.polyShader.accessNormals() : false;
|
6173
4865
|
boolean needTexCoords = customShader ? g.polyShader.accessTexCoords() : false;
|
@@ -6261,12 +4953,8 @@ public class PShapeOpenGL extends PShape {
|
|
6261
4953
|
}
|
6262
4954
|
}
|
6263
4955
|
|
6264
|
-
|
6265
|
-
|
6266
|
-
* @param g
|
6267
|
-
* @param textureImage
|
6268
|
-
*/
|
6269
|
-
protected void rawPolys(PGraphicsOpenGL g, PImage textureImage) {
|
4956
|
+
|
4957
|
+
protected void rawPolys(PGraphicsOpenGL g, PImage textureImage) {
|
6270
4958
|
PGraphics raw = g.getRaw();
|
6271
4959
|
|
6272
4960
|
raw.colorMode(RGB);
|
@@ -6360,11 +5048,8 @@ public class PShapeOpenGL extends PShape {
|
|
6360
5048
|
raw.endShape();
|
6361
5049
|
}
|
6362
5050
|
|
6363
|
-
|
6364
|
-
|
6365
|
-
* @param g
|
6366
|
-
*/
|
6367
|
-
protected void renderLines(PGraphicsOpenGL g) {
|
5051
|
+
|
5052
|
+
protected void renderLines(PGraphicsOpenGL g) {
|
6368
5053
|
PShader shader = g.getLineShader();
|
6369
5054
|
shader.bind();
|
6370
5055
|
|
@@ -6387,11 +5072,8 @@ public class PShapeOpenGL extends PShape {
|
|
6387
5072
|
shader.unbind();
|
6388
5073
|
}
|
6389
5074
|
|
6390
|
-
|
6391
|
-
|
6392
|
-
* @param g
|
6393
|
-
*/
|
6394
|
-
protected void rawLines(PGraphicsOpenGL g) {
|
5075
|
+
|
5076
|
+
protected void rawLines(PGraphicsOpenGL g) {
|
6395
5077
|
PGraphics raw = g.getRaw();
|
6396
5078
|
|
6397
5079
|
raw.colorMode(RGB);
|
@@ -6463,11 +5145,8 @@ public class PShapeOpenGL extends PShape {
|
|
6463
5145
|
raw.endShape();
|
6464
5146
|
}
|
6465
5147
|
|
6466
|
-
|
6467
|
-
|
6468
|
-
* @param g
|
6469
|
-
*/
|
6470
|
-
protected void renderPoints(PGraphicsOpenGL g) {
|
5148
|
+
|
5149
|
+
protected void renderPoints(PGraphicsOpenGL g) {
|
6471
5150
|
PShader shader = g.getPointShader();
|
6472
5151
|
shader.bind();
|
6473
5152
|
|
@@ -6490,11 +5169,8 @@ public class PShapeOpenGL extends PShape {
|
|
6490
5169
|
shader.unbind();
|
6491
5170
|
}
|
6492
5171
|
|
6493
|
-
|
6494
|
-
|
6495
|
-
* @param g
|
6496
|
-
*/
|
6497
|
-
protected void rawPoints(PGraphicsOpenGL g) {
|
5172
|
+
|
5173
|
+
protected void rawPoints(PGraphicsOpenGL g) {
|
6498
5174
|
PGraphics raw = g.getRaw();
|
6499
5175
|
|
6500
5176
|
raw.colorMode(RGB);
|