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