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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.mvn/wrapper/MavenWrapperDownloader.java +117 -0
  4. data/.mvn/wrapper/maven-wrapper.properties +2 -1
  5. data/.travis.yml +2 -5
  6. data/CHANGELOG.md +4 -0
  7. data/README.md +3 -3
  8. data/Rakefile +15 -27
  9. data/docs/_config.yml +1 -1
  10. data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -1
  11. data/docs/_posts/2018-11-18-building-gem.md +1 -1
  12. data/lib/picrate/app.rb +1 -1
  13. data/lib/picrate/native_folder.rb +1 -1
  14. data/lib/picrate/version.rb +1 -1
  15. data/mvnw +127 -51
  16. data/mvnw.cmd +182 -0
  17. data/pom.rb +39 -30
  18. data/pom.xml +50 -37
  19. data/src/main/java/monkstone/ColorUtil.java +1 -1
  20. data/src/main/java/monkstone/core/LibraryProxy.java +0 -1
  21. data/src/main/java/monkstone/noise/SimplexNoise.java +1 -1
  22. data/src/main/java/monkstone/vecmath/GfxRender.java +87 -0
  23. data/src/main/java/monkstone/vecmath/ShapeRender.java +1 -1
  24. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
  25. data/src/main/java/processing/awt/PGraphicsJava2D.java +48 -50
  26. data/src/main/java/processing/awt/PShapeJava2D.java +10 -0
  27. data/src/main/java/processing/awt/PSurfaceAWT.java +315 -371
  28. data/src/main/java/processing/core/PApplet.java +15424 -15495
  29. data/src/main/java/processing/core/PConstants.java +4 -4
  30. data/src/main/java/processing/core/PFont.java +394 -369
  31. data/src/main/java/processing/core/PGraphics.java +11 -10
  32. data/src/main/java/processing/core/PImage.java +1389 -1435
  33. data/src/main/java/processing/core/PMatrix2D.java +297 -294
  34. data/src/main/java/processing/core/PMatrix3D.java +641 -594
  35. data/src/main/java/processing/core/PShape.java +1755 -1784
  36. data/src/main/java/processing/core/PShapeOBJ.java +145 -133
  37. data/src/main/java/processing/core/PShapeSVG.java +808 -801
  38. data/src/main/java/processing/core/PStyle.java +141 -149
  39. data/src/main/java/processing/core/PSurface.java +111 -117
  40. data/src/main/java/processing/core/PSurfaceNone.java +178 -187
  41. data/src/main/java/processing/javafx/PGraphicsFX2D.java +349 -346
  42. data/src/main/java/processing/opengl/FontTexture.java +40 -59
  43. data/src/main/java/processing/opengl/FrameBuffer.java +28 -18
  44. data/src/main/java/processing/opengl/LinePath.java +7 -7
  45. data/src/main/java/processing/opengl/LineStroker.java +6 -10
  46. data/src/main/java/processing/opengl/PGL.java +56 -44
  47. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +909 -2338
  48. data/src/main/java/processing/opengl/PJOGL.java +1722 -1763
  49. data/src/main/java/processing/opengl/PShader.java +1308 -1192
  50. data/src/main/java/processing/opengl/PShapeOpenGL.java +487 -1811
  51. data/src/main/java/processing/opengl/PSurfaceJOGL.java +482 -497
  52. data/src/main/java/processing/opengl/Texture.java +99 -76
  53. data/src/main/java/processing/opengl/VertexBuffer.java +41 -43
  54. data/vendors/Rakefile +1 -1
  55. metadata +7 -4
@@ -1,6 +1,6 @@
1
1
  /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
2
 
3
- /*
3
+ /*
4
4
  Part of the Processing project - http://processing.org
5
5
 
6
6
  Copyright (c) 2012-15 The Processing Foundation
@@ -20,8 +20,7 @@
20
20
  Public License along with this library; if not, write to the
21
21
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
22
22
  Boston, MA 02111-1307 USA
23
- */
24
-
23
+ */
25
24
  package processing.opengl;
26
25
 
27
26
  import java.awt.Font;
@@ -67,192 +66,194 @@ import processing.core.PSurface;
67
66
  public class PJOGL extends PGL {
68
67
  // OpenGL profile to use (2, 3 or 4)
69
68
 
70
- /**
71
- *
72
- */
69
+ /**
70
+ *
71
+ */
73
72
  public static int profile = 2;
74
73
 
75
74
  // User-provided icons to override defaults
76
-
77
- /**
78
- *
79
- */
75
+ /**
76
+ *
77
+ */
80
78
  protected static String[] icons = null;
81
79
 
82
80
  // The two windowing toolkits available to use in JOGL:
81
+ /**
82
+ *
83
+ */
84
+ public static final int AWT = 0; // http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing
83
85
 
84
- /**
85
- *
86
- */
87
- public static final int AWT = 0; // http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing
88
-
89
- /**
90
- *
91
- */
92
- public static final int NEWT = 1; // http://jogamp.org/jogl/doc/NEWT-Overview.html
86
+ /**
87
+ *
88
+ */
89
+ public static final int NEWT = 1; // http://jogamp.org/jogl/doc/NEWT-Overview.html
93
90
 
94
91
  // ........................................................
95
-
96
92
  // Public members to access the underlying GL objects and context
97
-
98
- /** Basic GL functionality, common to all profiles */
93
+ /**
94
+ * Basic GL functionality, common to all profiles
95
+ */
99
96
  public GL gl;
100
97
 
101
- /** GLU interface **/
98
+ /**
99
+ * GLU interface *
100
+ */
102
101
  public GLU glu;
103
102
 
104
- /** The rendering context (holds rendering state info) */
103
+ /**
104
+ * The rendering context (holds rendering state info)
105
+ */
105
106
  public GLContext context;
106
107
 
107
108
  // ........................................................
108
-
109
109
  // Additional parameters
110
-
111
- /** Time that the Processing's animation thread will wait for JOGL's rendering
110
+ /**
111
+ * Time that the Processing's animation thread will wait for JOGL's rendering
112
112
  * thread to be done with a single frame.
113
113
  */
114
114
  protected static int DRAW_TIMEOUT_MILLIS = 500;
115
115
 
116
116
  // ........................................................
117
-
118
117
  // Protected JOGL-specific objects needed to access the GL profiles
119
-
120
- /** The capabilities of the OpenGL rendering surface */
118
+ /**
119
+ * The capabilities of the OpenGL rendering surface
120
+ */
121
121
  protected GLCapabilitiesImmutable capabilities;
122
122
 
123
- /** The rendering surface */
123
+ /**
124
+ * The rendering surface
125
+ */
124
126
  protected GLDrawable drawable;
125
127
 
126
- /** GLES2 functionality (shaders, etc) */
128
+ /**
129
+ * GLES2 functionality (shaders, etc)
130
+ */
127
131
  protected GL2ES2 gl2;
128
132
 
129
- /** GL3 interface */
133
+ /**
134
+ * GL3 interface
135
+ */
130
136
  protected GL2GL3 gl3;
131
137
 
132
- /** GL2 desktop functionality (blit framebuffer, map buffer range,
133
- * multisampled renderbuffers) */
138
+ /**
139
+ * GL2 desktop functionality (blit framebuffer, map buffer range, multisampled
140
+ * renderbuffers)
141
+ */
134
142
  protected GL2 gl2x;
135
143
 
136
- /** GL3ES3 interface */
144
+ /**
145
+ * GL3ES3 interface
146
+ */
137
147
  protected GL3ES3 gl3es3;
138
148
 
139
- /** Stores exceptions that ocurred during drawing */
149
+ /**
150
+ * Stores exceptions that ocurred during drawing
151
+ */
140
152
  protected Exception drawException;
141
153
 
142
154
  // ........................................................
143
-
144
155
  // Utility arrays to copy projection/modelview matrices to GL
145
-
146
- /**
147
- *
148
- */
149
-
156
+ /**
157
+ *
158
+ */
150
159
  protected float[] projMatrix;
151
160
 
152
- /**
153
- *
154
- */
155
- protected float[] mvMatrix;
161
+ /**
162
+ *
163
+ */
164
+ protected float[] mvMatrix;
156
165
 
157
166
  // ........................................................
158
-
159
167
  // Static initialization for some parameters that need to be different for
160
168
  // JOGL
161
-
162
169
  static {
163
170
  MIN_DIRECT_BUFFER_SIZE = 2;
164
- INDEX_TYPE = GL.GL_UNSIGNED_SHORT;
171
+ INDEX_TYPE = GL.GL_UNSIGNED_SHORT;
165
172
  }
166
173
 
167
-
168
174
  ///////////////////////////////////////////////////////////////
169
-
170
175
  // Initialization, finalization
171
-
172
- /**
173
- *
174
- * @param pg
175
- */
176
-
177
-
176
+ /**
177
+ *
178
+ * @param pg
179
+ */
178
180
  public PJOGL(PGraphicsOpenGL pg) {
179
181
  super(pg);
180
182
  glu = new GLU();
181
183
  }
182
184
 
183
- /**
184
- *
185
- * @return
186
- */
187
- @Override
185
+ /**
186
+ *
187
+ * @return
188
+ */
189
+ @Override
188
190
  public Object getNative() {
189
191
  return sketch.getSurface().getNative();
190
192
  }
191
193
 
192
- /**
193
- *
194
- * @param fps
195
- */
196
- @Override
197
- protected void setFrameRate(float fps) {}
194
+ /**
195
+ *
196
+ * @param fps
197
+ */
198
+ @Override
199
+ protected void setFrameRate(float fps) {
200
+ }
198
201
 
199
- /**
200
- *
201
- * @param antialias
202
- */
203
- @Override
204
- protected void initSurface(int antialias) {}
202
+ /**
203
+ *
204
+ * @param antialias
205
+ */
206
+ @Override
207
+ protected void initSurface(int antialias) {
208
+ }
205
209
 
206
- /**
207
- *
208
- */
209
- @Override
210
- protected void reinitSurface() {}
210
+ /**
211
+ *
212
+ */
213
+ @Override
214
+ protected void reinitSurface() {
215
+ }
211
216
 
212
- /**
213
- *
214
- */
215
- @Override
216
- protected void registerListeners() {}
217
+ /**
218
+ *
219
+ */
220
+ @Override
221
+ protected void registerListeners() {
222
+ }
217
223
 
218
- /**
219
- *
220
- * @param icons
221
- */
222
- static public void setIcon(String... icons) {
224
+ /**
225
+ *
226
+ * @param icons
227
+ */
228
+ static public void setIcon(String... icons) {
223
229
  PJOGL.icons = new String[icons.length];
224
230
  PApplet.arrayCopy(icons, PJOGL.icons);
225
231
  }
226
232
 
227
-
228
233
  ///////////////////////////////////////////////////////////////
229
-
230
234
  // Public methods to get/set renderer's properties
231
-
232
- /**
233
- *
234
- * @param caps
235
- */
236
-
237
-
235
+ /**
236
+ *
237
+ * @param caps
238
+ */
238
239
  public void setCaps(GLCapabilities caps) {
239
240
  reqNumSamples = caps.getNumSamples();
240
241
  capabilities = caps;
241
242
  }
242
243
 
243
- /**
244
- *
245
- * @return
246
- */
247
- public GLCapabilitiesImmutable getCaps() {
244
+ /**
245
+ *
246
+ * @return
247
+ */
248
+ public GLCapabilitiesImmutable getCaps() {
248
249
  return capabilities;
249
250
  }
250
251
 
251
- /**
252
- *
253
- * @param fps
254
- */
255
- public void setFps(float fps) {
252
+ /**
253
+ *
254
+ * @param fps
255
+ */
256
+ public void setFps(float fps) {
256
257
  if (!setFps || targetFps != fps) {
257
258
  if (60 < fps) {
258
259
  // Disables v-sync
@@ -267,47 +268,47 @@ public class PJOGL extends PGL {
267
268
  }
268
269
  }
269
270
 
270
- /**
271
- *
272
- * @return
273
- */
274
- @Override
271
+ /**
272
+ *
273
+ * @return
274
+ */
275
+ @Override
275
276
  protected int getDepthBits() {
276
277
  return capabilities.getDepthBits();
277
278
  }
278
279
 
279
- /**
280
- *
281
- * @return
282
- */
283
- @Override
280
+ /**
281
+ *
282
+ * @return
283
+ */
284
+ @Override
284
285
  protected int getStencilBits() {
285
286
  return capabilities.getStencilBits();
286
287
  }
287
288
 
288
- /**
289
- *
290
- * @return
291
- */
292
- @Override
289
+ /**
290
+ *
291
+ * @return
292
+ */
293
+ @Override
293
294
  protected float getPixelScale() {
294
295
  PSurface surf = sketch.getSurface();
295
296
  if (surf == null) {
296
297
  return graphics.pixelDensity;
297
298
  } else if (surf instanceof PSurfaceJOGL) {
298
- return ((PSurfaceJOGL)surf).getPixelScale();
299
+ return ((PSurfaceJOGL) surf).getPixelScale();
299
300
  } else {
300
301
  throw new RuntimeException("Renderer cannot find a JOGL surface");
301
302
  }
302
303
  }
303
304
 
304
- /**
305
- *
306
- * @param pgl
307
- */
308
- @Override
305
+ /**
306
+ *
307
+ * @param pgl
308
+ */
309
+ @Override
309
310
  protected void getGL(PGL pgl) {
310
- PJOGL pjogl = (PJOGL)pgl;
311
+ PJOGL pjogl = (PJOGL) pgl;
311
312
 
312
313
  this.drawable = pjogl.drawable;
313
314
  this.context = pjogl.context;
@@ -321,11 +322,11 @@ public class PJOGL extends PGL {
321
322
  this.gl3es3 = pjogl.gl3es3;
322
323
  }
323
324
 
324
- /**
325
- *
326
- * @param glDrawable
327
- */
328
- public void getGL(GLAutoDrawable glDrawable) {
325
+ /**
326
+ *
327
+ * @param glDrawable
328
+ */
329
+ public void getGL(GLAutoDrawable glDrawable) {
329
330
  context = glDrawable.getContext();
330
331
  glContext = context.hashCode();
331
332
  setThread(Thread.currentThread());
@@ -349,50 +350,58 @@ public class PJOGL extends PGL {
349
350
  }
350
351
  }
351
352
 
352
- /**
353
- *
354
- * @return
355
- */
356
- @Override
357
- protected boolean canDraw() { return true; }
353
+ /**
354
+ *
355
+ * @return
356
+ */
357
+ @Override
358
+ protected boolean canDraw() {
359
+ return true;
360
+ }
358
361
 
359
- /**
360
- *
361
- */
362
- @Override
363
- protected void requestFocus() {}
362
+ /**
363
+ *
364
+ */
365
+ @Override
366
+ protected void requestFocus() {
367
+ }
364
368
 
365
- /**
366
- *
367
- */
368
- @Override
369
- protected void requestDraw() {}
369
+ /**
370
+ *
371
+ */
372
+ @Override
373
+ protected void requestDraw() {
374
+ }
370
375
 
371
- /**
372
- *
373
- */
374
- @Override
375
- protected void swapBuffers() {
376
- PSurfaceJOGL surf = (PSurfaceJOGL)sketch.getSurface();
376
+ /**
377
+ *
378
+ */
379
+ @Override
380
+ protected void swapBuffers() {
381
+ PSurfaceJOGL surf = (PSurfaceJOGL) sketch.getSurface();
377
382
  surf.window.swapBuffers();
378
383
  }
379
384
 
380
- /**
381
- *
382
- */
383
- @Override
385
+ /**
386
+ *
387
+ */
388
+ @Override
384
389
  protected void initFBOLayer() {
385
390
  if (0 < sketch.frameCount) {
386
- if (isES()) initFBOLayerES();
387
- else initFBOLayerGL();
391
+ if (isES()) {
392
+ initFBOLayerES();
393
+ } else {
394
+ initFBOLayerGL();
395
+ }
388
396
  }
389
397
  }
390
398
 
391
-
392
399
  private void initFBOLayerES() {
393
400
  IntBuffer buf = allocateDirectIntBuffer(fboWidth * fboHeight);
394
401
 
395
- if (hasReadBuffer()) readBuffer(BACK);
402
+ if (hasReadBuffer()) {
403
+ readBuffer(BACK);
404
+ }
396
405
  readPixelsImpl(0, 0, fboWidth, fboHeight, RGBA, UNSIGNED_BYTE, buf);
397
406
  bindTexture(TEXTURE_2D, glColorTex.get(frontTex));
398
407
  texSubImage2D(TEXTURE_2D, 0, 0, 0, fboWidth, fboHeight, RGBA, UNSIGNED_BYTE, buf);
@@ -404,7 +413,6 @@ public class PJOGL extends PGL {
404
413
  bindFramebufferImpl(FRAMEBUFFER, 0);
405
414
  }
406
415
 
407
-
408
416
  private void initFBOLayerGL() {
409
417
  // Copy the contents of the front and back screen buffers to the textures
410
418
  // of the FBO, so they are properly initialized. Note that the front buffer
@@ -412,7 +420,9 @@ public class PJOGL extends PGL {
412
420
  // https://www.opengl.org/wiki/Default_Framebuffer
413
421
  // so it is copied to the front texture of the FBO layer:
414
422
  if (pclearColor || 0 < pgeomCount || !sketch.isLooping()) {
415
- if (hasReadBuffer()) readBuffer(FRONT);
423
+ if (hasReadBuffer()) {
424
+ readBuffer(FRONT);
425
+ }
416
426
  } else {
417
427
  // ...except when the previous frame has not been cleared and nothing was
418
428
  // rendered while looping. In this case the back buffer, which holds the
@@ -422,28 +432,30 @@ public class PJOGL extends PGL {
422
432
  }
423
433
  bindFramebufferImpl(DRAW_FRAMEBUFFER, glColorFbo.get(0));
424
434
  framebufferTexture2D(FRAMEBUFFER, COLOR_ATTACHMENT0,
425
- TEXTURE_2D, glColorTex.get(frontTex), 0);
426
- if (hasDrawBuffer()) drawBuffer(COLOR_ATTACHMENT0);
435
+ TEXTURE_2D, glColorTex.get(frontTex), 0);
436
+ if (hasDrawBuffer()) {
437
+ drawBuffer(COLOR_ATTACHMENT0);
438
+ }
427
439
  blitFramebuffer(0, 0, fboWidth, fboHeight,
428
- 0, 0, fboWidth, fboHeight,
429
- COLOR_BUFFER_BIT, NEAREST);
440
+ 0, 0, fboWidth, fboHeight,
441
+ COLOR_BUFFER_BIT, NEAREST);
430
442
 
431
443
  readBuffer(BACK);
432
444
  bindFramebufferImpl(DRAW_FRAMEBUFFER, glColorFbo.get(0));
433
445
  framebufferTexture2D(FRAMEBUFFER, COLOR_ATTACHMENT0,
434
- TEXTURE_2D, glColorTex.get(backTex), 0);
446
+ TEXTURE_2D, glColorTex.get(backTex), 0);
435
447
  drawBuffer(COLOR_ATTACHMENT0);
436
448
  blitFramebuffer(0, 0, fboWidth, fboHeight,
437
- 0, 0, fboWidth, fboHeight,
438
- COLOR_BUFFER_BIT, NEAREST);
449
+ 0, 0, fboWidth, fboHeight,
450
+ COLOR_BUFFER_BIT, NEAREST);
439
451
 
440
452
  bindFramebufferImpl(FRAMEBUFFER, 0);
441
453
  }
442
454
 
443
- /**
444
- *
445
- */
446
- @Override
455
+ /**
456
+ *
457
+ */
458
+ @Override
447
459
  protected void beginGL() {
448
460
  PMatrix3D proj = graphics.projection;
449
461
  PMatrix3D mdl = graphics.modelview;
@@ -452,16 +464,16 @@ public class PJOGL extends PGL {
452
464
  projMatrix = new float[16];
453
465
  }
454
466
  gl2x.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
455
- projMatrix[ 0] = proj.m00;
456
- projMatrix[ 1] = proj.m10;
457
- projMatrix[ 2] = proj.m20;
458
- projMatrix[ 3] = proj.m30;
459
- projMatrix[ 4] = proj.m01;
460
- projMatrix[ 5] = proj.m11;
461
- projMatrix[ 6] = proj.m21;
462
- projMatrix[ 7] = proj.m31;
463
- projMatrix[ 8] = proj.m02;
464
- projMatrix[ 9] = proj.m12;
467
+ projMatrix[0] = proj.m00;
468
+ projMatrix[1] = proj.m10;
469
+ projMatrix[2] = proj.m20;
470
+ projMatrix[3] = proj.m30;
471
+ projMatrix[4] = proj.m01;
472
+ projMatrix[5] = proj.m11;
473
+ projMatrix[6] = proj.m21;
474
+ projMatrix[7] = proj.m31;
475
+ projMatrix[8] = proj.m02;
476
+ projMatrix[9] = proj.m12;
465
477
  projMatrix[10] = proj.m22;
466
478
  projMatrix[11] = proj.m32;
467
479
  projMatrix[12] = proj.m03;
@@ -474,16 +486,16 @@ public class PJOGL extends PGL {
474
486
  mvMatrix = new float[16];
475
487
  }
476
488
  gl2x.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
477
- mvMatrix[ 0] = mdl.m00;
478
- mvMatrix[ 1] = mdl.m10;
479
- mvMatrix[ 2] = mdl.m20;
480
- mvMatrix[ 3] = mdl.m30;
481
- mvMatrix[ 4] = mdl.m01;
482
- mvMatrix[ 5] = mdl.m11;
483
- mvMatrix[ 6] = mdl.m21;
484
- mvMatrix[ 7] = mdl.m31;
485
- mvMatrix[ 8] = mdl.m02;
486
- mvMatrix[ 9] = mdl.m12;
489
+ mvMatrix[0] = mdl.m00;
490
+ mvMatrix[1] = mdl.m10;
491
+ mvMatrix[2] = mdl.m20;
492
+ mvMatrix[3] = mdl.m30;
493
+ mvMatrix[4] = mdl.m01;
494
+ mvMatrix[5] = mdl.m11;
495
+ mvMatrix[6] = mdl.m21;
496
+ mvMatrix[7] = mdl.m31;
497
+ mvMatrix[8] = mdl.m02;
498
+ mvMatrix[9] = mdl.m12;
487
499
  mvMatrix[10] = mdl.m22;
488
500
  mvMatrix[11] = mdl.m32;
489
501
  mvMatrix[12] = mdl.m03;
@@ -494,32 +506,38 @@ public class PJOGL extends PGL {
494
506
  }
495
507
  }
496
508
 
497
- /**
498
- *
499
- * @return
500
- */
501
- @Override
509
+ /**
510
+ *
511
+ * @return
512
+ */
513
+ @Override
502
514
  protected boolean hasFBOs() {
503
- if (context.hasBasicFBOSupport()) return true;
504
- else return super.hasFBOs();
515
+ if (context.hasBasicFBOSupport()) {
516
+ return true;
517
+ } else {
518
+ return super.hasFBOs();
519
+ }
505
520
  }
506
521
 
507
- /**
508
- *
509
- * @return
510
- */
511
- @Override
522
+ /**
523
+ *
524
+ * @return
525
+ */
526
+ @Override
512
527
  protected boolean hasShaders() {
513
- if (context.hasGLSL()) return true;
514
- else return super.hasShaders();
528
+ if (context.hasGLSL()) {
529
+ return true;
530
+ } else {
531
+ return super.hasShaders();
532
+ }
515
533
  }
516
534
 
517
- /**
518
- *
519
- * @param glDrawable
520
- */
521
- public void init(GLAutoDrawable glDrawable) {
522
- capabilities = glDrawable.getChosenGLCapabilities();
535
+ /**
536
+ *
537
+ * @param glDrawable
538
+ */
539
+ public void init(GLAutoDrawable glDrawable) {
540
+ capabilities = glDrawable.getChosenGLCapabilities();
523
541
  if (!hasFBOs()) {
524
542
  throw new RuntimeException(MISSING_FBO_ERROR);
525
543
  }
@@ -528,17 +546,12 @@ public class PJOGL extends PGL {
528
546
  }
529
547
  }
530
548
 
531
-
532
549
  ///////////////////////////////////////////////////////////
533
-
534
550
  // Utility functions
535
-
536
- /**
537
- *
538
- * @param target
539
- */
540
-
541
-
551
+ /**
552
+ *
553
+ * @param target
554
+ */
542
555
  @Override
543
556
  protected void enableTexturing(int target) {
544
557
  if (target == TEXTURE_2D) {
@@ -548,11 +561,11 @@ public class PJOGL extends PGL {
548
561
  }
549
562
  }
550
563
 
551
- /**
552
- *
553
- * @param target
554
- */
555
- @Override
564
+ /**
565
+ *
566
+ * @param target
567
+ */
568
+ @Override
556
569
  protected void disableTexturing(int target) {
557
570
  if (target == TEXTURE_2D) {
558
571
  texturingTargets[0] = false;
@@ -561,7 +574,6 @@ public class PJOGL extends PGL {
561
574
  }
562
575
  }
563
576
 
564
-
565
577
  /**
566
578
  * Convenience method to get a legit FontMetrics object. Where possible,
567
579
  * override this any renderer subclass so that you're not using what's
@@ -572,7 +584,6 @@ public class PJOGL extends PGL {
572
584
  return Toolkit.getDefaultToolkit().getFontMetrics(font);
573
585
  }
574
586
 
575
-
576
587
  /**
577
588
  * Convenience method to jump through some Java2D hoops and get an FRC.
578
589
  */
@@ -580,35 +591,35 @@ public class PJOGL extends PGL {
580
591
  return getFontMetrics(font).getFontRenderContext();
581
592
  }
582
593
 
583
- /**
584
- *
585
- * @param font
586
- * @return
587
- */
588
- @Override
594
+ /**
595
+ *
596
+ * @param font
597
+ * @return
598
+ */
599
+ @Override
589
600
  protected int getFontAscent(Object font) {
590
601
  return getFontMetrics((Font) font).getAscent();
591
602
  }
592
603
 
593
- /**
594
- *
595
- * @param font
596
- * @return
597
- */
598
- @Override
604
+ /**
605
+ *
606
+ * @param font
607
+ * @return
608
+ */
609
+ @Override
599
610
  protected int getFontDescent(Object font) {
600
611
  return getFontMetrics((Font) font).getDescent();
601
612
  }
602
613
 
603
- /**
604
- *
605
- * @param font
606
- * @param buffer
607
- * @param start
608
- * @param stop
609
- * @return
610
- */
611
- @Override
614
+ /**
615
+ *
616
+ * @param font
617
+ * @param buffer
618
+ * @param start
619
+ * @param stop
620
+ * @return
621
+ */
622
+ @Override
612
623
  protected int getTextWidth(Object font, char[] buffer, int start, int stop) {
613
624
  // maybe should use one of the newer/fancier functions for this?
614
625
  int length = stop - start;
@@ -616,32 +627,32 @@ public class PJOGL extends PGL {
616
627
  return metrics.charsWidth(buffer, start, length);
617
628
  }
618
629
 
619
- /**
620
- *
621
- * @param font
622
- * @param size
623
- * @return
624
- */
625
- @Override
630
+ /**
631
+ *
632
+ * @param font
633
+ * @param size
634
+ * @return
635
+ */
636
+ @Override
626
637
  protected Object getDerivedFont(Object font, float size) {
627
638
  return ((Font) font).deriveFont(size);
628
639
  }
629
640
 
630
- /**
631
- *
632
- * @return
633
- */
634
- @Override
641
+ /**
642
+ *
643
+ * @return
644
+ */
645
+ @Override
635
646
  protected int getGLSLVersion() {
636
647
  VersionNumber vn = context.getGLSLVersionNumber();
637
648
  return vn.getMajor() * 100 + vn.getMinor();
638
649
  }
639
650
 
640
- /**
641
- *
642
- * @return
643
- */
644
- @Override
651
+ /**
652
+ *
653
+ * @return
654
+ */
655
+ @Override
645
656
  protected String getGLSLVersionSuffix() {
646
657
  VersionNumber vn = context.getGLSLVersionNumber();
647
658
  if (context.isGLESProfile() && 1 < vn.getMajor()) {
@@ -651,80 +662,80 @@ public class PJOGL extends PGL {
651
662
  }
652
663
  }
653
664
 
654
- /**
655
- *
656
- * @param filename
657
- * @return
658
- */
659
- @Override
665
+ /**
666
+ *
667
+ * @param filename
668
+ * @return
669
+ */
670
+ @Override
660
671
  protected String[] loadVertexShader(String filename) {
661
672
  return loadVertexShader(filename, getGLSLVersion(), getGLSLVersionSuffix());
662
673
  }
663
674
 
664
- /**
665
- *
666
- * @param filename
667
- * @return
668
- */
669
- @Override
675
+ /**
676
+ *
677
+ * @param filename
678
+ * @return
679
+ */
680
+ @Override
670
681
  protected String[] loadFragmentShader(String filename) {
671
682
  return loadFragmentShader(filename, getGLSLVersion(), getGLSLVersionSuffix());
672
683
  }
673
684
 
674
- /**
675
- *
676
- * @param url
677
- * @return
678
- */
679
- @Override
685
+ /**
686
+ *
687
+ * @param url
688
+ * @return
689
+ */
690
+ @Override
680
691
  protected String[] loadVertexShader(URL url) {
681
692
  return loadVertexShader(url, getGLSLVersion(), getGLSLVersionSuffix());
682
693
  }
683
694
 
684
- /**
685
- *
686
- * @param url
687
- * @return
688
- */
689
- @Override
695
+ /**
696
+ *
697
+ * @param url
698
+ * @return
699
+ */
700
+ @Override
690
701
  protected String[] loadFragmentShader(URL url) {
691
702
  return loadFragmentShader(url, getGLSLVersion(), getGLSLVersionSuffix());
692
703
  }
693
704
 
694
- /**
695
- *
696
- * @param filename
697
- * @param version
698
- * @param versionSuffix
699
- * @return
700
- */
701
- @Override
705
+ /**
706
+ *
707
+ * @param filename
708
+ * @param version
709
+ * @param versionSuffix
710
+ * @return
711
+ */
712
+ @Override
702
713
  protected String[] loadFragmentShader(String filename, int version, String versionSuffix) {
703
714
  String[] fragSrc0 = sketch.loadStrings(filename);
704
715
  return preprocessFragmentSource(fragSrc0, version, versionSuffix);
705
716
  }
706
717
 
707
- /**
708
- *
709
- * @param filename
710
- * @param version
711
- * @param versionSuffix
712
- * @return
713
- */
714
- @Override
718
+ /**
719
+ *
720
+ * @param filename
721
+ * @param version
722
+ * @param versionSuffix
723
+ * @return
724
+ */
725
+ @Override
715
726
  protected String[] loadVertexShader(String filename, int version, String versionSuffix) {
716
727
  String[] vertSrc0 = sketch.loadStrings(filename);
717
728
  return preprocessVertexSource(vertSrc0, version, versionSuffix);
718
729
  }
719
730
 
720
- /**
721
- *
722
- * @param url
723
- * @param version
724
- * @param versionSuffix
725
- * @return
726
- */
727
- @Override
731
+ /**
732
+ *
733
+ * @param url
734
+ * @param version
735
+ * @param versionSuffix
736
+ * @return
737
+ */
738
+ @Override
728
739
  protected String[] loadFragmentShader(URL url, int version, String versionSuffix) {
729
740
  try {
730
741
  String[] fragSrc0 = PApplet.loadStrings(url.openStream());
@@ -735,14 +746,14 @@ public class PJOGL extends PGL {
735
746
  return null;
736
747
  }
737
748
 
738
- /**
739
- *
740
- * @param url
741
- * @param version
742
- * @param versionSuffix
743
- * @return
744
- */
745
- @Override
749
+ /**
750
+ *
751
+ * @param url
752
+ * @param version
753
+ * @param versionSuffix
754
+ * @return
755
+ */
756
+ @Override
746
757
  protected String[] loadVertexShader(URL url, int version, String versionSuffix) {
747
758
  try {
748
759
  String[] vertSrc0 = PApplet.loadStrings(url.openStream());
@@ -753,48 +764,43 @@ public class PJOGL extends PGL {
753
764
  return null;
754
765
  }
755
766
 
756
-
757
767
  ///////////////////////////////////////////////////////////
758
-
759
768
  // Tessellator
760
-
761
- /**
762
- *
763
- * @param callback
764
- * @return
765
- */
766
-
767
-
769
+ /**
770
+ *
771
+ * @param callback
772
+ * @return
773
+ */
768
774
  @Override
769
775
  protected Tessellator createTessellator(TessellatorCallback callback) {
770
776
  return new Tessellator(callback);
771
777
  }
772
778
 
779
+ /**
780
+ *
781
+ */
782
+ protected static class Tessellator implements PGL.Tessellator {
783
+
773
784
  /**
774
785
  *
775
786
  */
776
- protected static class Tessellator implements PGL.Tessellator {
777
-
778
- /**
779
- *
780
- */
781
- protected GLUtessellator tess;
787
+ protected GLUtessellator tess;
782
788
 
783
- /**
784
- *
785
- */
786
- protected TessellatorCallback callback;
789
+ /**
790
+ *
791
+ */
792
+ protected TessellatorCallback callback;
787
793
 
788
- /**
789
- *
790
- */
791
- protected GLUCallback gluCallback;
794
+ /**
795
+ *
796
+ */
797
+ protected GLUCallback gluCallback;
792
798
 
793
- /**
794
- *
795
- * @param callback
796
- */
797
- public Tessellator(TessellatorCallback callback) {
799
+ /**
800
+ *
801
+ * @param callback
802
+ */
803
+ public Tessellator(TessellatorCallback callback) {
798
804
  this.callback = callback;
799
805
  tess = GLU.gluNewTess();
800
806
  gluCallback = new GLUCallback();
@@ -806,363 +812,361 @@ public class PJOGL extends PGL {
806
812
  GLU.gluTessCallback(tess, GLU.GLU_TESS_ERROR, gluCallback);
807
813
  }
808
814
 
809
- /**
810
- *
811
- * @param flag
812
- */
813
- @Override
815
+ /**
816
+ *
817
+ * @param flag
818
+ */
819
+ @Override
814
820
  public void setCallback(int flag) {
815
821
  GLU.gluTessCallback(tess, flag, gluCallback);
816
822
  }
817
823
 
818
- /**
819
- *
820
- * @param rule
821
- */
822
- @Override
824
+ /**
825
+ *
826
+ * @param rule
827
+ */
828
+ @Override
823
829
  public void setWindingRule(int rule) {
824
830
  setProperty(GLU.GLU_TESS_WINDING_RULE, rule);
825
831
  }
826
832
 
827
- /**
828
- *
829
- * @param property
830
- * @param value
831
- */
832
- public void setProperty(int property, int value) {
833
+ /**
834
+ *
835
+ * @param property
836
+ * @param value
837
+ */
838
+ @Override
839
+ public void setProperty(int property, int value) {
833
840
  GLU.gluTessProperty(tess, property, value);
834
841
  }
835
842
 
836
- /**
837
- *
838
- */
839
- @Override
843
+ /**
844
+ *
845
+ */
846
+ @Override
840
847
  public void beginPolygon() {
841
848
  beginPolygon(null);
842
849
  }
843
850
 
844
- /**
845
- *
846
- * @param data
847
- */
848
- @Override
851
+ /**
852
+ *
853
+ * @param data
854
+ */
855
+ @Override
849
856
  public void beginPolygon(Object data) {
850
857
  GLU.gluTessBeginPolygon(tess, data);
851
858
  }
852
859
 
853
- /**
854
- *
855
- */
856
- @Override
860
+ /**
861
+ *
862
+ */
863
+ @Override
857
864
  public void endPolygon() {
858
865
  GLU.gluTessEndPolygon(tess);
859
866
  }
860
867
 
861
- /**
862
- *
863
- */
864
- @Override
868
+ /**
869
+ *
870
+ */
871
+ @Override
865
872
  public void beginContour() {
866
873
  GLU.gluTessBeginContour(tess);
867
874
  }
868
875
 
869
- /**
870
- *
871
- */
872
- @Override
876
+ /**
877
+ *
878
+ */
879
+ @Override
873
880
  public void endContour() {
874
881
  GLU.gluTessEndContour(tess);
875
882
  }
876
883
 
877
- /**
878
- *
879
- * @param v
880
- */
881
- @Override
884
+ /**
885
+ *
886
+ * @param v
887
+ */
888
+ @Override
882
889
  public void addVertex(double[] v) {
883
890
  addVertex(v, 0, v);
884
891
  }
885
892
 
886
- /**
887
- *
888
- * @param v
889
- * @param n
890
- * @param data
891
- */
892
- @Override
893
+ /**
894
+ *
895
+ * @param v
896
+ * @param n
897
+ * @param data
898
+ */
899
+ @Override
893
900
  public void addVertex(double[] v, int n, Object data) {
894
901
  GLU.gluTessVertex(tess, v, n, data);
895
902
  }
896
903
 
904
+ /**
905
+ *
906
+ */
907
+ protected class GLUCallback extends GLUtessellatorCallbackAdapter {
908
+
897
909
  /**
898
910
  *
911
+ * @param type
899
912
  */
900
- protected class GLUCallback extends GLUtessellatorCallbackAdapter {
901
-
902
- /**
903
- *
904
- * @param type
905
- */
906
- @Override
913
+ @Override
907
914
  public void begin(int type) {
908
915
  callback.begin(type);
909
916
  }
910
917
 
911
- /**
912
- *
913
- */
914
- @Override
918
+ /**
919
+ *
920
+ */
921
+ @Override
915
922
  public void end() {
916
923
  callback.end();
917
924
  }
918
925
 
919
- /**
920
- *
921
- * @param data
922
- */
923
- @Override
926
+ /**
927
+ *
928
+ * @param data
929
+ */
930
+ @Override
924
931
  public void vertex(Object data) {
925
932
  callback.vertex(data);
926
933
  }
927
934
 
928
- /**
929
- *
930
- * @param coords
931
- * @param data
932
- * @param weight
933
- * @param outData
934
- */
935
- @Override
935
+ /**
936
+ *
937
+ * @param coords
938
+ * @param data
939
+ * @param weight
940
+ * @param outData
941
+ */
942
+ @Override
936
943
  public void combine(double[] coords, Object[] data,
937
- float[] weight, Object[] outData) {
944
+ float[] weight, Object[] outData) {
938
945
  callback.combine(coords, data, weight, outData);
939
946
  }
940
947
 
941
- /**
942
- *
943
- * @param errnum
944
- */
945
- @Override
948
+ /**
949
+ *
950
+ * @param errnum
951
+ */
952
+ @Override
946
953
  public void error(int errnum) {
947
954
  callback.error(errnum);
948
955
  }
949
956
  }
950
957
  }
951
958
 
952
- /**
953
- *
954
- * @param err
955
- * @return
956
- */
957
- @Override
959
+ /**
960
+ *
961
+ * @param err
962
+ * @return
963
+ */
964
+ @Override
958
965
  protected String tessError(int err) {
959
966
  return glu.gluErrorString(err);
960
967
  }
961
968
 
962
-
963
969
  ///////////////////////////////////////////////////////////
964
-
965
970
  // Font outline
966
-
967
-
968
971
  static {
969
972
  SHAPE_TEXT_SUPPORTED = true;
970
- SEG_MOVETO = PathIterator.SEG_MOVETO;
971
- SEG_LINETO = PathIterator.SEG_LINETO;
972
- SEG_QUADTO = PathIterator.SEG_QUADTO;
973
+ SEG_MOVETO = PathIterator.SEG_MOVETO;
974
+ SEG_LINETO = PathIterator.SEG_LINETO;
975
+ SEG_QUADTO = PathIterator.SEG_QUADTO;
973
976
  SEG_CUBICTO = PathIterator.SEG_CUBICTO;
974
- SEG_CLOSE = PathIterator.SEG_CLOSE;
977
+ SEG_CLOSE = PathIterator.SEG_CLOSE;
975
978
  }
976
979
 
977
- /**
978
- *
979
- * @param ch
980
- * @param font
981
- * @return
982
- */
983
- @Override
980
+ /**
981
+ *
982
+ * @param ch
983
+ * @param font
984
+ * @return
985
+ */
986
+ @Override
984
987
  protected FontOutline createFontOutline(char ch, Object font) {
985
988
  return new FontOutline(ch, (Font) font);
986
989
  }
987
990
 
991
+ /**
992
+ *
993
+ */
994
+ protected class FontOutline implements PGL.FontOutline {
995
+
996
+ PathIterator iter;
997
+
988
998
  /**
989
999
  *
1000
+ * @param ch
1001
+ * @param font
990
1002
  */
991
- protected class FontOutline implements PGL.FontOutline {
992
- PathIterator iter;
993
-
994
- /**
995
- *
996
- * @param ch
997
- * @param font
998
- */
999
- public FontOutline(char ch, Font font) {
1000
- char textArray[] = new char[] { ch };
1003
+ public FontOutline(char ch, Font font) {
1004
+ char textArray[] = new char[]{ch};
1001
1005
  FontRenderContext frc = getFontRenderContext(font);
1002
1006
  GlyphVector gv = font.createGlyphVector(frc, textArray);
1003
1007
  Shape shp = gv.getOutline();
1004
1008
  iter = shp.getPathIterator(null);
1005
1009
  }
1006
1010
 
1007
- /**
1008
- *
1009
- * @return
1010
- */
1011
- public boolean isDone() {
1011
+ /**
1012
+ *
1013
+ * @return
1014
+ */
1015
+ @Override
1016
+ public boolean isDone() {
1012
1017
  return iter.isDone();
1013
1018
  }
1014
1019
 
1015
- /**
1016
- *
1017
- * @param coords
1018
- * @return
1019
- */
1020
- public int currentSegment(float coords[]) {
1020
+ /**
1021
+ *
1022
+ * @param coords
1023
+ * @return
1024
+ */
1025
+ @Override
1026
+ public int currentSegment(float coords[]) {
1021
1027
  return iter.currentSegment(coords);
1022
1028
  }
1023
1029
 
1024
- /**
1025
- *
1026
- */
1027
- public void next() {
1030
+ /**
1031
+ *
1032
+ */
1033
+ @Override
1034
+ public void next() {
1028
1035
  iter.next();
1029
1036
  }
1030
1037
  }
1031
1038
 
1032
-
1033
1039
  ///////////////////////////////////////////////////////////
1034
-
1035
1040
  // Constants
1036
-
1037
1041
  static {
1038
1042
  FALSE = GL.GL_FALSE;
1039
- TRUE = GL.GL_TRUE;
1040
-
1041
- INT = GL2ES2.GL_INT;
1042
- BYTE = GL.GL_BYTE;
1043
- SHORT = GL.GL_SHORT;
1044
- FLOAT = GL.GL_FLOAT;
1045
- BOOL = GL2ES2.GL_BOOL;
1046
- UNSIGNED_INT = GL.GL_UNSIGNED_INT;
1047
- UNSIGNED_BYTE = GL.GL_UNSIGNED_BYTE;
1043
+ TRUE = GL.GL_TRUE;
1044
+
1045
+ INT = GL2ES2.GL_INT;
1046
+ BYTE = GL.GL_BYTE;
1047
+ SHORT = GL.GL_SHORT;
1048
+ FLOAT = GL.GL_FLOAT;
1049
+ BOOL = GL2ES2.GL_BOOL;
1050
+ UNSIGNED_INT = GL.GL_UNSIGNED_INT;
1051
+ UNSIGNED_BYTE = GL.GL_UNSIGNED_BYTE;
1048
1052
  UNSIGNED_SHORT = GL.GL_UNSIGNED_SHORT;
1049
1053
 
1050
- RGB = GL.GL_RGB;
1051
- RGBA = GL.GL_RGBA;
1052
- ALPHA = GL.GL_ALPHA;
1053
- LUMINANCE = GL.GL_LUMINANCE;
1054
+ RGB = GL.GL_RGB;
1055
+ RGBA = GL.GL_RGBA;
1056
+ ALPHA = GL.GL_ALPHA;
1057
+ LUMINANCE = GL.GL_LUMINANCE;
1054
1058
  LUMINANCE_ALPHA = GL.GL_LUMINANCE_ALPHA;
1055
1059
 
1056
- UNSIGNED_SHORT_5_6_5 = GL.GL_UNSIGNED_SHORT_5_6_5;
1060
+ UNSIGNED_SHORT_5_6_5 = GL.GL_UNSIGNED_SHORT_5_6_5;
1057
1061
  UNSIGNED_SHORT_4_4_4_4 = GL.GL_UNSIGNED_SHORT_4_4_4_4;
1058
1062
  UNSIGNED_SHORT_5_5_5_1 = GL.GL_UNSIGNED_SHORT_5_5_5_1;
1059
1063
 
1060
- RGBA4 = GL.GL_RGBA4;
1064
+ RGBA4 = GL.GL_RGBA4;
1061
1065
  RGB5_A1 = GL.GL_RGB5_A1;
1062
- RGB565 = GL.GL_RGB565;
1063
- RGB8 = GL.GL_RGB8;
1064
- RGBA8 = GL.GL_RGBA8;
1065
- ALPHA8 = GL.GL_ALPHA8;
1066
+ RGB565 = GL.GL_RGB565;
1067
+ RGB8 = GL.GL_RGB8;
1068
+ RGBA8 = GL.GL_RGBA8;
1069
+ ALPHA8 = GL.GL_ALPHA8;
1066
1070
 
1067
- READ_ONLY = GL2ES3.GL_READ_ONLY;
1071
+ READ_ONLY = GL2ES3.GL_READ_ONLY;
1068
1072
  WRITE_ONLY = GL.GL_WRITE_ONLY;
1069
1073
  READ_WRITE = GL2ES3.GL_READ_WRITE;
1070
1074
 
1071
1075
  TESS_WINDING_NONZERO = GLU.GLU_TESS_WINDING_NONZERO;
1072
- TESS_WINDING_ODD = GLU.GLU_TESS_WINDING_ODD;
1073
- TESS_EDGE_FLAG = GLU.GLU_TESS_EDGE_FLAG;
1076
+ TESS_WINDING_ODD = GLU.GLU_TESS_WINDING_ODD;
1077
+ TESS_EDGE_FLAG = GLU.GLU_TESS_EDGE_FLAG;
1074
1078
 
1075
1079
  GENERATE_MIPMAP_HINT = GL.GL_GENERATE_MIPMAP_HINT;
1076
- FASTEST = GL.GL_FASTEST;
1077
- NICEST = GL.GL_NICEST;
1078
- DONT_CARE = GL.GL_DONT_CARE;
1079
-
1080
- VENDOR = GL.GL_VENDOR;
1081
- RENDERER = GL.GL_RENDERER;
1082
- VERSION = GL.GL_VERSION;
1083
- EXTENSIONS = GL.GL_EXTENSIONS;
1080
+ FASTEST = GL.GL_FASTEST;
1081
+ NICEST = GL.GL_NICEST;
1082
+ DONT_CARE = GL.GL_DONT_CARE;
1083
+
1084
+ VENDOR = GL.GL_VENDOR;
1085
+ RENDERER = GL.GL_RENDERER;
1086
+ VERSION = GL.GL_VERSION;
1087
+ EXTENSIONS = GL.GL_EXTENSIONS;
1084
1088
  SHADING_LANGUAGE_VERSION = GL2ES2.GL_SHADING_LANGUAGE_VERSION;
1085
1089
 
1086
1090
  MAX_SAMPLES = GL.GL_MAX_SAMPLES;
1087
- SAMPLES = GL.GL_SAMPLES;
1091
+ SAMPLES = GL.GL_SAMPLES;
1088
1092
 
1089
1093
  ALIASED_LINE_WIDTH_RANGE = GL.GL_ALIASED_LINE_WIDTH_RANGE;
1090
1094
  ALIASED_POINT_SIZE_RANGE = GL.GL_ALIASED_POINT_SIZE_RANGE;
1091
1095
 
1092
- DEPTH_BITS = GL.GL_DEPTH_BITS;
1096
+ DEPTH_BITS = GL.GL_DEPTH_BITS;
1093
1097
  STENCIL_BITS = GL.GL_STENCIL_BITS;
1094
1098
 
1095
1099
  CCW = GL.GL_CCW;
1096
- CW = GL.GL_CW;
1100
+ CW = GL.GL_CW;
1097
1101
 
1098
1102
  VIEWPORT = GL.GL_VIEWPORT;
1099
1103
 
1100
- ARRAY_BUFFER = GL.GL_ARRAY_BUFFER;
1104
+ ARRAY_BUFFER = GL.GL_ARRAY_BUFFER;
1101
1105
  ELEMENT_ARRAY_BUFFER = GL.GL_ELEMENT_ARRAY_BUFFER;
1102
- PIXEL_PACK_BUFFER = GL2ES3.GL_PIXEL_PACK_BUFFER;
1106
+ PIXEL_PACK_BUFFER = GL2ES3.GL_PIXEL_PACK_BUFFER;
1103
1107
 
1104
- MAX_VERTEX_ATTRIBS = GL2ES2.GL_MAX_VERTEX_ATTRIBS;
1108
+ MAX_VERTEX_ATTRIBS = GL2ES2.GL_MAX_VERTEX_ATTRIBS;
1105
1109
 
1106
- STATIC_DRAW = GL.GL_STATIC_DRAW;
1110
+ STATIC_DRAW = GL.GL_STATIC_DRAW;
1107
1111
  DYNAMIC_DRAW = GL.GL_DYNAMIC_DRAW;
1108
- STREAM_DRAW = GL2ES2.GL_STREAM_DRAW;
1109
- STREAM_READ = GL2ES3.GL_STREAM_READ;
1112
+ STREAM_DRAW = GL2ES2.GL_STREAM_DRAW;
1113
+ STREAM_READ = GL2ES3.GL_STREAM_READ;
1110
1114
 
1111
- BUFFER_SIZE = GL.GL_BUFFER_SIZE;
1115
+ BUFFER_SIZE = GL.GL_BUFFER_SIZE;
1112
1116
  BUFFER_USAGE = GL.GL_BUFFER_USAGE;
1113
1117
 
1114
- POINTS = GL.GL_POINTS;
1115
- LINE_STRIP = GL.GL_LINE_STRIP;
1116
- LINE_LOOP = GL.GL_LINE_LOOP;
1117
- LINES = GL.GL_LINES;
1118
- TRIANGLE_FAN = GL.GL_TRIANGLE_FAN;
1118
+ POINTS = GL.GL_POINTS;
1119
+ LINE_STRIP = GL.GL_LINE_STRIP;
1120
+ LINE_LOOP = GL.GL_LINE_LOOP;
1121
+ LINES = GL.GL_LINES;
1122
+ TRIANGLE_FAN = GL.GL_TRIANGLE_FAN;
1119
1123
  TRIANGLE_STRIP = GL.GL_TRIANGLE_STRIP;
1120
- TRIANGLES = GL.GL_TRIANGLES;
1124
+ TRIANGLES = GL.GL_TRIANGLES;
1121
1125
 
1122
- CULL_FACE = GL.GL_CULL_FACE;
1123
- FRONT = GL.GL_FRONT;
1124
- BACK = GL.GL_BACK;
1126
+ CULL_FACE = GL.GL_CULL_FACE;
1127
+ FRONT = GL.GL_FRONT;
1128
+ BACK = GL.GL_BACK;
1125
1129
  FRONT_AND_BACK = GL.GL_FRONT_AND_BACK;
1126
1130
 
1127
1131
  POLYGON_OFFSET_FILL = GL.GL_POLYGON_OFFSET_FILL;
1128
1132
 
1129
1133
  UNPACK_ALIGNMENT = GL.GL_UNPACK_ALIGNMENT;
1130
- PACK_ALIGNMENT = GL.GL_PACK_ALIGNMENT;
1134
+ PACK_ALIGNMENT = GL.GL_PACK_ALIGNMENT;
1131
1135
 
1132
- TEXTURE_2D = GL.GL_TEXTURE_2D;
1136
+ TEXTURE_2D = GL.GL_TEXTURE_2D;
1133
1137
  TEXTURE_RECTANGLE = GL2GL3.GL_TEXTURE_RECTANGLE;
1134
1138
 
1135
- TEXTURE_BINDING_2D = GL.GL_TEXTURE_BINDING_2D;
1139
+ TEXTURE_BINDING_2D = GL.GL_TEXTURE_BINDING_2D;
1136
1140
  TEXTURE_BINDING_RECTANGLE = GL2GL3.GL_TEXTURE_BINDING_RECTANGLE;
1137
1141
 
1138
- MAX_TEXTURE_SIZE = GL.GL_MAX_TEXTURE_SIZE;
1139
- TEXTURE_MAX_ANISOTROPY = GL.GL_TEXTURE_MAX_ANISOTROPY_EXT;
1142
+ MAX_TEXTURE_SIZE = GL.GL_MAX_TEXTURE_SIZE;
1143
+ TEXTURE_MAX_ANISOTROPY = GL.GL_TEXTURE_MAX_ANISOTROPY_EXT;
1140
1144
  MAX_TEXTURE_MAX_ANISOTROPY = GL.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT;
1141
1145
 
1142
- MAX_VERTEX_TEXTURE_IMAGE_UNITS = GL2ES2.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS;
1143
- MAX_TEXTURE_IMAGE_UNITS = GL2ES2.GL_MAX_TEXTURE_IMAGE_UNITS;
1146
+ MAX_VERTEX_TEXTURE_IMAGE_UNITS = GL2ES2.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS;
1147
+ MAX_TEXTURE_IMAGE_UNITS = GL2ES2.GL_MAX_TEXTURE_IMAGE_UNITS;
1144
1148
  MAX_COMBINED_TEXTURE_IMAGE_UNITS = GL2ES2.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS;
1145
1149
 
1146
1150
  NUM_COMPRESSED_TEXTURE_FORMATS = GL.GL_NUM_COMPRESSED_TEXTURE_FORMATS;
1147
- COMPRESSED_TEXTURE_FORMATS = GL.GL_COMPRESSED_TEXTURE_FORMATS;
1151
+ COMPRESSED_TEXTURE_FORMATS = GL.GL_COMPRESSED_TEXTURE_FORMATS;
1148
1152
 
1149
- NEAREST = GL.GL_NEAREST;
1150
- LINEAR = GL.GL_LINEAR;
1153
+ NEAREST = GL.GL_NEAREST;
1154
+ LINEAR = GL.GL_LINEAR;
1151
1155
  LINEAR_MIPMAP_NEAREST = GL.GL_LINEAR_MIPMAP_NEAREST;
1152
- LINEAR_MIPMAP_LINEAR = GL.GL_LINEAR_MIPMAP_LINEAR;
1156
+ LINEAR_MIPMAP_LINEAR = GL.GL_LINEAR_MIPMAP_LINEAR;
1153
1157
 
1154
1158
  CLAMP_TO_EDGE = GL.GL_CLAMP_TO_EDGE;
1155
- REPEAT = GL.GL_REPEAT;
1159
+ REPEAT = GL.GL_REPEAT;
1156
1160
 
1157
- TEXTURE0 = GL.GL_TEXTURE0;
1158
- TEXTURE1 = GL.GL_TEXTURE1;
1159
- TEXTURE2 = GL.GL_TEXTURE2;
1160
- TEXTURE3 = GL.GL_TEXTURE3;
1161
+ TEXTURE0 = GL.GL_TEXTURE0;
1162
+ TEXTURE1 = GL.GL_TEXTURE1;
1163
+ TEXTURE2 = GL.GL_TEXTURE2;
1164
+ TEXTURE3 = GL.GL_TEXTURE3;
1161
1165
  TEXTURE_MIN_FILTER = GL.GL_TEXTURE_MIN_FILTER;
1162
1166
  TEXTURE_MAG_FILTER = GL.GL_TEXTURE_MAG_FILTER;
1163
- TEXTURE_WRAP_S = GL.GL_TEXTURE_WRAP_S;
1164
- TEXTURE_WRAP_T = GL.GL_TEXTURE_WRAP_T;
1165
- TEXTURE_WRAP_R = GL2ES2.GL_TEXTURE_WRAP_R;
1167
+ TEXTURE_WRAP_S = GL.GL_TEXTURE_WRAP_S;
1168
+ TEXTURE_WRAP_T = GL.GL_TEXTURE_WRAP_T;
1169
+ TEXTURE_WRAP_R = GL2ES2.GL_TEXTURE_WRAP_R;
1166
1170
 
1167
1171
  TEXTURE_CUBE_MAP = GL.GL_TEXTURE_CUBE_MAP;
1168
1172
  TEXTURE_CUBE_MAP_POSITIVE_X = GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X;
@@ -1172,204 +1176,198 @@ public class PJOGL extends PGL {
1172
1176
  TEXTURE_CUBE_MAP_NEGATIVE_Y = GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y;
1173
1177
  TEXTURE_CUBE_MAP_NEGATIVE_Z = GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z;
1174
1178
 
1175
- VERTEX_SHADER = GL2ES2.GL_VERTEX_SHADER;
1176
- FRAGMENT_SHADER = GL2ES2.GL_FRAGMENT_SHADER;
1177
- INFO_LOG_LENGTH = GL2ES2.GL_INFO_LOG_LENGTH;
1179
+ VERTEX_SHADER = GL2ES2.GL_VERTEX_SHADER;
1180
+ FRAGMENT_SHADER = GL2ES2.GL_FRAGMENT_SHADER;
1181
+ INFO_LOG_LENGTH = GL2ES2.GL_INFO_LOG_LENGTH;
1178
1182
  SHADER_SOURCE_LENGTH = GL2ES2.GL_SHADER_SOURCE_LENGTH;
1179
- COMPILE_STATUS = GL2ES2.GL_COMPILE_STATUS;
1180
- LINK_STATUS = GL2ES2.GL_LINK_STATUS;
1181
- VALIDATE_STATUS = GL2ES2.GL_VALIDATE_STATUS;
1182
- SHADER_TYPE = GL2ES2.GL_SHADER_TYPE;
1183
- DELETE_STATUS = GL2ES2.GL_DELETE_STATUS;
1184
-
1185
- FLOAT_VEC2 = GL2ES2.GL_FLOAT_VEC2;
1186
- FLOAT_VEC3 = GL2ES2.GL_FLOAT_VEC3;
1187
- FLOAT_VEC4 = GL2ES2.GL_FLOAT_VEC4;
1188
- FLOAT_MAT2 = GL2ES2.GL_FLOAT_MAT2;
1189
- FLOAT_MAT3 = GL2ES2.GL_FLOAT_MAT3;
1190
- FLOAT_MAT4 = GL2ES2.GL_FLOAT_MAT4;
1191
- INT_VEC2 = GL2ES2.GL_INT_VEC2;
1192
- INT_VEC3 = GL2ES2.GL_INT_VEC3;
1193
- INT_VEC4 = GL2ES2.GL_INT_VEC4;
1194
- BOOL_VEC2 = GL2ES2.GL_BOOL_VEC2;
1195
- BOOL_VEC3 = GL2ES2.GL_BOOL_VEC3;
1196
- BOOL_VEC4 = GL2ES2.GL_BOOL_VEC4;
1197
- SAMPLER_2D = GL2ES2.GL_SAMPLER_2D;
1183
+ COMPILE_STATUS = GL2ES2.GL_COMPILE_STATUS;
1184
+ LINK_STATUS = GL2ES2.GL_LINK_STATUS;
1185
+ VALIDATE_STATUS = GL2ES2.GL_VALIDATE_STATUS;
1186
+ SHADER_TYPE = GL2ES2.GL_SHADER_TYPE;
1187
+ DELETE_STATUS = GL2ES2.GL_DELETE_STATUS;
1188
+
1189
+ FLOAT_VEC2 = GL2ES2.GL_FLOAT_VEC2;
1190
+ FLOAT_VEC3 = GL2ES2.GL_FLOAT_VEC3;
1191
+ FLOAT_VEC4 = GL2ES2.GL_FLOAT_VEC4;
1192
+ FLOAT_MAT2 = GL2ES2.GL_FLOAT_MAT2;
1193
+ FLOAT_MAT3 = GL2ES2.GL_FLOAT_MAT3;
1194
+ FLOAT_MAT4 = GL2ES2.GL_FLOAT_MAT4;
1195
+ INT_VEC2 = GL2ES2.GL_INT_VEC2;
1196
+ INT_VEC3 = GL2ES2.GL_INT_VEC3;
1197
+ INT_VEC4 = GL2ES2.GL_INT_VEC4;
1198
+ BOOL_VEC2 = GL2ES2.GL_BOOL_VEC2;
1199
+ BOOL_VEC3 = GL2ES2.GL_BOOL_VEC3;
1200
+ BOOL_VEC4 = GL2ES2.GL_BOOL_VEC4;
1201
+ SAMPLER_2D = GL2ES2.GL_SAMPLER_2D;
1198
1202
  SAMPLER_CUBE = GL2ES2.GL_SAMPLER_CUBE;
1199
1203
 
1200
- LOW_FLOAT = GL2ES2.GL_LOW_FLOAT;
1204
+ LOW_FLOAT = GL2ES2.GL_LOW_FLOAT;
1201
1205
  MEDIUM_FLOAT = GL2ES2.GL_MEDIUM_FLOAT;
1202
- HIGH_FLOAT = GL2ES2.GL_HIGH_FLOAT;
1203
- LOW_INT = GL2ES2.GL_LOW_INT;
1204
- MEDIUM_INT = GL2ES2.GL_MEDIUM_INT;
1205
- HIGH_INT = GL2ES2.GL_HIGH_INT;
1206
+ HIGH_FLOAT = GL2ES2.GL_HIGH_FLOAT;
1207
+ LOW_INT = GL2ES2.GL_LOW_INT;
1208
+ MEDIUM_INT = GL2ES2.GL_MEDIUM_INT;
1209
+ HIGH_INT = GL2ES2.GL_HIGH_INT;
1206
1210
 
1207
1211
  CURRENT_VERTEX_ATTRIB = GL2ES2.GL_CURRENT_VERTEX_ATTRIB;
1208
1212
 
1209
1213
  VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING;
1210
- VERTEX_ATTRIB_ARRAY_ENABLED = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_ENABLED;
1211
- VERTEX_ATTRIB_ARRAY_SIZE = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_SIZE;
1212
- VERTEX_ATTRIB_ARRAY_STRIDE = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_STRIDE;
1213
- VERTEX_ATTRIB_ARRAY_TYPE = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_TYPE;
1214
- VERTEX_ATTRIB_ARRAY_NORMALIZED = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED;
1215
- VERTEX_ATTRIB_ARRAY_POINTER = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_POINTER;
1216
-
1217
- BLEND = GL.GL_BLEND;
1218
- ONE = GL.GL_ONE;
1219
- ZERO = GL.GL_ZERO;
1220
- SRC_ALPHA = GL.GL_SRC_ALPHA;
1221
- DST_ALPHA = GL.GL_DST_ALPHA;
1214
+ VERTEX_ATTRIB_ARRAY_ENABLED = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_ENABLED;
1215
+ VERTEX_ATTRIB_ARRAY_SIZE = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_SIZE;
1216
+ VERTEX_ATTRIB_ARRAY_STRIDE = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_STRIDE;
1217
+ VERTEX_ATTRIB_ARRAY_TYPE = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_TYPE;
1218
+ VERTEX_ATTRIB_ARRAY_NORMALIZED = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED;
1219
+ VERTEX_ATTRIB_ARRAY_POINTER = GL2ES2.GL_VERTEX_ATTRIB_ARRAY_POINTER;
1220
+
1221
+ BLEND = GL.GL_BLEND;
1222
+ ONE = GL.GL_ONE;
1223
+ ZERO = GL.GL_ZERO;
1224
+ SRC_ALPHA = GL.GL_SRC_ALPHA;
1225
+ DST_ALPHA = GL.GL_DST_ALPHA;
1222
1226
  ONE_MINUS_SRC_ALPHA = GL.GL_ONE_MINUS_SRC_ALPHA;
1223
1227
  ONE_MINUS_DST_COLOR = GL.GL_ONE_MINUS_DST_COLOR;
1224
1228
  ONE_MINUS_SRC_COLOR = GL.GL_ONE_MINUS_SRC_COLOR;
1225
- DST_COLOR = GL.GL_DST_COLOR;
1226
- SRC_COLOR = GL.GL_SRC_COLOR;
1229
+ DST_COLOR = GL.GL_DST_COLOR;
1230
+ SRC_COLOR = GL.GL_SRC_COLOR;
1227
1231
 
1228
1232
  SAMPLE_ALPHA_TO_COVERAGE = GL.GL_SAMPLE_ALPHA_TO_COVERAGE;
1229
- SAMPLE_COVERAGE = GL.GL_SAMPLE_COVERAGE;
1233
+ SAMPLE_COVERAGE = GL.GL_SAMPLE_COVERAGE;
1230
1234
 
1231
- KEEP = GL.GL_KEEP;
1232
- REPLACE = GL.GL_REPLACE;
1233
- INCR = GL.GL_INCR;
1234
- DECR = GL.GL_DECR;
1235
- INVERT = GL.GL_INVERT;
1235
+ KEEP = GL.GL_KEEP;
1236
+ REPLACE = GL.GL_REPLACE;
1237
+ INCR = GL.GL_INCR;
1238
+ DECR = GL.GL_DECR;
1239
+ INVERT = GL.GL_INVERT;
1236
1240
  INCR_WRAP = GL.GL_INCR_WRAP;
1237
1241
  DECR_WRAP = GL.GL_DECR_WRAP;
1238
- NEVER = GL.GL_NEVER;
1239
- ALWAYS = GL.GL_ALWAYS;
1240
-
1241
- EQUAL = GL.GL_EQUAL;
1242
- LESS = GL.GL_LESS;
1243
- LEQUAL = GL.GL_LEQUAL;
1244
- GREATER = GL.GL_GREATER;
1245
- GEQUAL = GL.GL_GEQUAL;
1242
+ NEVER = GL.GL_NEVER;
1243
+ ALWAYS = GL.GL_ALWAYS;
1244
+
1245
+ EQUAL = GL.GL_EQUAL;
1246
+ LESS = GL.GL_LESS;
1247
+ LEQUAL = GL.GL_LEQUAL;
1248
+ GREATER = GL.GL_GREATER;
1249
+ GEQUAL = GL.GL_GEQUAL;
1246
1250
  NOTEQUAL = GL.GL_NOTEQUAL;
1247
1251
 
1248
- FUNC_ADD = GL.GL_FUNC_ADD;
1249
- FUNC_MIN = GL2ES3.GL_MIN;
1250
- FUNC_MAX = GL2ES3.GL_MAX;
1252
+ FUNC_ADD = GL.GL_FUNC_ADD;
1253
+ FUNC_MIN = GL2ES3.GL_MIN;
1254
+ FUNC_MAX = GL2ES3.GL_MAX;
1251
1255
  FUNC_REVERSE_SUBTRACT = GL.GL_FUNC_REVERSE_SUBTRACT;
1252
- FUNC_SUBTRACT = GL.GL_FUNC_SUBTRACT;
1256
+ FUNC_SUBTRACT = GL.GL_FUNC_SUBTRACT;
1253
1257
 
1254
1258
  DITHER = GL.GL_DITHER;
1255
1259
 
1256
- CONSTANT_COLOR = GL2ES2.GL_CONSTANT_COLOR;
1257
- CONSTANT_ALPHA = GL2ES2.GL_CONSTANT_ALPHA;
1260
+ CONSTANT_COLOR = GL2ES2.GL_CONSTANT_COLOR;
1261
+ CONSTANT_ALPHA = GL2ES2.GL_CONSTANT_ALPHA;
1258
1262
  ONE_MINUS_CONSTANT_COLOR = GL2ES2.GL_ONE_MINUS_CONSTANT_COLOR;
1259
1263
  ONE_MINUS_CONSTANT_ALPHA = GL2ES2.GL_ONE_MINUS_CONSTANT_ALPHA;
1260
- SRC_ALPHA_SATURATE = GL.GL_SRC_ALPHA_SATURATE;
1264
+ SRC_ALPHA_SATURATE = GL.GL_SRC_ALPHA_SATURATE;
1261
1265
 
1262
- SCISSOR_TEST = GL.GL_SCISSOR_TEST;
1263
- STENCIL_TEST = GL.GL_STENCIL_TEST;
1264
- DEPTH_TEST = GL.GL_DEPTH_TEST;
1266
+ SCISSOR_TEST = GL.GL_SCISSOR_TEST;
1267
+ STENCIL_TEST = GL.GL_STENCIL_TEST;
1268
+ DEPTH_TEST = GL.GL_DEPTH_TEST;
1265
1269
  DEPTH_WRITEMASK = GL.GL_DEPTH_WRITEMASK;
1266
1270
 
1267
- COLOR_BUFFER_BIT = GL.GL_COLOR_BUFFER_BIT;
1268
- DEPTH_BUFFER_BIT = GL.GL_DEPTH_BUFFER_BIT;
1271
+ COLOR_BUFFER_BIT = GL.GL_COLOR_BUFFER_BIT;
1272
+ DEPTH_BUFFER_BIT = GL.GL_DEPTH_BUFFER_BIT;
1269
1273
  STENCIL_BUFFER_BIT = GL.GL_STENCIL_BUFFER_BIT;
1270
1274
 
1271
- FRAMEBUFFER = GL.GL_FRAMEBUFFER;
1272
- COLOR_ATTACHMENT0 = GL.GL_COLOR_ATTACHMENT0;
1273
- COLOR_ATTACHMENT1 = GL2ES2.GL_COLOR_ATTACHMENT1;
1274
- COLOR_ATTACHMENT2 = GL2ES2.GL_COLOR_ATTACHMENT2;
1275
- COLOR_ATTACHMENT3 = GL2ES2.GL_COLOR_ATTACHMENT3;
1276
- RENDERBUFFER = GL.GL_RENDERBUFFER;
1277
- DEPTH_ATTACHMENT = GL.GL_DEPTH_ATTACHMENT;
1275
+ FRAMEBUFFER = GL.GL_FRAMEBUFFER;
1276
+ COLOR_ATTACHMENT0 = GL.GL_COLOR_ATTACHMENT0;
1277
+ COLOR_ATTACHMENT1 = GL2ES2.GL_COLOR_ATTACHMENT1;
1278
+ COLOR_ATTACHMENT2 = GL2ES2.GL_COLOR_ATTACHMENT2;
1279
+ COLOR_ATTACHMENT3 = GL2ES2.GL_COLOR_ATTACHMENT3;
1280
+ RENDERBUFFER = GL.GL_RENDERBUFFER;
1281
+ DEPTH_ATTACHMENT = GL.GL_DEPTH_ATTACHMENT;
1278
1282
  STENCIL_ATTACHMENT = GL.GL_STENCIL_ATTACHMENT;
1279
- READ_FRAMEBUFFER = GL.GL_READ_FRAMEBUFFER;
1280
- DRAW_FRAMEBUFFER = GL.GL_DRAW_FRAMEBUFFER;
1283
+ READ_FRAMEBUFFER = GL.GL_READ_FRAMEBUFFER;
1284
+ DRAW_FRAMEBUFFER = GL.GL_DRAW_FRAMEBUFFER;
1281
1285
 
1282
- RGBA8 = GL.GL_RGBA8;
1286
+ RGBA8 = GL.GL_RGBA8;
1283
1287
  DEPTH24_STENCIL8 = GL.GL_DEPTH24_STENCIL8;
1284
1288
 
1285
- DEPTH_COMPONENT = GL2ES2.GL_DEPTH_COMPONENT;
1289
+ DEPTH_COMPONENT = GL2ES2.GL_DEPTH_COMPONENT;
1286
1290
  DEPTH_COMPONENT16 = GL.GL_DEPTH_COMPONENT16;
1287
1291
  DEPTH_COMPONENT24 = GL.GL_DEPTH_COMPONENT24;
1288
1292
  DEPTH_COMPONENT32 = GL.GL_DEPTH_COMPONENT32;
1289
1293
 
1290
- STENCIL_INDEX = GL2ES2.GL_STENCIL_INDEX;
1294
+ STENCIL_INDEX = GL2ES2.GL_STENCIL_INDEX;
1291
1295
  STENCIL_INDEX1 = GL.GL_STENCIL_INDEX1;
1292
1296
  STENCIL_INDEX4 = GL.GL_STENCIL_INDEX4;
1293
1297
  STENCIL_INDEX8 = GL.GL_STENCIL_INDEX8;
1294
1298
 
1295
1299
  DEPTH_STENCIL = GL.GL_DEPTH_STENCIL;
1296
1300
 
1297
- FRAMEBUFFER_COMPLETE = GL.GL_FRAMEBUFFER_COMPLETE;
1298
- FRAMEBUFFER_UNDEFINED = GL2ES3.GL_FRAMEBUFFER_UNDEFINED;
1299
- FRAMEBUFFER_INCOMPLETE_ATTACHMENT = GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
1301
+ FRAMEBUFFER_COMPLETE = GL.GL_FRAMEBUFFER_COMPLETE;
1302
+ FRAMEBUFFER_UNDEFINED = GL2ES3.GL_FRAMEBUFFER_UNDEFINED;
1303
+ FRAMEBUFFER_INCOMPLETE_ATTACHMENT = GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
1300
1304
  FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
1301
- FRAMEBUFFER_INCOMPLETE_DIMENSIONS = GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS;
1302
- FRAMEBUFFER_INCOMPLETE_FORMATS = GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS;
1303
- FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER;
1304
- FRAMEBUFFER_INCOMPLETE_READ_BUFFER = GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER;
1305
- FRAMEBUFFER_UNSUPPORTED = GL.GL_FRAMEBUFFER_UNSUPPORTED;
1306
- FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = GL.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE;
1307
- FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = GL3ES3.GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS;
1308
-
1309
- FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = GL.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE;
1310
- FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = GL.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME;
1311
- FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = GL.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL;
1305
+ FRAMEBUFFER_INCOMPLETE_DIMENSIONS = GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS;
1306
+ FRAMEBUFFER_INCOMPLETE_FORMATS = GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS;
1307
+ FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER;
1308
+ FRAMEBUFFER_INCOMPLETE_READ_BUFFER = GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER;
1309
+ FRAMEBUFFER_UNSUPPORTED = GL.GL_FRAMEBUFFER_UNSUPPORTED;
1310
+ FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = GL.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE;
1311
+ FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = GL3ES3.GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS;
1312
+
1313
+ FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = GL.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE;
1314
+ FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = GL.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME;
1315
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = GL.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL;
1312
1316
  FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = GL.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE;
1313
1317
 
1314
- RENDERBUFFER_WIDTH = GL.GL_RENDERBUFFER_WIDTH;
1315
- RENDERBUFFER_HEIGHT = GL.GL_RENDERBUFFER_HEIGHT;
1316
- RENDERBUFFER_RED_SIZE = GL.GL_RENDERBUFFER_RED_SIZE;
1317
- RENDERBUFFER_GREEN_SIZE = GL.GL_RENDERBUFFER_GREEN_SIZE;
1318
- RENDERBUFFER_BLUE_SIZE = GL.GL_RENDERBUFFER_BLUE_SIZE;
1319
- RENDERBUFFER_ALPHA_SIZE = GL.GL_RENDERBUFFER_ALPHA_SIZE;
1320
- RENDERBUFFER_DEPTH_SIZE = GL.GL_RENDERBUFFER_DEPTH_SIZE;
1321
- RENDERBUFFER_STENCIL_SIZE = GL.GL_RENDERBUFFER_STENCIL_SIZE;
1318
+ RENDERBUFFER_WIDTH = GL.GL_RENDERBUFFER_WIDTH;
1319
+ RENDERBUFFER_HEIGHT = GL.GL_RENDERBUFFER_HEIGHT;
1320
+ RENDERBUFFER_RED_SIZE = GL.GL_RENDERBUFFER_RED_SIZE;
1321
+ RENDERBUFFER_GREEN_SIZE = GL.GL_RENDERBUFFER_GREEN_SIZE;
1322
+ RENDERBUFFER_BLUE_SIZE = GL.GL_RENDERBUFFER_BLUE_SIZE;
1323
+ RENDERBUFFER_ALPHA_SIZE = GL.GL_RENDERBUFFER_ALPHA_SIZE;
1324
+ RENDERBUFFER_DEPTH_SIZE = GL.GL_RENDERBUFFER_DEPTH_SIZE;
1325
+ RENDERBUFFER_STENCIL_SIZE = GL.GL_RENDERBUFFER_STENCIL_SIZE;
1322
1326
  RENDERBUFFER_INTERNAL_FORMAT = GL.GL_RENDERBUFFER_INTERNAL_FORMAT;
1323
1327
 
1324
- MULTISAMPLE = GL.GL_MULTISAMPLE;
1325
- LINE_SMOOTH = GL.GL_LINE_SMOOTH;
1328
+ MULTISAMPLE = GL.GL_MULTISAMPLE;
1329
+ LINE_SMOOTH = GL.GL_LINE_SMOOTH;
1326
1330
  POLYGON_SMOOTH = GL2GL3.GL_POLYGON_SMOOTH;
1327
1331
 
1328
1332
  SYNC_GPU_COMMANDS_COMPLETE = GL3ES3.GL_SYNC_GPU_COMMANDS_COMPLETE;
1329
- ALREADY_SIGNALED = GL3ES3.GL_ALREADY_SIGNALED;
1330
- CONDITION_SATISFIED = GL3ES3.GL_CONDITION_SATISFIED;
1333
+ ALREADY_SIGNALED = GL3ES3.GL_ALREADY_SIGNALED;
1334
+ CONDITION_SATISFIED = GL3ES3.GL_CONDITION_SATISFIED;
1331
1335
  }
1332
1336
 
1333
1337
  ///////////////////////////////////////////////////////////
1334
-
1335
1338
  // Special Functions
1336
-
1337
- /**
1338
- *
1339
- */
1340
-
1339
+ /**
1340
+ *
1341
+ */
1341
1342
  @Override
1342
1343
  public void flush() {
1343
1344
  gl.glFlush();
1344
1345
  }
1345
1346
 
1346
- /**
1347
- *
1348
- */
1349
- @Override
1347
+ /**
1348
+ *
1349
+ */
1350
+ @Override
1350
1351
  public void finish() {
1351
1352
  gl.glFinish();
1352
1353
  }
1353
1354
 
1354
- /**
1355
- *
1356
- * @param target
1357
- * @param hint
1358
- */
1359
- @Override
1355
+ /**
1356
+ *
1357
+ * @param target
1358
+ * @param hint
1359
+ */
1360
+ @Override
1360
1361
  public void hint(int target, int hint) {
1361
1362
  gl.glHint(target, hint);
1362
1363
  }
1363
1364
 
1364
1365
  ///////////////////////////////////////////////////////////
1365
-
1366
1366
  // State and State Requests
1367
-
1368
- /**
1369
- *
1370
- * @param value
1371
- */
1372
-
1367
+ /**
1368
+ *
1369
+ * @param value
1370
+ */
1373
1371
  @Override
1374
1372
  public void enable(int value) {
1375
1373
  if (-1 < value) {
@@ -1377,23 +1375,23 @@ public class PJOGL extends PGL {
1377
1375
  }
1378
1376
  }
1379
1377
 
1380
- /**
1381
- *
1382
- * @param value
1383
- */
1384
- @Override
1378
+ /**
1379
+ *
1380
+ * @param value
1381
+ */
1382
+ @Override
1385
1383
  public void disable(int value) {
1386
1384
  if (-1 < value) {
1387
1385
  gl.glDisable(value);
1388
1386
  }
1389
1387
  }
1390
1388
 
1391
- /**
1392
- *
1393
- * @param value
1394
- * @param data
1395
- */
1396
- @Override
1389
+ /**
1390
+ *
1391
+ * @param value
1392
+ * @param data
1393
+ */
1394
+ @Override
1397
1395
  public void getBooleanv(int value, IntBuffer data) {
1398
1396
  if (-1 < value) {
1399
1397
  if (byteBuffer.capacity() < data.capacity()) {
@@ -1408,12 +1406,12 @@ public class PJOGL extends PGL {
1408
1406
  }
1409
1407
  }
1410
1408
 
1411
- /**
1412
- *
1413
- * @param value
1414
- * @param data
1415
- */
1416
- @Override
1409
+ /**
1410
+ *
1411
+ * @param value
1412
+ * @param data
1413
+ */
1414
+ @Override
1417
1415
  public void getIntegerv(int value, IntBuffer data) {
1418
1416
  if (-1 < value) {
1419
1417
  gl.glGetIntegerv(value, data);
@@ -1422,12 +1420,12 @@ public class PJOGL extends PGL {
1422
1420
  }
1423
1421
  }
1424
1422
 
1425
- /**
1426
- *
1427
- * @param value
1428
- * @param data
1429
- */
1430
- @Override
1423
+ /**
1424
+ *
1425
+ * @param value
1426
+ * @param data
1427
+ */
1428
+ @Override
1431
1429
  public void getFloatv(int value, FloatBuffer data) {
1432
1430
  if (-1 < value) {
1433
1431
  gl.glGetFloatv(value, data);
@@ -1436,149 +1434,143 @@ public class PJOGL extends PGL {
1436
1434
  }
1437
1435
  }
1438
1436
 
1439
- /**
1440
- *
1441
- * @param value
1442
- * @return
1443
- */
1444
- @Override
1437
+ /**
1438
+ *
1439
+ * @param value
1440
+ * @return
1441
+ */
1442
+ @Override
1445
1443
  public boolean isEnabled(int value) {
1446
1444
  return gl.glIsEnabled(value);
1447
1445
  }
1448
1446
 
1449
- /**
1450
- *
1451
- * @param name
1452
- * @return
1453
- */
1454
- @Override
1447
+ /**
1448
+ *
1449
+ * @param name
1450
+ * @return
1451
+ */
1452
+ @Override
1455
1453
  public String getString(int name) {
1456
1454
  return gl.glGetString(name);
1457
1455
  }
1458
1456
 
1459
1457
  ///////////////////////////////////////////////////////////
1460
-
1461
1458
  // Error Handling
1462
-
1463
- /**
1464
- *
1465
- * @return
1466
- */
1467
-
1459
+ /**
1460
+ *
1461
+ * @return
1462
+ */
1468
1463
  @Override
1469
1464
  public int getError() {
1470
1465
  return gl.glGetError();
1471
1466
  }
1472
1467
 
1473
- /**
1474
- *
1475
- * @param err
1476
- * @return
1477
- */
1478
- @Override
1468
+ /**
1469
+ *
1470
+ * @param err
1471
+ * @return
1472
+ */
1473
+ @Override
1479
1474
  public String errorString(int err) {
1480
1475
  return glu.gluErrorString(err);
1481
1476
  }
1482
1477
 
1483
1478
  //////////////////////////////////////////////////////////////////////////////
1484
-
1485
1479
  // Buffer Objects
1486
-
1487
- /**
1488
- *
1489
- * @param n
1490
- * @param buffers
1491
- */
1492
-
1480
+ /**
1481
+ *
1482
+ * @param n
1483
+ * @param buffers
1484
+ */
1493
1485
  @Override
1494
1486
  public void genBuffers(int n, IntBuffer buffers) {
1495
1487
  gl.glGenBuffers(n, buffers);
1496
1488
  }
1497
1489
 
1498
- /**
1499
- *
1500
- * @param n
1501
- * @param buffers
1502
- */
1503
- @Override
1490
+ /**
1491
+ *
1492
+ * @param n
1493
+ * @param buffers
1494
+ */
1495
+ @Override
1504
1496
  public void deleteBuffers(int n, IntBuffer buffers) {
1505
1497
  gl.glDeleteBuffers(n, buffers);
1506
1498
  }
1507
1499
 
1508
- /**
1509
- *
1510
- * @param target
1511
- * @param buffer
1512
- */
1513
- @Override
1500
+ /**
1501
+ *
1502
+ * @param target
1503
+ * @param buffer
1504
+ */
1505
+ @Override
1514
1506
  public void bindBuffer(int target, int buffer) {
1515
1507
  gl.glBindBuffer(target, buffer);
1516
1508
  }
1517
1509
 
1518
- /**
1519
- *
1520
- * @param target
1521
- * @param size
1522
- * @param data
1523
- * @param usage
1524
- */
1525
- @Override
1510
+ /**
1511
+ *
1512
+ * @param target
1513
+ * @param size
1514
+ * @param data
1515
+ * @param usage
1516
+ */
1517
+ @Override
1526
1518
  public void bufferData(int target, int size, Buffer data, int usage) {
1527
1519
  gl.glBufferData(target, size, data, usage);
1528
1520
  }
1529
1521
 
1530
- /**
1531
- *
1532
- * @param target
1533
- * @param offset
1534
- * @param size
1535
- * @param data
1536
- */
1537
- @Override
1522
+ /**
1523
+ *
1524
+ * @param target
1525
+ * @param offset
1526
+ * @param size
1527
+ * @param data
1528
+ */
1529
+ @Override
1538
1530
  public void bufferSubData(int target, int offset, int size, Buffer data) {
1539
1531
  gl.glBufferSubData(target, offset, size, data);
1540
1532
  }
1541
1533
 
1542
- /**
1543
- *
1544
- * @param buffer
1545
- */
1546
- @Override
1534
+ /**
1535
+ *
1536
+ * @param buffer
1537
+ */
1538
+ @Override
1547
1539
  public void isBuffer(int buffer) {
1548
1540
  gl.glIsBuffer(buffer);
1549
1541
  }
1550
1542
 
1551
- /**
1552
- *
1553
- * @param target
1554
- * @param value
1555
- * @param data
1556
- */
1557
- @Override
1543
+ /**
1544
+ *
1545
+ * @param target
1546
+ * @param value
1547
+ * @param data
1548
+ */
1549
+ @Override
1558
1550
  public void getBufferParameteriv(int target, int value, IntBuffer data) {
1559
1551
  gl.glGetBufferParameteriv(target, value, data);
1560
1552
  }
1561
1553
 
1562
- /**
1563
- *
1564
- * @param target
1565
- * @param access
1566
- * @return
1567
- */
1568
- @Override
1569
- public ByteBuffer mapBuffer(int target, int access) {
1570
- return gl2.glMapBuffer(target, access);
1554
+ /**
1555
+ *
1556
+ * @param target
1557
+ * @param access
1558
+ * @return
1559
+ */
1560
+ @Override
1561
+ public ByteBuffer mapBuffer(int target, int access) {
1562
+ return gl2.glMapBuffer(target, access);
1571
1563
  }
1572
1564
 
1573
- /**
1574
- *
1575
- * @param target
1576
- * @param offset
1577
- * @param length
1578
- * @param access
1579
- * @return
1580
- */
1581
- @Override
1565
+ /**
1566
+ *
1567
+ * @param target
1568
+ * @param offset
1569
+ * @param length
1570
+ * @param access
1571
+ * @return
1572
+ */
1573
+ @Override
1582
1574
  public ByteBuffer mapBufferRange(int target, int offset, int length, int access) {
1583
1575
  if (gl2x != null) {
1584
1576
  return gl2x.glMapBufferRange(target, offset, length, access);
@@ -1589,26 +1581,23 @@ public class PJOGL extends PGL {
1589
1581
  }
1590
1582
  }
1591
1583
 
1592
- /**
1593
- *
1594
- * @param target
1595
- */
1596
- @Override
1584
+ /**
1585
+ *
1586
+ * @param target
1587
+ */
1588
+ @Override
1597
1589
  public void unmapBuffer(int target) {
1598
1590
  gl2.glUnmapBuffer(target);
1599
1591
  }
1600
1592
 
1601
1593
  //////////////////////////////////////////////////////////////////////////////
1602
-
1603
1594
  // Synchronization
1604
-
1605
- /**
1606
- *
1607
- * @param condition
1608
- * @param flags
1609
- * @return
1610
- */
1611
-
1595
+ /**
1596
+ *
1597
+ * @param condition
1598
+ * @param flags
1599
+ * @return
1600
+ */
1612
1601
  @Override
1613
1602
  public long fenceSync(int condition, int flags) {
1614
1603
  if (gl3es3 != null) {
@@ -1618,11 +1607,11 @@ public class PJOGL extends PGL {
1618
1607
  }
1619
1608
  }
1620
1609
 
1621
- /**
1622
- *
1623
- * @param sync
1624
- */
1625
- @Override
1610
+ /**
1611
+ *
1612
+ * @param sync
1613
+ */
1614
+ @Override
1626
1615
  public void deleteSync(long sync) {
1627
1616
  if (gl3es3 != null) {
1628
1617
  gl3es3.glDeleteSync(sync);
@@ -1631,14 +1620,14 @@ public class PJOGL extends PGL {
1631
1620
  }
1632
1621
  }
1633
1622
 
1634
- /**
1635
- *
1636
- * @param sync
1637
- * @param flags
1638
- * @param timeout
1639
- * @return
1640
- */
1641
- @Override
1623
+ /**
1624
+ *
1625
+ * @param sync
1626
+ * @param flags
1627
+ * @param timeout
1628
+ * @return
1629
+ */
1630
+ @Override
1642
1631
  public int clientWaitSync(long sync, int flags, long timeout) {
1643
1632
  if (gl3es3 != null) {
1644
1633
  return gl3es3.glClientWaitSync(sync, flags, timeout);
@@ -1648,640 +1637,619 @@ public class PJOGL extends PGL {
1648
1637
  }
1649
1638
 
1650
1639
  //////////////////////////////////////////////////////////////////////////////
1651
-
1652
1640
  // Viewport and Clipping
1653
-
1654
- /**
1655
- *
1656
- * @param n
1657
- * @param f
1658
- */
1659
-
1641
+ /**
1642
+ *
1643
+ * @param n
1644
+ * @param f
1645
+ */
1660
1646
  @Override
1661
1647
  public void depthRangef(float n, float f) {
1662
1648
  gl.glDepthRangef(n, f);
1663
1649
  }
1664
1650
 
1665
- /**
1666
- *
1667
- * @param x
1668
- * @param y
1669
- * @param w
1670
- * @param h
1671
- */
1672
- @Override
1651
+ /**
1652
+ *
1653
+ * @param x
1654
+ * @param y
1655
+ * @param w
1656
+ * @param h
1657
+ */
1658
+ @Override
1673
1659
  public void viewport(int x, int y, int w, int h) {
1674
1660
  float scale = getPixelScale();
1675
- viewportImpl((int)scale * x, (int)(scale * y), (int)(scale * w), (int)(scale * h));
1661
+ viewportImpl((int) scale * x, (int) (scale * y), (int) (scale * w), (int) (scale * h));
1676
1662
  }
1677
1663
 
1678
- /**
1679
- *
1680
- * @param x
1681
- * @param y
1682
- * @param w
1683
- * @param h
1684
- */
1685
- @Override
1664
+ /**
1665
+ *
1666
+ * @param x
1667
+ * @param y
1668
+ * @param w
1669
+ * @param h
1670
+ */
1671
+ @Override
1686
1672
  protected void viewportImpl(int x, int y, int w, int h) {
1687
1673
  gl.glViewport(x, y, w, h);
1688
1674
  }
1689
1675
 
1690
1676
  //////////////////////////////////////////////////////////////////////////////
1691
-
1692
1677
  // Reading Pixels
1693
-
1694
- /**
1695
- *
1696
- * @param x
1697
- * @param y
1698
- * @param width
1699
- * @param height
1700
- * @param format
1701
- * @param type
1702
- * @param buffer
1703
- */
1704
-
1678
+ /**
1679
+ *
1680
+ * @param x
1681
+ * @param y
1682
+ * @param width
1683
+ * @param height
1684
+ * @param format
1685
+ * @param type
1686
+ * @param buffer
1687
+ */
1705
1688
  @Override
1706
1689
  protected void readPixelsImpl(int x, int y, int width, int height, int format, int type, Buffer buffer) {
1707
1690
  gl.glReadPixels(x, y, width, height, format, type, buffer);
1708
1691
  }
1709
1692
 
1710
- /**
1711
- *
1712
- * @param x
1713
- * @param y
1714
- * @param width
1715
- * @param height
1716
- * @param format
1717
- * @param type
1718
- * @param offset
1719
- */
1720
- @Override
1693
+ /**
1694
+ *
1695
+ * @param x
1696
+ * @param y
1697
+ * @param width
1698
+ * @param height
1699
+ * @param format
1700
+ * @param type
1701
+ * @param offset
1702
+ */
1703
+ @Override
1721
1704
  protected void readPixelsImpl(int x, int y, int width, int height, int format, int type, long offset) {
1722
1705
  gl.glReadPixels(x, y, width, height, format, type, 0);
1723
1706
  }
1724
1707
 
1725
1708
  //////////////////////////////////////////////////////////////////////////////
1726
-
1727
1709
  // Vertices
1728
-
1729
- /**
1730
- *
1731
- * @param index
1732
- * @param value
1733
- */
1734
-
1710
+ /**
1711
+ *
1712
+ * @param index
1713
+ * @param value
1714
+ */
1735
1715
  @Override
1736
1716
  public void vertexAttrib1f(int index, float value) {
1737
1717
  gl2.glVertexAttrib1f(index, value);
1738
1718
  }
1739
1719
 
1740
- /**
1741
- *
1742
- * @param index
1743
- * @param value0
1744
- * @param value1
1745
- */
1746
- @Override
1720
+ /**
1721
+ *
1722
+ * @param index
1723
+ * @param value0
1724
+ * @param value1
1725
+ */
1726
+ @Override
1747
1727
  public void vertexAttrib2f(int index, float value0, float value1) {
1748
1728
  gl2.glVertexAttrib2f(index, value0, value1);
1749
1729
  }
1750
1730
 
1751
- /**
1752
- *
1753
- * @param index
1754
- * @param value0
1755
- * @param value1
1756
- * @param value2
1757
- */
1758
- @Override
1731
+ /**
1732
+ *
1733
+ * @param index
1734
+ * @param value0
1735
+ * @param value1
1736
+ * @param value2
1737
+ */
1738
+ @Override
1759
1739
  public void vertexAttrib3f(int index, float value0, float value1, float value2) {
1760
1740
  gl2.glVertexAttrib3f(index, value0, value1, value2);
1761
1741
  }
1762
1742
 
1763
- /**
1764
- *
1765
- * @param index
1766
- * @param value0
1767
- * @param value1
1768
- * @param value2
1769
- * @param value3
1770
- */
1771
- @Override
1743
+ /**
1744
+ *
1745
+ * @param index
1746
+ * @param value0
1747
+ * @param value1
1748
+ * @param value2
1749
+ * @param value3
1750
+ */
1751
+ @Override
1772
1752
  public void vertexAttrib4f(int index, float value0, float value1, float value2, float value3) {
1773
1753
  gl2.glVertexAttrib4f(index, value0, value1, value2, value3);
1774
1754
  }
1775
1755
 
1776
- /**
1777
- *
1778
- * @param index
1779
- * @param values
1780
- */
1781
- @Override
1756
+ /**
1757
+ *
1758
+ * @param index
1759
+ * @param values
1760
+ */
1761
+ @Override
1782
1762
  public void vertexAttrib1fv(int index, FloatBuffer values) {
1783
1763
  gl2.glVertexAttrib1fv(index, values);
1784
1764
  }
1785
1765
 
1786
- /**
1787
- *
1788
- * @param index
1789
- * @param values
1790
- */
1791
- @Override
1766
+ /**
1767
+ *
1768
+ * @param index
1769
+ * @param values
1770
+ */
1771
+ @Override
1792
1772
  public void vertexAttrib2fv(int index, FloatBuffer values) {
1793
1773
  gl2.glVertexAttrib2fv(index, values);
1794
1774
  }
1795
1775
 
1796
- /**
1797
- *
1798
- * @param index
1799
- * @param values
1800
- */
1801
- @Override
1776
+ /**
1777
+ *
1778
+ * @param index
1779
+ * @param values
1780
+ */
1781
+ @Override
1802
1782
  public void vertexAttrib3fv(int index, FloatBuffer values) {
1803
1783
  gl2.glVertexAttrib3fv(index, values);
1804
1784
  }
1805
1785
 
1806
- /**
1807
- *
1808
- * @param index
1809
- * @param values
1810
- */
1811
- @Override
1786
+ /**
1787
+ *
1788
+ * @param index
1789
+ * @param values
1790
+ */
1791
+ @Override
1812
1792
  public void vertexAttrib4fv(int index, FloatBuffer values) {
1813
1793
  gl2.glVertexAttrib4fv(index, values);
1814
1794
  }
1815
1795
 
1816
- /**
1817
- *
1818
- * @param index
1819
- * @param size
1820
- * @param type
1821
- * @param normalized
1822
- * @param stride
1823
- * @param offset
1824
- */
1825
- @Override
1796
+ /**
1797
+ *
1798
+ * @param index
1799
+ * @param size
1800
+ * @param type
1801
+ * @param normalized
1802
+ * @param stride
1803
+ * @param offset
1804
+ */
1805
+ @Override
1826
1806
  public void vertexAttribPointer(int index, int size, int type, boolean normalized, int stride, int offset) {
1827
1807
  gl2.glVertexAttribPointer(index, size, type, normalized, stride, offset);
1828
1808
  }
1829
1809
 
1830
- /**
1831
- *
1832
- * @param index
1833
- */
1834
- @Override
1810
+ /**
1811
+ *
1812
+ * @param index
1813
+ */
1814
+ @Override
1835
1815
  public void enableVertexAttribArray(int index) {
1836
1816
  gl2.glEnableVertexAttribArray(index);
1837
1817
  }
1838
1818
 
1839
- /**
1840
- *
1841
- * @param index
1842
- */
1843
- @Override
1819
+ /**
1820
+ *
1821
+ * @param index
1822
+ */
1823
+ @Override
1844
1824
  public void disableVertexAttribArray(int index) {
1845
1825
  gl2.glDisableVertexAttribArray(index);
1846
1826
  }
1847
1827
 
1848
- /**
1849
- *
1850
- * @param mode
1851
- * @param first
1852
- * @param count
1853
- */
1854
- @Override
1828
+ /**
1829
+ *
1830
+ * @param mode
1831
+ * @param first
1832
+ * @param count
1833
+ */
1834
+ @Override
1855
1835
  public void drawArraysImpl(int mode, int first, int count) {
1856
1836
  gl.glDrawArrays(mode, first, count);
1857
1837
  }
1858
1838
 
1859
- /**
1860
- *
1861
- * @param mode
1862
- * @param count
1863
- * @param type
1864
- * @param offset
1865
- */
1866
- @Override
1839
+ /**
1840
+ *
1841
+ * @param mode
1842
+ * @param count
1843
+ * @param type
1844
+ * @param offset
1845
+ */
1846
+ @Override
1867
1847
  public void drawElementsImpl(int mode, int count, int type, int offset) {
1868
1848
  gl.glDrawElements(mode, count, type, offset);
1869
1849
  }
1870
1850
 
1871
1851
  //////////////////////////////////////////////////////////////////////////////
1872
-
1873
1852
  // Rasterization
1874
-
1875
- /**
1876
- *
1877
- * @param width
1878
- */
1879
-
1853
+ /**
1854
+ *
1855
+ * @param width
1856
+ */
1880
1857
  @Override
1881
1858
  public void lineWidth(float width) {
1882
1859
  gl.glLineWidth(width);
1883
1860
  }
1884
1861
 
1885
- /**
1886
- *
1887
- * @param dir
1888
- */
1889
- @Override
1862
+ /**
1863
+ *
1864
+ * @param dir
1865
+ */
1866
+ @Override
1890
1867
  public void frontFace(int dir) {
1891
1868
  gl.glFrontFace(dir);
1892
1869
  }
1893
1870
 
1894
- /**
1895
- *
1896
- * @param mode
1897
- */
1898
- @Override
1871
+ /**
1872
+ *
1873
+ * @param mode
1874
+ */
1875
+ @Override
1899
1876
  public void cullFace(int mode) {
1900
1877
  gl.glCullFace(mode);
1901
1878
  }
1902
1879
 
1903
- /**
1904
- *
1905
- * @param factor
1906
- * @param units
1907
- */
1908
- @Override
1880
+ /**
1881
+ *
1882
+ * @param factor
1883
+ * @param units
1884
+ */
1885
+ @Override
1909
1886
  public void polygonOffset(float factor, float units) {
1910
1887
  gl.glPolygonOffset(factor, units);
1911
1888
  }
1912
1889
 
1913
1890
  //////////////////////////////////////////////////////////////////////////////
1914
-
1915
1891
  // Pixel Rectangles
1916
-
1917
- /**
1918
- *
1919
- * @param pname
1920
- * @param param
1921
- */
1922
-
1892
+ /**
1893
+ *
1894
+ * @param pname
1895
+ * @param param
1896
+ */
1923
1897
  @Override
1924
1898
  public void pixelStorei(int pname, int param) {
1925
1899
  gl.glPixelStorei(pname, param);
1926
1900
  }
1927
1901
 
1928
1902
  ///////////////////////////////////////////////////////////
1929
-
1930
1903
  // Texturing
1931
-
1932
- /**
1933
- *
1934
- * @param target
1935
- * @param level
1936
- * @param internalFormat
1937
- * @param width
1938
- * @param height
1939
- * @param border
1940
- * @param format
1941
- * @param type
1942
- * @param data
1943
- */
1944
-
1904
+ /**
1905
+ *
1906
+ * @param target
1907
+ * @param level
1908
+ * @param internalFormat
1909
+ * @param width
1910
+ * @param height
1911
+ * @param border
1912
+ * @param format
1913
+ * @param type
1914
+ * @param data
1915
+ */
1945
1916
  @Override
1946
1917
  public void texImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, Buffer data) {
1947
1918
  gl.glTexImage2D(target, level, internalFormat, width, height, border, format, type, data);
1948
1919
  }
1949
1920
 
1950
- /**
1951
- *
1952
- * @param target
1953
- * @param level
1954
- * @param internalFormat
1955
- * @param x
1956
- * @param y
1957
- * @param width
1958
- * @param height
1959
- * @param border
1960
- */
1961
- @Override
1921
+ /**
1922
+ *
1923
+ * @param target
1924
+ * @param level
1925
+ * @param internalFormat
1926
+ * @param x
1927
+ * @param y
1928
+ * @param width
1929
+ * @param height
1930
+ * @param border
1931
+ */
1932
+ @Override
1962
1933
  public void copyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, int border) {
1963
1934
  gl.glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
1964
1935
  }
1965
1936
 
1966
- /**
1967
- *
1968
- * @param target
1969
- * @param level
1970
- * @param xOffset
1971
- * @param yOffset
1972
- * @param width
1973
- * @param height
1974
- * @param format
1975
- * @param type
1976
- * @param data
1977
- */
1978
- @Override
1937
+ /**
1938
+ *
1939
+ * @param target
1940
+ * @param level
1941
+ * @param xOffset
1942
+ * @param yOffset
1943
+ * @param width
1944
+ * @param height
1945
+ * @param format
1946
+ * @param type
1947
+ * @param data
1948
+ */
1949
+ @Override
1979
1950
  public void texSubImage2D(int target, int level, int xOffset, int yOffset, int width, int height, int format, int type, Buffer data) {
1980
1951
  gl.glTexSubImage2D(target, level, xOffset, yOffset, width, height, format, type, data);
1981
1952
  }
1982
1953
 
1983
- /**
1984
- *
1985
- * @param target
1986
- * @param level
1987
- * @param xOffset
1988
- * @param yOffset
1989
- * @param x
1990
- * @param y
1991
- * @param width
1992
- * @param height
1993
- */
1994
- @Override
1954
+ /**
1955
+ *
1956
+ * @param target
1957
+ * @param level
1958
+ * @param xOffset
1959
+ * @param yOffset
1960
+ * @param x
1961
+ * @param y
1962
+ * @param width
1963
+ * @param height
1964
+ */
1965
+ @Override
1995
1966
  public void copyTexSubImage2D(int target, int level, int xOffset, int yOffset, int x, int y, int width, int height) {
1996
1967
  gl.glCopyTexSubImage2D(target, level, x, y, xOffset, yOffset, width, height);
1997
1968
  }
1998
1969
 
1999
- /**
2000
- *
2001
- * @param target
2002
- * @param level
2003
- * @param internalFormat
2004
- * @param width
2005
- * @param height
2006
- * @param border
2007
- * @param imageSize
2008
- * @param data
2009
- */
2010
- @Override
1970
+ /**
1971
+ *
1972
+ * @param target
1973
+ * @param level
1974
+ * @param internalFormat
1975
+ * @param width
1976
+ * @param height
1977
+ * @param border
1978
+ * @param imageSize
1979
+ * @param data
1980
+ */
1981
+ @Override
2011
1982
  public void compressedTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int imageSize, Buffer data) {
2012
1983
  gl.glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data);
2013
1984
  }
2014
1985
 
2015
- /**
2016
- *
2017
- * @param target
2018
- * @param level
2019
- * @param xOffset
2020
- * @param yOffset
2021
- * @param width
2022
- * @param height
2023
- * @param format
2024
- * @param imageSize
2025
- * @param data
2026
- */
2027
- @Override
1986
+ /**
1987
+ *
1988
+ * @param target
1989
+ * @param level
1990
+ * @param xOffset
1991
+ * @param yOffset
1992
+ * @param width
1993
+ * @param height
1994
+ * @param format
1995
+ * @param imageSize
1996
+ * @param data
1997
+ */
1998
+ @Override
2028
1999
  public void compressedTexSubImage2D(int target, int level, int xOffset, int yOffset, int width, int height, int format, int imageSize, Buffer data) {
2029
2000
  gl.glCompressedTexSubImage2D(target, level, xOffset, yOffset, width, height, format, imageSize, data);
2030
2001
  }
2031
2002
 
2032
- /**
2033
- *
2034
- * @param target
2035
- * @param pname
2036
- * @param param
2037
- */
2038
- @Override
2003
+ /**
2004
+ *
2005
+ * @param target
2006
+ * @param pname
2007
+ * @param param
2008
+ */
2009
+ @Override
2039
2010
  public void texParameteri(int target, int pname, int param) {
2040
2011
  gl.glTexParameteri(target, pname, param);
2041
2012
  }
2042
2013
 
2043
- /**
2044
- *
2045
- * @param target
2046
- * @param pname
2047
- * @param param
2048
- */
2049
- @Override
2014
+ /**
2015
+ *
2016
+ * @param target
2017
+ * @param pname
2018
+ * @param param
2019
+ */
2020
+ @Override
2050
2021
  public void texParameterf(int target, int pname, float param) {
2051
2022
  gl.glTexParameterf(target, pname, param);
2052
2023
  }
2053
2024
 
2054
- /**
2055
- *
2056
- * @param target
2057
- * @param pname
2058
- * @param params
2059
- */
2060
- @Override
2025
+ /**
2026
+ *
2027
+ * @param target
2028
+ * @param pname
2029
+ * @param params
2030
+ */
2031
+ @Override
2061
2032
  public void texParameteriv(int target, int pname, IntBuffer params) {
2062
2033
  gl.glTexParameteriv(target, pname, params);
2063
2034
  }
2064
2035
 
2065
- /**
2066
- *
2067
- * @param target
2068
- * @param pname
2069
- * @param params
2070
- */
2071
- @Override
2036
+ /**
2037
+ *
2038
+ * @param target
2039
+ * @param pname
2040
+ * @param params
2041
+ */
2042
+ @Override
2072
2043
  public void texParameterfv(int target, int pname, FloatBuffer params) {
2073
2044
  gl.glTexParameterfv(target, pname, params);
2074
2045
  }
2075
2046
 
2076
- /**
2077
- *
2078
- * @param target
2079
- */
2080
- @Override
2047
+ /**
2048
+ *
2049
+ * @param target
2050
+ */
2051
+ @Override
2081
2052
  public void generateMipmap(int target) {
2082
2053
  gl.glGenerateMipmap(target);
2083
2054
  }
2084
2055
 
2085
- /**
2086
- *
2087
- * @param n
2088
- * @param textures
2089
- */
2090
- @Override
2056
+ /**
2057
+ *
2058
+ * @param n
2059
+ * @param textures
2060
+ */
2061
+ @Override
2091
2062
  public void genTextures(int n, IntBuffer textures) {
2092
2063
  gl.glGenTextures(n, textures);
2093
2064
  }
2094
2065
 
2095
- /**
2096
- *
2097
- * @param n
2098
- * @param textures
2099
- */
2100
- @Override
2066
+ /**
2067
+ *
2068
+ * @param n
2069
+ * @param textures
2070
+ */
2071
+ @Override
2101
2072
  public void deleteTextures(int n, IntBuffer textures) {
2102
2073
  gl.glDeleteTextures(n, textures);
2103
2074
  }
2104
2075
 
2105
- /**
2106
- *
2107
- * @param target
2108
- * @param pname
2109
- * @param params
2110
- */
2111
- @Override
2076
+ /**
2077
+ *
2078
+ * @param target
2079
+ * @param pname
2080
+ * @param params
2081
+ */
2082
+ @Override
2112
2083
  public void getTexParameteriv(int target, int pname, IntBuffer params) {
2113
2084
  gl.glGetTexParameteriv(target, pname, params);
2114
2085
  }
2115
2086
 
2116
- /**
2117
- *
2118
- * @param target
2119
- * @param pname
2120
- * @param params
2121
- */
2122
- @Override
2087
+ /**
2088
+ *
2089
+ * @param target
2090
+ * @param pname
2091
+ * @param params
2092
+ */
2093
+ @Override
2123
2094
  public void getTexParameterfv(int target, int pname, FloatBuffer params) {
2124
2095
  gl.glGetTexParameterfv(target, pname, params);
2125
2096
  }
2126
2097
 
2127
- /**
2128
- *
2129
- * @param texture
2130
- * @return
2131
- */
2132
- @Override
2098
+ /**
2099
+ *
2100
+ * @param texture
2101
+ * @return
2102
+ */
2103
+ @Override
2133
2104
  public boolean isTexture(int texture) {
2134
2105
  return gl.glIsTexture(texture);
2135
2106
  }
2136
2107
 
2137
- /**
2138
- *
2139
- * @param texture
2140
- */
2141
- @Override
2108
+ /**
2109
+ *
2110
+ * @param texture
2111
+ */
2112
+ @Override
2142
2113
  protected void activeTextureImpl(int texture) {
2143
2114
  gl.glActiveTexture(texture);
2144
2115
  }
2145
2116
 
2146
- /**
2147
- *
2148
- * @param target
2149
- * @param texture
2150
- */
2151
- @Override
2117
+ /**
2118
+ *
2119
+ * @param target
2120
+ * @param texture
2121
+ */
2122
+ @Override
2152
2123
  protected void bindTextureImpl(int target, int texture) {
2153
2124
  gl.glBindTexture(target, texture);
2154
2125
  }
2155
2126
 
2156
2127
  ///////////////////////////////////////////////////////////
2157
-
2158
2128
  // Shaders and Programs
2159
-
2160
- /**
2161
- *
2162
- * @param type
2163
- * @return
2164
- */
2165
-
2129
+ /**
2130
+ *
2131
+ * @param type
2132
+ * @return
2133
+ */
2166
2134
  @Override
2167
2135
  public int createShader(int type) {
2168
2136
  return gl2.glCreateShader(type);
2169
2137
  }
2170
2138
 
2171
- /**
2172
- *
2173
- * @param shader
2174
- * @param source
2175
- */
2176
- @Override
2139
+ /**
2140
+ *
2141
+ * @param shader
2142
+ * @param source
2143
+ */
2144
+ @Override
2177
2145
  public void shaderSource(int shader, String source) {
2178
- gl2.glShaderSource(shader, 1, new String[] { source }, (int[]) null, 0);
2146
+ gl2.glShaderSource(shader, 1, new String[]{source}, (int[]) null, 0);
2179
2147
  }
2180
2148
 
2181
- /**
2182
- *
2183
- * @param shader
2184
- */
2185
- @Override
2149
+ /**
2150
+ *
2151
+ * @param shader
2152
+ */
2153
+ @Override
2186
2154
  public void compileShader(int shader) {
2187
2155
  gl2.glCompileShader(shader);
2188
2156
  }
2189
2157
 
2190
- /**
2191
- *
2192
- */
2193
- @Override
2158
+ /**
2159
+ *
2160
+ */
2161
+ @Override
2194
2162
  public void releaseShaderCompiler() {
2195
2163
  gl2.glReleaseShaderCompiler();
2196
2164
  }
2197
2165
 
2198
- /**
2199
- *
2200
- * @param shader
2201
- */
2202
- @Override
2166
+ /**
2167
+ *
2168
+ * @param shader
2169
+ */
2170
+ @Override
2203
2171
  public void deleteShader(int shader) {
2204
2172
  gl2.glDeleteShader(shader);
2205
2173
  }
2206
2174
 
2207
- /**
2208
- *
2209
- * @param count
2210
- * @param shaders
2211
- * @param binaryFormat
2212
- * @param binary
2213
- * @param length
2214
- */
2215
- @Override
2175
+ /**
2176
+ *
2177
+ * @param count
2178
+ * @param shaders
2179
+ * @param binaryFormat
2180
+ * @param binary
2181
+ * @param length
2182
+ */
2183
+ @Override
2216
2184
  public void shaderBinary(int count, IntBuffer shaders, int binaryFormat, Buffer binary, int length) {
2217
2185
  gl2.glShaderBinary(count, shaders, binaryFormat, binary, length);
2218
2186
  }
2219
2187
 
2220
- /**
2221
- *
2222
- * @return
2223
- */
2224
- @Override
2188
+ /**
2189
+ *
2190
+ * @return
2191
+ */
2192
+ @Override
2225
2193
  public int createProgram() {
2226
2194
  return gl2.glCreateProgram();
2227
2195
  }
2228
2196
 
2229
- /**
2230
- *
2231
- * @param program
2232
- * @param shader
2233
- */
2234
- @Override
2197
+ /**
2198
+ *
2199
+ * @param program
2200
+ * @param shader
2201
+ */
2202
+ @Override
2235
2203
  public void attachShader(int program, int shader) {
2236
2204
  gl2.glAttachShader(program, shader);
2237
2205
  }
2238
2206
 
2239
- /**
2240
- *
2241
- * @param program
2242
- * @param shader
2243
- */
2244
- @Override
2207
+ /**
2208
+ *
2209
+ * @param program
2210
+ * @param shader
2211
+ */
2212
+ @Override
2245
2213
  public void detachShader(int program, int shader) {
2246
2214
  gl2.glDetachShader(program, shader);
2247
2215
  }
2248
2216
 
2249
- /**
2250
- *
2251
- * @param program
2252
- */
2253
- @Override
2217
+ /**
2218
+ *
2219
+ * @param program
2220
+ */
2221
+ @Override
2254
2222
  public void linkProgram(int program) {
2255
2223
  gl2.glLinkProgram(program);
2256
2224
  }
2257
2225
 
2258
- /**
2259
- *
2260
- * @param program
2261
- */
2262
- @Override
2226
+ /**
2227
+ *
2228
+ * @param program
2229
+ */
2230
+ @Override
2263
2231
  public void useProgram(int program) {
2264
2232
  gl2.glUseProgram(program);
2265
2233
  }
2266
2234
 
2267
- /**
2268
- *
2269
- * @param program
2270
- */
2271
- @Override
2235
+ /**
2236
+ *
2237
+ * @param program
2238
+ */
2239
+ @Override
2272
2240
  public void deleteProgram(int program) {
2273
2241
  gl2.glDeleteProgram(program);
2274
2242
  }
2275
2243
 
2276
- /**
2277
- *
2278
- * @param program
2279
- * @param index
2280
- * @param size
2281
- * @param type
2282
- * @return
2283
- */
2284
- @Override
2244
+ /**
2245
+ *
2246
+ * @param program
2247
+ * @param index
2248
+ * @param size
2249
+ * @param type
2250
+ * @return
2251
+ */
2252
+ @Override
2285
2253
  public String getActiveAttrib(int program, int index, IntBuffer size, IntBuffer type) {
2286
2254
  int[] tmp = {0, 0, 0};
2287
2255
  byte[] namebuf = new byte[1024];
@@ -2292,50 +2260,50 @@ public class PJOGL extends PGL {
2292
2260
  return name;
2293
2261
  }
2294
2262
 
2295
- /**
2296
- *
2297
- * @param program
2298
- * @param name
2299
- * @return
2300
- */
2301
- @Override
2263
+ /**
2264
+ *
2265
+ * @param program
2266
+ * @param name
2267
+ * @return
2268
+ */
2269
+ @Override
2302
2270
  public int getAttribLocation(int program, String name) {
2303
2271
  return gl2.glGetAttribLocation(program, name);
2304
2272
  }
2305
2273
 
2306
- /**
2307
- *
2308
- * @param program
2309
- * @param index
2310
- * @param name
2311
- */
2312
- @Override
2274
+ /**
2275
+ *
2276
+ * @param program
2277
+ * @param index
2278
+ * @param name
2279
+ */
2280
+ @Override
2313
2281
  public void bindAttribLocation(int program, int index, String name) {
2314
2282
  gl2.glBindAttribLocation(program, index, name);
2315
2283
  }
2316
2284
 
2317
- /**
2318
- *
2319
- * @param program
2320
- * @param name
2321
- * @return
2322
- */
2323
- @Override
2285
+ /**
2286
+ *
2287
+ * @param program
2288
+ * @param name
2289
+ * @return
2290
+ */
2291
+ @Override
2324
2292
  public int getUniformLocation(int program, String name) {
2325
2293
  return gl2.glGetUniformLocation(program, name);
2326
2294
  }
2327
2295
 
2328
- /**
2329
- *
2330
- * @param program
2331
- * @param index
2332
- * @param size
2333
- * @param type
2334
- * @return
2335
- */
2336
- @Override
2296
+ /**
2297
+ *
2298
+ * @param program
2299
+ * @param index
2300
+ * @param size
2301
+ * @param type
2302
+ * @return
2303
+ */
2304
+ @Override
2337
2305
  public String getActiveUniform(int program, int index, IntBuffer size, IntBuffer type) {
2338
- int[] tmp= {0, 0, 0};
2306
+ int[] tmp = {0, 0, 0};
2339
2307
  byte[] namebuf = new byte[1024];
2340
2308
  gl2.glGetActiveUniform(program, index, 1024, tmp, 0, tmp, 1, tmp, 2, namebuf, 0);
2341
2309
  size.put(tmp[1]);
@@ -2344,272 +2312,272 @@ public class PJOGL extends PGL {
2344
2312
  return name;
2345
2313
  }
2346
2314
 
2347
- /**
2348
- *
2349
- * @param location
2350
- * @param value
2351
- */
2352
- @Override
2315
+ /**
2316
+ *
2317
+ * @param location
2318
+ * @param value
2319
+ */
2320
+ @Override
2353
2321
  public void uniform1i(int location, int value) {
2354
2322
  gl2.glUniform1i(location, value);
2355
2323
  }
2356
2324
 
2357
- /**
2358
- *
2359
- * @param location
2360
- * @param value0
2361
- * @param value1
2362
- */
2363
- @Override
2325
+ /**
2326
+ *
2327
+ * @param location
2328
+ * @param value0
2329
+ * @param value1
2330
+ */
2331
+ @Override
2364
2332
  public void uniform2i(int location, int value0, int value1) {
2365
2333
  gl2.glUniform2i(location, value0, value1);
2366
2334
  }
2367
2335
 
2368
- /**
2369
- *
2370
- * @param location
2371
- * @param value0
2372
- * @param value1
2373
- * @param value2
2374
- */
2375
- @Override
2336
+ /**
2337
+ *
2338
+ * @param location
2339
+ * @param value0
2340
+ * @param value1
2341
+ * @param value2
2342
+ */
2343
+ @Override
2376
2344
  public void uniform3i(int location, int value0, int value1, int value2) {
2377
2345
  gl2.glUniform3i(location, value0, value1, value2);
2378
2346
  }
2379
2347
 
2380
- /**
2381
- *
2382
- * @param location
2383
- * @param value0
2384
- * @param value1
2385
- * @param value2
2386
- * @param value3
2387
- */
2388
- @Override
2348
+ /**
2349
+ *
2350
+ * @param location
2351
+ * @param value0
2352
+ * @param value1
2353
+ * @param value2
2354
+ * @param value3
2355
+ */
2356
+ @Override
2389
2357
  public void uniform4i(int location, int value0, int value1, int value2, int value3) {
2390
2358
  gl2.glUniform4i(location, value0, value1, value2, value3);
2391
2359
  }
2392
2360
 
2393
- /**
2394
- *
2395
- * @param location
2396
- * @param value
2397
- */
2398
- @Override
2361
+ /**
2362
+ *
2363
+ * @param location
2364
+ * @param value
2365
+ */
2366
+ @Override
2399
2367
  public void uniform1f(int location, float value) {
2400
2368
  gl2.glUniform1f(location, value);
2401
2369
  }
2402
2370
 
2403
- /**
2404
- *
2405
- * @param location
2406
- * @param value0
2407
- * @param value1
2408
- */
2409
- @Override
2371
+ /**
2372
+ *
2373
+ * @param location
2374
+ * @param value0
2375
+ * @param value1
2376
+ */
2377
+ @Override
2410
2378
  public void uniform2f(int location, float value0, float value1) {
2411
2379
  gl2.glUniform2f(location, value0, value1);
2412
2380
  }
2413
2381
 
2414
- /**
2415
- *
2416
- * @param location
2417
- * @param value0
2418
- * @param value1
2419
- * @param value2
2420
- */
2421
- @Override
2382
+ /**
2383
+ *
2384
+ * @param location
2385
+ * @param value0
2386
+ * @param value1
2387
+ * @param value2
2388
+ */
2389
+ @Override
2422
2390
  public void uniform3f(int location, float value0, float value1, float value2) {
2423
2391
  gl2.glUniform3f(location, value0, value1, value2);
2424
2392
  }
2425
2393
 
2426
- /**
2427
- *
2428
- * @param location
2429
- * @param value0
2430
- * @param value1
2431
- * @param value2
2432
- * @param value3
2433
- */
2434
- @Override
2394
+ /**
2395
+ *
2396
+ * @param location
2397
+ * @param value0
2398
+ * @param value1
2399
+ * @param value2
2400
+ * @param value3
2401
+ */
2402
+ @Override
2435
2403
  public void uniform4f(int location, float value0, float value1, float value2, float value3) {
2436
2404
  gl2.glUniform4f(location, value0, value1, value2, value3);
2437
2405
  }
2438
2406
 
2439
- /**
2440
- *
2441
- * @param location
2442
- * @param count
2443
- * @param v
2444
- */
2445
- @Override
2407
+ /**
2408
+ *
2409
+ * @param location
2410
+ * @param count
2411
+ * @param v
2412
+ */
2413
+ @Override
2446
2414
  public void uniform1iv(int location, int count, IntBuffer v) {
2447
2415
  gl2.glUniform1iv(location, count, v);
2448
2416
  }
2449
2417
 
2450
- /**
2451
- *
2452
- * @param location
2453
- * @param count
2454
- * @param v
2455
- */
2456
- @Override
2418
+ /**
2419
+ *
2420
+ * @param location
2421
+ * @param count
2422
+ * @param v
2423
+ */
2424
+ @Override
2457
2425
  public void uniform2iv(int location, int count, IntBuffer v) {
2458
2426
  gl2.glUniform2iv(location, count, v);
2459
2427
  }
2460
2428
 
2461
- /**
2462
- *
2463
- * @param location
2464
- * @param count
2465
- * @param v
2466
- */
2467
- @Override
2429
+ /**
2430
+ *
2431
+ * @param location
2432
+ * @param count
2433
+ * @param v
2434
+ */
2435
+ @Override
2468
2436
  public void uniform3iv(int location, int count, IntBuffer v) {
2469
2437
  gl2.glUniform3iv(location, count, v);
2470
2438
  }
2471
2439
 
2472
- /**
2473
- *
2474
- * @param location
2475
- * @param count
2476
- * @param v
2477
- */
2478
- @Override
2440
+ /**
2441
+ *
2442
+ * @param location
2443
+ * @param count
2444
+ * @param v
2445
+ */
2446
+ @Override
2479
2447
  public void uniform4iv(int location, int count, IntBuffer v) {
2480
2448
  gl2.glUniform4iv(location, count, v);
2481
2449
  }
2482
2450
 
2483
- /**
2484
- *
2485
- * @param location
2486
- * @param count
2487
- * @param v
2488
- */
2489
- @Override
2451
+ /**
2452
+ *
2453
+ * @param location
2454
+ * @param count
2455
+ * @param v
2456
+ */
2457
+ @Override
2490
2458
  public void uniform1fv(int location, int count, FloatBuffer v) {
2491
2459
  gl2.glUniform1fv(location, count, v);
2492
2460
  }
2493
2461
 
2494
- /**
2495
- *
2496
- * @param location
2497
- * @param count
2498
- * @param v
2499
- */
2500
- @Override
2462
+ /**
2463
+ *
2464
+ * @param location
2465
+ * @param count
2466
+ * @param v
2467
+ */
2468
+ @Override
2501
2469
  public void uniform2fv(int location, int count, FloatBuffer v) {
2502
2470
  gl2.glUniform2fv(location, count, v);
2503
2471
  }
2504
2472
 
2505
- /**
2506
- *
2507
- * @param location
2508
- * @param count
2509
- * @param v
2510
- */
2511
- @Override
2473
+ /**
2474
+ *
2475
+ * @param location
2476
+ * @param count
2477
+ * @param v
2478
+ */
2479
+ @Override
2512
2480
  public void uniform3fv(int location, int count, FloatBuffer v) {
2513
2481
  gl2.glUniform3fv(location, count, v);
2514
2482
  }
2515
2483
 
2516
- /**
2517
- *
2518
- * @param location
2519
- * @param count
2520
- * @param v
2521
- */
2522
- @Override
2484
+ /**
2485
+ *
2486
+ * @param location
2487
+ * @param count
2488
+ * @param v
2489
+ */
2490
+ @Override
2523
2491
  public void uniform4fv(int location, int count, FloatBuffer v) {
2524
2492
  gl2.glUniform4fv(location, count, v);
2525
2493
  }
2526
2494
 
2527
- /**
2528
- *
2529
- * @param location
2530
- * @param count
2531
- * @param transpose
2532
- * @param mat
2533
- */
2534
- @Override
2495
+ /**
2496
+ *
2497
+ * @param location
2498
+ * @param count
2499
+ * @param transpose
2500
+ * @param mat
2501
+ */
2502
+ @Override
2535
2503
  public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer mat) {
2536
2504
  gl2.glUniformMatrix2fv(location, count, transpose, mat);
2537
2505
  }
2538
2506
 
2539
- /**
2540
- *
2541
- * @param location
2542
- * @param count
2543
- * @param transpose
2544
- * @param mat
2545
- */
2546
- @Override
2507
+ /**
2508
+ *
2509
+ * @param location
2510
+ * @param count
2511
+ * @param transpose
2512
+ * @param mat
2513
+ */
2514
+ @Override
2547
2515
  public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer mat) {
2548
2516
  gl2.glUniformMatrix3fv(location, count, transpose, mat);
2549
2517
  }
2550
2518
 
2551
- /**
2552
- *
2553
- * @param location
2554
- * @param count
2555
- * @param transpose
2556
- * @param mat
2557
- */
2558
- @Override
2519
+ /**
2520
+ *
2521
+ * @param location
2522
+ * @param count
2523
+ * @param transpose
2524
+ * @param mat
2525
+ */
2526
+ @Override
2559
2527
  public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer mat) {
2560
2528
  gl2.glUniformMatrix4fv(location, count, transpose, mat);
2561
2529
  }
2562
2530
 
2563
- /**
2564
- *
2565
- * @param program
2566
- */
2567
- @Override
2531
+ /**
2532
+ *
2533
+ * @param program
2534
+ */
2535
+ @Override
2568
2536
  public void validateProgram(int program) {
2569
2537
  gl2.glValidateProgram(program);
2570
2538
  }
2571
2539
 
2572
- /**
2573
- *
2574
- * @param shader
2575
- * @return
2576
- */
2577
- @Override
2540
+ /**
2541
+ *
2542
+ * @param shader
2543
+ * @return
2544
+ */
2545
+ @Override
2578
2546
  public boolean isShader(int shader) {
2579
2547
  return gl2.glIsShader(shader);
2580
2548
  }
2581
2549
 
2582
- /**
2583
- *
2584
- * @param shader
2585
- * @param pname
2586
- * @param params
2587
- */
2588
- @Override
2550
+ /**
2551
+ *
2552
+ * @param shader
2553
+ * @param pname
2554
+ * @param params
2555
+ */
2556
+ @Override
2589
2557
  public void getShaderiv(int shader, int pname, IntBuffer params) {
2590
2558
  gl2.glGetShaderiv(shader, pname, params);
2591
2559
  }
2592
2560
 
2593
- /**
2594
- *
2595
- * @param program
2596
- * @param maxCount
2597
- * @param count
2598
- * @param shaders
2599
- */
2600
- @Override
2561
+ /**
2562
+ *
2563
+ * @param program
2564
+ * @param maxCount
2565
+ * @param count
2566
+ * @param shaders
2567
+ */
2568
+ @Override
2601
2569
  public void getAttachedShaders(int program, int maxCount, IntBuffer count, IntBuffer shaders) {
2602
2570
  gl2.glGetAttachedShaders(program, maxCount, count, shaders);
2603
2571
  }
2604
2572
 
2605
- /**
2606
- *
2607
- * @param shader
2608
- * @return
2609
- */
2610
- @Override
2573
+ /**
2574
+ *
2575
+ * @param shader
2576
+ * @return
2577
+ */
2578
+ @Override
2611
2579
  public String getShaderInfoLog(int shader) {
2612
- int[] val = { 0 };
2580
+ int[] val = {0};
2613
2581
  gl2.glGetShaderiv(shader, GL2ES2.GL_INFO_LOG_LENGTH, val, 0);
2614
2582
  int length = val[0];
2615
2583
 
@@ -2618,12 +2586,12 @@ public class PJOGL extends PGL {
2618
2586
  return new String(log);
2619
2587
  }
2620
2588
 
2621
- /**
2622
- *
2623
- * @param shader
2624
- * @return
2625
- */
2626
- @Override
2589
+ /**
2590
+ *
2591
+ * @param shader
2592
+ * @return
2593
+ */
2594
+ @Override
2627
2595
  public String getShaderSource(int shader) {
2628
2596
  int[] len = {0};
2629
2597
  byte[] buf = new byte[1024];
@@ -2631,102 +2599,102 @@ public class PJOGL extends PGL {
2631
2599
  return new String(buf, 0, len[0]);
2632
2600
  }
2633
2601
 
2634
- /**
2635
- *
2636
- * @param shaderType
2637
- * @param precisionType
2638
- * @param range
2639
- * @param precision
2640
- */
2641
- @Override
2602
+ /**
2603
+ *
2604
+ * @param shaderType
2605
+ * @param precisionType
2606
+ * @param range
2607
+ * @param precision
2608
+ */
2609
+ @Override
2642
2610
  public void getShaderPrecisionFormat(int shaderType, int precisionType, IntBuffer range, IntBuffer precision) {
2643
2611
  gl2.glGetShaderPrecisionFormat(shaderType, precisionType, range, precision);
2644
2612
  }
2645
2613
 
2646
- /**
2647
- *
2648
- * @param index
2649
- * @param pname
2650
- * @param params
2651
- */
2652
- @Override
2614
+ /**
2615
+ *
2616
+ * @param index
2617
+ * @param pname
2618
+ * @param params
2619
+ */
2620
+ @Override
2653
2621
  public void getVertexAttribfv(int index, int pname, FloatBuffer params) {
2654
2622
  gl2.glGetVertexAttribfv(index, pname, params);
2655
2623
  }
2656
2624
 
2657
- /**
2658
- *
2659
- * @param index
2660
- * @param pname
2661
- * @param params
2662
- */
2663
- @Override
2625
+ /**
2626
+ *
2627
+ * @param index
2628
+ * @param pname
2629
+ * @param params
2630
+ */
2631
+ @Override
2664
2632
  public void getVertexAttribiv(int index, int pname, IntBuffer params) {
2665
2633
  gl2.glGetVertexAttribiv(index, pname, params);
2666
2634
  }
2667
2635
 
2668
- /**
2669
- *
2670
- * @param index
2671
- * @param pname
2672
- * @param data
2673
- */
2674
- @Override
2636
+ /**
2637
+ *
2638
+ * @param index
2639
+ * @param pname
2640
+ * @param data
2641
+ */
2642
+ @Override
2675
2643
  public void getVertexAttribPointerv(int index, int pname, ByteBuffer data) {
2676
2644
  throw new RuntimeException(String.format(MISSING_GLFUNC_ERROR, "glGetVertexAttribPointerv()"));
2677
2645
  }
2678
2646
 
2679
- /**
2680
- *
2681
- * @param program
2682
- * @param location
2683
- * @param params
2684
- */
2685
- @Override
2647
+ /**
2648
+ *
2649
+ * @param program
2650
+ * @param location
2651
+ * @param params
2652
+ */
2653
+ @Override
2686
2654
  public void getUniformfv(int program, int location, FloatBuffer params) {
2687
2655
  gl2.glGetUniformfv(program, location, params);
2688
2656
  }
2689
2657
 
2690
- /**
2691
- *
2692
- * @param program
2693
- * @param location
2694
- * @param params
2695
- */
2696
- @Override
2658
+ /**
2659
+ *
2660
+ * @param program
2661
+ * @param location
2662
+ * @param params
2663
+ */
2664
+ @Override
2697
2665
  public void getUniformiv(int program, int location, IntBuffer params) {
2698
2666
  gl2.glGetUniformiv(program, location, params);
2699
2667
  }
2700
2668
 
2701
- /**
2702
- *
2703
- * @param program
2704
- * @return
2705
- */
2706
- @Override
2669
+ /**
2670
+ *
2671
+ * @param program
2672
+ * @return
2673
+ */
2674
+ @Override
2707
2675
  public boolean isProgram(int program) {
2708
2676
  return gl2.glIsProgram(program);
2709
2677
  }
2710
2678
 
2711
- /**
2712
- *
2713
- * @param program
2714
- * @param pname
2715
- * @param params
2716
- */
2717
- @Override
2679
+ /**
2680
+ *
2681
+ * @param program
2682
+ * @param pname
2683
+ * @param params
2684
+ */
2685
+ @Override
2718
2686
  public void getProgramiv(int program, int pname, IntBuffer params) {
2719
2687
  gl2.glGetProgramiv(program, pname, params);
2720
2688
  }
2721
2689
 
2722
- /**
2723
- *
2724
- * @param program
2725
- * @return
2726
- */
2727
- @Override
2690
+ /**
2691
+ *
2692
+ * @param program
2693
+ * @return
2694
+ */
2695
+ @Override
2728
2696
  public String getProgramInfoLog(int program) {
2729
- int[] val = { 0 };
2697
+ int[] val = {0};
2730
2698
  gl2.glGetProgramiv(program, GL2ES2.GL_INFO_LOG_LENGTH, val, 0);
2731
2699
  int length = val[0];
2732
2700
 
@@ -2740,395 +2708,386 @@ public class PJOGL extends PGL {
2740
2708
  }
2741
2709
 
2742
2710
  ///////////////////////////////////////////////////////////
2743
-
2744
2711
  // Per-Fragment Operations
2745
-
2746
- /**
2747
- *
2748
- * @param x
2749
- * @param y
2750
- * @param w
2751
- * @param h
2752
- */
2753
-
2712
+ /**
2713
+ *
2714
+ * @param x
2715
+ * @param y
2716
+ * @param w
2717
+ * @param h
2718
+ */
2754
2719
  @Override
2755
2720
  public void scissor(int x, int y, int w, int h) {
2756
2721
  float scale = getPixelScale();
2757
- gl.glScissor((int)scale * x, (int)(scale * y), (int)(scale * w), (int)(scale * h));
2722
+ gl.glScissor((int) scale * x, (int) (scale * y), (int) (scale * w), (int) (scale * h));
2758
2723
  // gl.glScissor(x, y, w, h);
2759
2724
  }
2760
2725
 
2761
- /**
2762
- *
2763
- * @param value
2764
- * @param invert
2765
- */
2766
- @Override
2726
+ /**
2727
+ *
2728
+ * @param value
2729
+ * @param invert
2730
+ */
2731
+ @Override
2767
2732
  public void sampleCoverage(float value, boolean invert) {
2768
2733
  gl2.glSampleCoverage(value, invert);
2769
2734
  }
2770
2735
 
2771
- /**
2772
- *
2773
- * @param func
2774
- * @param ref
2775
- * @param mask
2776
- */
2777
- @Override
2736
+ /**
2737
+ *
2738
+ * @param func
2739
+ * @param ref
2740
+ * @param mask
2741
+ */
2742
+ @Override
2778
2743
  public void stencilFunc(int func, int ref, int mask) {
2779
2744
  gl2.glStencilFunc(func, ref, mask);
2780
2745
  }
2781
2746
 
2782
- /**
2783
- *
2784
- * @param face
2785
- * @param func
2786
- * @param ref
2787
- * @param mask
2788
- */
2789
- @Override
2747
+ /**
2748
+ *
2749
+ * @param face
2750
+ * @param func
2751
+ * @param ref
2752
+ * @param mask
2753
+ */
2754
+ @Override
2790
2755
  public void stencilFuncSeparate(int face, int func, int ref, int mask) {
2791
2756
  gl2.glStencilFuncSeparate(face, func, ref, mask);
2792
2757
  }
2793
2758
 
2794
- /**
2795
- *
2796
- * @param sfail
2797
- * @param dpfail
2798
- * @param dppass
2799
- */
2800
- @Override
2759
+ /**
2760
+ *
2761
+ * @param sfail
2762
+ * @param dpfail
2763
+ * @param dppass
2764
+ */
2765
+ @Override
2801
2766
  public void stencilOp(int sfail, int dpfail, int dppass) {
2802
2767
  gl2.glStencilOp(sfail, dpfail, dppass);
2803
2768
  }
2804
2769
 
2805
- /**
2806
- *
2807
- * @param face
2808
- * @param sfail
2809
- * @param dpfail
2810
- * @param dppass
2811
- */
2812
- @Override
2770
+ /**
2771
+ *
2772
+ * @param face
2773
+ * @param sfail
2774
+ * @param dpfail
2775
+ * @param dppass
2776
+ */
2777
+ @Override
2813
2778
  public void stencilOpSeparate(int face, int sfail, int dpfail, int dppass) {
2814
2779
  gl2.glStencilOpSeparate(face, sfail, dpfail, dppass);
2815
2780
  }
2816
2781
 
2817
- /**
2818
- *
2819
- * @param func
2820
- */
2821
- @Override
2782
+ /**
2783
+ *
2784
+ * @param func
2785
+ */
2786
+ @Override
2822
2787
  public void depthFunc(int func) {
2823
2788
  gl.glDepthFunc(func);
2824
2789
  }
2825
2790
 
2826
- /**
2827
- *
2828
- * @param mode
2829
- */
2830
- @Override
2791
+ /**
2792
+ *
2793
+ * @param mode
2794
+ */
2795
+ @Override
2831
2796
  public void blendEquation(int mode) {
2832
2797
  gl.glBlendEquation(mode);
2833
2798
  }
2834
2799
 
2835
- /**
2836
- *
2837
- * @param modeRGB
2838
- * @param modeAlpha
2839
- */
2840
- @Override
2800
+ /**
2801
+ *
2802
+ * @param modeRGB
2803
+ * @param modeAlpha
2804
+ */
2805
+ @Override
2841
2806
  public void blendEquationSeparate(int modeRGB, int modeAlpha) {
2842
2807
  gl.glBlendEquationSeparate(modeRGB, modeAlpha);
2843
2808
  }
2844
2809
 
2845
- /**
2846
- *
2847
- * @param src
2848
- * @param dst
2849
- */
2850
- @Override
2810
+ /**
2811
+ *
2812
+ * @param src
2813
+ * @param dst
2814
+ */
2815
+ @Override
2851
2816
  public void blendFunc(int src, int dst) {
2852
2817
  gl.glBlendFunc(src, dst);
2853
2818
  }
2854
2819
 
2855
- /**
2856
- *
2857
- * @param srcRGB
2858
- * @param dstRGB
2859
- * @param srcAlpha
2860
- * @param dstAlpha
2861
- */
2862
- @Override
2820
+ /**
2821
+ *
2822
+ * @param srcRGB
2823
+ * @param dstRGB
2824
+ * @param srcAlpha
2825
+ * @param dstAlpha
2826
+ */
2827
+ @Override
2863
2828
  public void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) {
2864
2829
  gl.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
2865
2830
  }
2866
2831
 
2867
- /**
2868
- *
2869
- * @param red
2870
- * @param green
2871
- * @param blue
2872
- * @param alpha
2873
- */
2874
- @Override
2832
+ /**
2833
+ *
2834
+ * @param red
2835
+ * @param green
2836
+ * @param blue
2837
+ * @param alpha
2838
+ */
2839
+ @Override
2875
2840
  public void blendColor(float red, float green, float blue, float alpha) {
2876
2841
  gl2.glBlendColor(red, green, blue, alpha);
2877
2842
  }
2878
2843
 
2879
2844
  ///////////////////////////////////////////////////////////
2880
-
2881
2845
  // Whole Framebuffer Operations
2882
-
2883
- /**
2884
- *
2885
- * @param r
2886
- * @param g
2887
- * @param b
2888
- * @param a
2889
- */
2890
-
2846
+ /**
2847
+ *
2848
+ * @param r
2849
+ * @param g
2850
+ * @param b
2851
+ * @param a
2852
+ */
2891
2853
  @Override
2892
2854
  public void colorMask(boolean r, boolean g, boolean b, boolean a) {
2893
2855
  gl.glColorMask(r, g, b, a);
2894
2856
  }
2895
2857
 
2896
- /**
2897
- *
2898
- * @param mask
2899
- */
2900
- @Override
2858
+ /**
2859
+ *
2860
+ * @param mask
2861
+ */
2862
+ @Override
2901
2863
  public void depthMask(boolean mask) {
2902
2864
  gl.glDepthMask(mask);
2903
2865
  }
2904
2866
 
2905
- /**
2906
- *
2907
- * @param mask
2908
- */
2909
- @Override
2867
+ /**
2868
+ *
2869
+ * @param mask
2870
+ */
2871
+ @Override
2910
2872
  public void stencilMask(int mask) {
2911
2873
  gl.glStencilMask(mask);
2912
2874
  }
2913
2875
 
2914
- /**
2915
- *
2916
- * @param face
2917
- * @param mask
2918
- */
2919
- @Override
2876
+ /**
2877
+ *
2878
+ * @param face
2879
+ * @param mask
2880
+ */
2881
+ @Override
2920
2882
  public void stencilMaskSeparate(int face, int mask) {
2921
2883
  gl2.glStencilMaskSeparate(face, mask);
2922
2884
  }
2923
2885
 
2924
- /**
2925
- *
2926
- * @param r
2927
- * @param g
2928
- * @param b
2929
- * @param a
2930
- */
2931
- @Override
2886
+ /**
2887
+ *
2888
+ * @param r
2889
+ * @param g
2890
+ * @param b
2891
+ * @param a
2892
+ */
2893
+ @Override
2932
2894
  public void clearColor(float r, float g, float b, float a) {
2933
2895
  gl.glClearColor(r, g, b, a);
2934
2896
  }
2935
2897
 
2936
- /**
2937
- *
2938
- * @param d
2939
- */
2940
- @Override
2898
+ /**
2899
+ *
2900
+ * @param d
2901
+ */
2902
+ @Override
2941
2903
  public void clearDepth(float d) {
2942
2904
  gl.glClearDepth(d);
2943
2905
  }
2944
2906
 
2945
- /**
2946
- *
2947
- * @param s
2948
- */
2949
- @Override
2907
+ /**
2908
+ *
2909
+ * @param s
2910
+ */
2911
+ @Override
2950
2912
  public void clearStencil(int s) {
2951
2913
  gl.glClearStencil(s);
2952
2914
  }
2953
2915
 
2954
- /**
2955
- *
2956
- * @param buf
2957
- */
2958
- @Override
2916
+ /**
2917
+ *
2918
+ * @param buf
2919
+ */
2920
+ @Override
2959
2921
  public void clear(int buf) {
2960
2922
  gl.glClear(buf);
2961
2923
  }
2962
2924
 
2963
2925
  ///////////////////////////////////////////////////////////
2964
-
2965
2926
  // Framebuffers Objects
2966
-
2967
- /**
2968
- *
2969
- * @param target
2970
- * @param framebuffer
2971
- */
2972
-
2927
+ /**
2928
+ *
2929
+ * @param target
2930
+ * @param framebuffer
2931
+ */
2973
2932
  @Override
2974
2933
  protected void bindFramebufferImpl(int target, int framebuffer) {
2975
2934
  gl.glBindFramebuffer(target, framebuffer);
2976
2935
  }
2977
2936
 
2978
- /**
2979
- *
2980
- * @param n
2981
- * @param framebuffers
2982
- */
2983
- @Override
2937
+ /**
2938
+ *
2939
+ * @param n
2940
+ * @param framebuffers
2941
+ */
2942
+ @Override
2984
2943
  public void deleteFramebuffers(int n, IntBuffer framebuffers) {
2985
2944
  gl.glDeleteFramebuffers(n, framebuffers);
2986
2945
  }
2987
2946
 
2988
- /**
2989
- *
2990
- * @param n
2991
- * @param framebuffers
2992
- */
2993
- @Override
2947
+ /**
2948
+ *
2949
+ * @param n
2950
+ * @param framebuffers
2951
+ */
2952
+ @Override
2994
2953
  public void genFramebuffers(int n, IntBuffer framebuffers) {
2995
2954
  gl.glGenFramebuffers(n, framebuffers);
2996
2955
  }
2997
2956
 
2998
- /**
2999
- *
3000
- * @param target
3001
- * @param renderbuffer
3002
- */
3003
- @Override
2957
+ /**
2958
+ *
2959
+ * @param target
2960
+ * @param renderbuffer
2961
+ */
2962
+ @Override
3004
2963
  public void bindRenderbuffer(int target, int renderbuffer) {
3005
2964
  gl.glBindRenderbuffer(target, renderbuffer);
3006
2965
  }
3007
2966
 
3008
- /**
3009
- *
3010
- * @param n
3011
- * @param renderbuffers
3012
- */
3013
- @Override
2967
+ /**
2968
+ *
2969
+ * @param n
2970
+ * @param renderbuffers
2971
+ */
2972
+ @Override
3014
2973
  public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
3015
2974
  gl.glDeleteRenderbuffers(n, renderbuffers);
3016
2975
  }
3017
2976
 
3018
- /**
3019
- *
3020
- * @param n
3021
- * @param renderbuffers
3022
- */
3023
- @Override
2977
+ /**
2978
+ *
2979
+ * @param n
2980
+ * @param renderbuffers
2981
+ */
2982
+ @Override
3024
2983
  public void genRenderbuffers(int n, IntBuffer renderbuffers) {
3025
2984
  gl.glGenRenderbuffers(n, renderbuffers);
3026
2985
  }
3027
2986
 
3028
- /**
3029
- *
3030
- * @param target
3031
- * @param internalFormat
3032
- * @param width
3033
- * @param height
3034
- */
3035
- @Override
2987
+ /**
2988
+ *
2989
+ * @param target
2990
+ * @param internalFormat
2991
+ * @param width
2992
+ * @param height
2993
+ */
2994
+ @Override
3036
2995
  public void renderbufferStorage(int target, int internalFormat, int width, int height) {
3037
2996
  gl.glRenderbufferStorage(target, internalFormat, width, height);
3038
2997
  }
3039
2998
 
3040
- /**
3041
- *
3042
- * @param target
3043
- * @param attachment
3044
- * @param rendbuferfTarget
3045
- * @param renderbuffer
3046
- */
3047
- @Override
2999
+ /**
3000
+ *
3001
+ * @param target
3002
+ * @param attachment
3003
+ * @param rendbuferfTarget
3004
+ * @param renderbuffer
3005
+ */
3006
+ @Override
3048
3007
  public void framebufferRenderbuffer(int target, int attachment, int rendbuferfTarget, int renderbuffer) {
3049
3008
  gl.glFramebufferRenderbuffer(target, attachment, rendbuferfTarget, renderbuffer);
3050
3009
  }
3051
3010
 
3052
- /**
3053
- *
3054
- * @param target
3055
- * @param attachment
3056
- * @param texTarget
3057
- * @param texture
3058
- * @param level
3059
- */
3060
- @Override
3011
+ /**
3012
+ *
3013
+ * @param target
3014
+ * @param attachment
3015
+ * @param texTarget
3016
+ * @param texture
3017
+ * @param level
3018
+ */
3019
+ @Override
3061
3020
  public void framebufferTexture2D(int target, int attachment, int texTarget, int texture, int level) {
3062
3021
  gl.glFramebufferTexture2D(target, attachment, texTarget, texture, level);
3063
3022
  }
3064
3023
 
3065
- /**
3066
- *
3067
- * @param target
3068
- * @return
3069
- */
3070
- @Override
3024
+ /**
3025
+ *
3026
+ * @param target
3027
+ * @return
3028
+ */
3029
+ @Override
3071
3030
  public int checkFramebufferStatus(int target) {
3072
3031
  return gl.glCheckFramebufferStatus(target);
3073
3032
  }
3074
3033
 
3075
- /**
3076
- *
3077
- * @param framebuffer
3078
- * @return
3079
- */
3080
- @Override
3034
+ /**
3035
+ *
3036
+ * @param framebuffer
3037
+ * @return
3038
+ */
3039
+ @Override
3081
3040
  public boolean isFramebuffer(int framebuffer) {
3082
3041
  return gl2.glIsFramebuffer(framebuffer);
3083
3042
  }
3084
3043
 
3085
- /**
3086
- *
3087
- * @param target
3088
- * @param attachment
3089
- * @param pname
3090
- * @param params
3091
- */
3092
- @Override
3044
+ /**
3045
+ *
3046
+ * @param target
3047
+ * @param attachment
3048
+ * @param pname
3049
+ * @param params
3050
+ */
3051
+ @Override
3093
3052
  public void getFramebufferAttachmentParameteriv(int target, int attachment, int pname, IntBuffer params) {
3094
3053
  gl2.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
3095
3054
  }
3096
3055
 
3097
- /**
3098
- *
3099
- * @param renderbuffer
3100
- * @return
3101
- */
3102
- @Override
3056
+ /**
3057
+ *
3058
+ * @param renderbuffer
3059
+ * @return
3060
+ */
3061
+ @Override
3103
3062
  public boolean isRenderbuffer(int renderbuffer) {
3104
3063
  return gl2.glIsRenderbuffer(renderbuffer);
3105
3064
  }
3106
3065
 
3107
- /**
3108
- *
3109
- * @param target
3110
- * @param pname
3111
- * @param params
3112
- */
3113
- @Override
3066
+ /**
3067
+ *
3068
+ * @param target
3069
+ * @param pname
3070
+ * @param params
3071
+ */
3072
+ @Override
3114
3073
  public void getRenderbufferParameteriv(int target, int pname, IntBuffer params) {
3115
3074
  gl2.glGetRenderbufferParameteriv(target, pname, params);
3116
3075
  }
3117
3076
 
3118
- /**
3119
- *
3120
- * @param srcX0
3121
- * @param srcY0
3122
- * @param srcX1
3123
- * @param srcY1
3124
- * @param dstX0
3125
- * @param dstY0
3126
- * @param dstX1
3127
- * @param dstY1
3128
- * @param mask
3129
- * @param filter
3130
- */
3131
- @Override
3077
+ /**
3078
+ *
3079
+ * @param srcX0
3080
+ * @param srcY0
3081
+ * @param srcX1
3082
+ * @param srcY1
3083
+ * @param dstX0
3084
+ * @param dstY0
3085
+ * @param dstX1
3086
+ * @param dstY1
3087
+ * @param mask
3088
+ * @param filter
3089
+ */
3090
+ @Override
3132
3091
  public void blitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) {
3133
3092
  if (gl2x != null) {
3134
3093
  gl2x.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
@@ -3141,15 +3100,15 @@ public class PJOGL extends PGL {
3141
3100
  }
3142
3101
  }
3143
3102
 
3144
- /**
3145
- *
3146
- * @param target
3147
- * @param samples
3148
- * @param format
3149
- * @param width
3150
- * @param height
3151
- */
3152
- @Override
3103
+ /**
3104
+ *
3105
+ * @param target
3106
+ * @param samples
3107
+ * @param format
3108
+ * @param width
3109
+ * @param height
3110
+ */
3111
+ @Override
3153
3112
  public void renderbufferStorageMultisample(int target, int samples, int format, int width, int height) {
3154
3113
  if (gl2x != null) {
3155
3114
  gl2x.glRenderbufferStorageMultisample(target, samples, format, width, height);
@@ -3162,11 +3121,11 @@ public class PJOGL extends PGL {
3162
3121
  }
3163
3122
  }
3164
3123
 
3165
- /**
3166
- *
3167
- * @param buf
3168
- */
3169
- @Override
3124
+ /**
3125
+ *
3126
+ * @param buf
3127
+ */
3128
+ @Override
3170
3129
  public void readBuffer(int buf) {
3171
3130
  if (gl2x != null) {
3172
3131
  gl2x.glReadBuffer(buf);
@@ -3179,11 +3138,11 @@ public class PJOGL extends PGL {
3179
3138
  }
3180
3139
  }
3181
3140
 
3182
- /**
3183
- *
3184
- * @param buf
3185
- */
3186
- @Override
3141
+ /**
3142
+ *
3143
+ * @param buf
3144
+ */
3145
+ @Override
3187
3146
  public void drawBuffer(int buf) {
3188
3147
  if (gl2x != null) {
3189
3148
  gl2x.glDrawBuffer(buf);