JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
GLProfile0XBase.java
Go to the documentation of this file.
1/**
2 * Copyright 2010 JogAmp Community. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without modification, are
5 * permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice, this list of
8 * conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11 * of conditions and the following disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * The views and conclusions contained in the software and documentation are those of the
25 * authors and should not be interpreted as representing official policies, either expressed
26 * or implied, of JogAmp Community.
27 */
28
29package com.jogamp.opengl.test.junit.jogl.acore;
30
31import com.jogamp.opengl.GL;
32import com.jogamp.opengl.GLAutoDrawable;
33import com.jogamp.opengl.GLCapabilities;
34import com.jogamp.opengl.GLCapabilitiesImmutable;
35import com.jogamp.opengl.GLContext;
36import com.jogamp.opengl.GLDrawableFactory;
37import com.jogamp.opengl.GLEventListener;
38import com.jogamp.opengl.GLException;
39import com.jogamp.opengl.GLProfile;
40
41import org.junit.Assert;
42import org.junit.FixMethodOrder;
43import org.junit.runners.MethodSorters;
44
45import com.jogamp.common.os.Platform;
46import com.jogamp.common.util.PropertyAccess;
47import com.jogamp.newt.opengl.GLWindow;
48import com.jogamp.opengl.JoglVersion;
49import com.jogamp.opengl.test.junit.util.NewtTestUtil;
50import com.jogamp.opengl.test.junit.util.UITestCase;
51
52@FixMethodOrder(MethodSorters.NAME_ASCENDING)
53public abstract class GLProfile0XBase extends UITestCase {
54
55 //
56 // GL4bc, GL4, GL3bc, GL3, GL2, GL2GL3, GL4ES3, GL3ES3, GL2ES2, GL2ES1, GLES3, GLES2, GLES1
57 //
58 // Real: GL4bc, GL4, GL3bc, GL3, GL2, GLES3, GLES2, GLES1
59 // Maps: GL2GL3, GL4ES3, GL3ES3, GL2ES2, GL2ES1
60 //
61
62 protected static void validateGLProfileGL4bc(final GLProfile glp) {
63 Assert.assertTrue(glp.isGL4bc());
64 Assert.assertTrue(glp.isGL4());
65 Assert.assertTrue(glp.isGL3bc());
66 Assert.assertTrue(glp.isGL3());
67 Assert.assertTrue(glp.isGL2());
68 Assert.assertFalse(glp.isGLES3());
69 Assert.assertFalse(glp.isGLES2());
70 Assert.assertFalse(glp.isGLES1());
71 Assert.assertTrue(glp.isGL2GL3());
72 Assert.assertTrue(glp.isGL4ES3());
73 Assert.assertTrue(glp.isGL3ES3());
74 Assert.assertTrue(glp.isGL2ES2());
75 Assert.assertTrue(glp.isGL2ES1());
76 }
77 protected static void validateGL4bc(final GL gl) {
78 final GLContext ctx = gl.getContext();
79 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
80
81 Assert.assertTrue(gl.isGL4bc());
82 Assert.assertTrue(gl.isGL4());
83 Assert.assertTrue(gl.isGL3bc());
84 Assert.assertTrue(gl.isGL3());
85 Assert.assertTrue(gl.isGL2());
86 Assert.assertTrue(gl.isGL2GL3());
87 if( gles3CompatAvail ) {
88 Assert.assertTrue(gl.isGL4ES3());
89 } else {
90 Assert.assertFalse(gl.isGL4ES3());
91 }
92 Assert.assertTrue(gl.isGL3ES3());
93 Assert.assertTrue(gl.isGL2ES2());
94 Assert.assertTrue(gl.isGL2ES1());
95 Assert.assertFalse(gl.isGLES3());
96 Assert.assertFalse(gl.isGLES2());
97 Assert.assertFalse(gl.isGLES1());
98
99 Assert.assertTrue(ctx.isGL4bc());
100 Assert.assertTrue(ctx.isGL4());
101 Assert.assertTrue(ctx.isGL3bc());
102 Assert.assertTrue(ctx.isGL3());
103 Assert.assertTrue(ctx.isGL2());
104 Assert.assertTrue(ctx.isGL2GL3());
105 if( gles3CompatAvail ) {
106 Assert.assertTrue(ctx.isGL4ES3());
107 } else {
108 Assert.assertFalse(ctx.isGL4ES3());
109 }
110 Assert.assertTrue(ctx.isGL3ES3());
111 Assert.assertTrue(ctx.isGL2ES2());
112 Assert.assertTrue(ctx.isGL2ES1());
113 Assert.assertFalse(ctx.isGLES3());
114 Assert.assertFalse(ctx.isGLES2());
115 Assert.assertFalse(ctx.isGLES1());
116 }
117
118 protected static void validateGLProfileGL4(final GLProfile glp) {
119 Assert.assertFalse(glp.isGL4bc());
120 Assert.assertTrue(glp.isGL4());
121 Assert.assertFalse(glp.isGL3bc());
122 Assert.assertTrue(glp.isGL3());
123 Assert.assertFalse(glp.isGL2());
124 Assert.assertFalse(glp.isGLES3());
125 Assert.assertFalse(glp.isGLES2());
126 Assert.assertFalse(glp.isGLES1());
127 Assert.assertTrue(glp.isGL2GL3());
128 Assert.assertTrue(glp.isGL4ES3());
129 Assert.assertTrue(glp.isGL3ES3());
130 Assert.assertTrue(glp.isGL2ES2());
131 Assert.assertFalse(glp.isGL2ES1());
132 }
133 protected static void validateGL4(final GL gl) {
134 final GLContext ctx = gl.getContext();
135 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
136
137 Assert.assertFalse(gl.isGL4bc());
138 Assert.assertTrue(gl.isGL4());
139 Assert.assertFalse(gl.isGL3bc());
140 Assert.assertTrue(gl.isGL3());
141 Assert.assertFalse(gl.isGL2());
142 Assert.assertTrue(gl.isGL2GL3());
143 if( gles3CompatAvail ) {
144 Assert.assertTrue(gl.isGL4ES3());
145 } else {
146 Assert.assertFalse(gl.isGL4ES3());
147 }
148 Assert.assertTrue(gl.isGL3ES3());
149 Assert.assertTrue(gl.isGL2ES2());
150 Assert.assertFalse(gl.isGL2ES1());
151 Assert.assertFalse(gl.isGLES3());
152 Assert.assertFalse(gl.isGLES2());
153 Assert.assertFalse(gl.isGLES1());
154
155 Assert.assertFalse(ctx.isGL4bc());
156 Assert.assertTrue(ctx.isGL4());
157 Assert.assertFalse(ctx.isGL3bc());
158 Assert.assertTrue(ctx.isGL3());
159 Assert.assertFalse(ctx.isGL2());
160 Assert.assertTrue(ctx.isGL2GL3());
161 if( gles3CompatAvail ) {
162 Assert.assertTrue(ctx.isGL4ES3());
163 } else {
164 Assert.assertFalse(ctx.isGL4ES3());
165 }
166 Assert.assertTrue(ctx.isGL3ES3());
167 Assert.assertTrue(ctx.isGL2ES2());
168 Assert.assertFalse(ctx.isGL2ES1());
169 Assert.assertFalse(ctx.isGLES3());
170 Assert.assertFalse(ctx.isGLES2());
171 Assert.assertFalse(ctx.isGLES1());
172 }
173
174 protected static void validateGLProfileGL3bc(final GLProfile glp) {
175 Assert.assertFalse(glp.isGL4bc());
176 Assert.assertFalse(glp.isGL4());
177 Assert.assertTrue(glp.isGL3bc());
178 Assert.assertTrue(glp.isGL3());
179 Assert.assertTrue(glp.isGL2());
180 Assert.assertFalse(glp.isGLES3());
181 Assert.assertFalse(glp.isGLES2());
182 Assert.assertFalse(glp.isGLES1());
183 Assert.assertTrue(glp.isGL2GL3());
184 Assert.assertFalse(glp.isGL4ES3());
185 Assert.assertTrue(glp.isGL3ES3());
186 Assert.assertTrue(glp.isGL2ES2());
187 Assert.assertTrue(glp.isGL2ES1());
188 }
189 protected static void validateGL3bc(final GL gl) {
190 final GLContext ctx = gl.getContext();
191 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
192
193 Assert.assertFalse(gl.isGL4bc());
194 Assert.assertFalse(gl.isGL4());
195 Assert.assertTrue(gl.isGL3bc());
196 Assert.assertTrue(gl.isGL3());
197 Assert.assertTrue(gl.isGL2());
198 Assert.assertTrue(gl.isGL2GL3());
199 if( gles3CompatAvail ) { // possible w/ GL3 implementations!
200 Assert.assertTrue(gl.isGL4ES3());
201 } else {
202 Assert.assertFalse(gl.isGL4ES3());
203 }
204 Assert.assertTrue(gl.isGL3ES3());
205 Assert.assertTrue(gl.isGL2ES2());
206 Assert.assertTrue(gl.isGL2ES1());
207 Assert.assertFalse(gl.isGLES3());
208 Assert.assertFalse(gl.isGLES2());
209 Assert.assertFalse(gl.isGLES1());
210
211 Assert.assertFalse(ctx.isGL4bc());
212 Assert.assertFalse(ctx.isGL4());
213 Assert.assertTrue(ctx.isGL3bc());
214 Assert.assertTrue(ctx.isGL3());
215 Assert.assertTrue(ctx.isGL2());
216 Assert.assertTrue(ctx.isGL2GL3());
217 if( gles3CompatAvail ) { // possible w/ GL3 implementations!
218 Assert.assertTrue(ctx.isGL4ES3());
219 } else {
220 Assert.assertFalse(ctx.isGL4ES3());
221 }
222 Assert.assertTrue(ctx.isGL3ES3());
223 Assert.assertTrue(ctx.isGL2ES2());
224 Assert.assertTrue(ctx.isGL2ES1());
225 Assert.assertFalse(ctx.isGLES3());
226 Assert.assertFalse(ctx.isGLES2());
227 Assert.assertFalse(ctx.isGLES1());
228 }
229
230 protected static void validateGLProfileGL3(final GLProfile glp) {
231 Assert.assertFalse(glp.isGL4bc());
232 Assert.assertFalse(glp.isGL4());
233 Assert.assertFalse(glp.isGL3bc());
234 Assert.assertTrue(glp.isGL3());
235 Assert.assertFalse(glp.isGL2());
236 Assert.assertFalse(glp.isGLES3());
237 Assert.assertFalse(glp.isGLES2());
238 Assert.assertFalse(glp.isGLES1());
239 Assert.assertTrue(glp.isGL2GL3());
240 Assert.assertFalse(glp.isGL4ES3());
241 Assert.assertTrue(glp.isGL3ES3());
242 Assert.assertTrue(glp.isGL2ES2());
243 Assert.assertFalse(glp.isGL2ES1());
244 }
245 protected static void validateGL3(final GL gl) {
246 final GLContext ctx = gl.getContext();
247 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
248
249 Assert.assertFalse(gl.isGL4bc());
250 Assert.assertFalse(gl.isGL4());
251 Assert.assertFalse(gl.isGL3bc());
252 Assert.assertTrue(gl.isGL3());
253 Assert.assertFalse(gl.isGL2());
254 Assert.assertTrue(gl.isGL2GL3());
255 if( gles3CompatAvail ) { // possible w/ GL3 implementations!
256 Assert.assertTrue(gl.isGL4ES3());
257 } else {
258 Assert.assertFalse(gl.isGL4ES3());
259 }
260 Assert.assertTrue(gl.isGL3ES3());
261 Assert.assertTrue(gl.isGL2ES2());
262 Assert.assertFalse(gl.isGL2ES1());
263 Assert.assertFalse(gl.isGLES3());
264 Assert.assertFalse(gl.isGLES2());
265 Assert.assertFalse(gl.isGLES1());
266
267 Assert.assertFalse(ctx.isGL4bc());
268 Assert.assertFalse(ctx.isGL4());
269 Assert.assertFalse(ctx.isGL3bc());
270 Assert.assertTrue(ctx.isGL3());
271 Assert.assertFalse(ctx.isGL2());
272 Assert.assertTrue(ctx.isGL2GL3());
273 if( gles3CompatAvail ) { // possible w/ GL3 implementations!
274 Assert.assertTrue(ctx.isGL4ES3());
275 } else {
276 Assert.assertFalse(ctx.isGL4ES3());
277 }
278 Assert.assertTrue(ctx.isGL3ES3());
279 Assert.assertTrue(ctx.isGL2ES2());
280 Assert.assertFalse(ctx.isGL2ES1());
281 Assert.assertFalse(ctx.isGLES3());
282 Assert.assertFalse(ctx.isGLES2());
283 Assert.assertFalse(ctx.isGLES1());
284 }
285
286 protected static void validateGLProfileGL2(final GLProfile glp) {
287 Assert.assertFalse(glp.isGL4bc());
288 Assert.assertFalse(glp.isGL4());
289 Assert.assertFalse(glp.isGL3bc());
290 Assert.assertFalse(glp.isGL3());
291 Assert.assertTrue(glp.isGL2());
292 Assert.assertFalse(glp.isGLES3());
293 Assert.assertFalse(glp.isGLES2());
294 Assert.assertFalse(glp.isGLES1());
295 Assert.assertTrue(glp.isGL2GL3());
296 Assert.assertFalse(glp.isGL4ES3());
297 Assert.assertFalse(glp.isGL3ES3());
298 Assert.assertTrue(glp.isGL2ES2());
299 Assert.assertTrue(glp.isGL2ES1());
300 }
301 protected static void validateGL2(final GL gl) {
302 final GLContext ctx = gl.getContext();
303 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
304
305 Assert.assertFalse(gl.isGL4bc());
306 Assert.assertFalse(gl.isGL4());
307 Assert.assertFalse(gl.isGL3bc());
308 Assert.assertFalse(gl.isGL3());
309 Assert.assertTrue(gl.isGL2());
310 Assert.assertTrue(gl.isGL2GL3());
311 Assert.assertFalse(gl.isGL4ES3());
312 Assert.assertFalse(gl.isGL3ES3());
313 Assert.assertTrue(gl.isGL2ES2());
314 Assert.assertTrue(gl.isGL2ES1());
315 Assert.assertFalse(gl.isGLES3());
316 Assert.assertFalse(gl.isGLES2());
317 Assert.assertFalse(gl.isGLES1());
318
319 Assert.assertFalse(ctx.isGL4bc());
320 Assert.assertFalse(ctx.isGL4());
321 Assert.assertFalse(ctx.isGL3bc());
322 Assert.assertFalse(ctx.isGL3());
323 Assert.assertTrue(ctx.isGL2());
324 Assert.assertTrue(ctx.isGL2GL3());
325 Assert.assertFalse(ctx.isGL4ES3());
326 Assert.assertFalse(ctx.isGL3ES3());
327 Assert.assertFalse(gles3CompatAvail);
328 Assert.assertTrue(ctx.isGL2ES2());
329 Assert.assertTrue(ctx.isGL2ES1());
330 Assert.assertFalse(ctx.isGLES3());
331 Assert.assertFalse(ctx.isGLES2());
332 Assert.assertFalse(ctx.isGLES1());
333 }
334
335 protected static void validateGLProfileGLES3(final GLProfile glp) {
336 Assert.assertFalse(glp.isGL4bc());
337 Assert.assertFalse(glp.isGL4());
338 Assert.assertFalse(glp.isGL3bc());
339 Assert.assertFalse(glp.isGL3());
340 Assert.assertFalse(glp.isGL2());
341 Assert.assertTrue(glp.isGLES3());
342 Assert.assertTrue(glp.isGLES2());
343 Assert.assertFalse(glp.isGLES1());
344 Assert.assertFalse(glp.isGL2GL3());
345 Assert.assertTrue(glp.isGL4ES3());
346 Assert.assertTrue(glp.isGL3ES3());
347 Assert.assertTrue(glp.isGL2ES2());
348 Assert.assertFalse(glp.isGL2ES1());
349 }
350 protected static void validateGLES3(final GL gl) {
351 final GLContext ctx = gl.getContext();
352 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
353
354 Assert.assertFalse(gl.isGL4bc());
355 Assert.assertFalse(gl.isGL4());
356 Assert.assertFalse(gl.isGL3bc());
357 Assert.assertFalse(gl.isGL3());
358 Assert.assertFalse(gl.isGL2());
359 Assert.assertFalse(gl.isGL2GL3());
360 Assert.assertTrue(gl.isGL4ES3());
361 Assert.assertTrue(gl.isGL3ES3());
362 Assert.assertTrue(gl.isGL2ES2());
363 Assert.assertFalse(gl.isGL2ES1());
364 Assert.assertTrue(gl.isGLES3());
365 Assert.assertTrue(gl.isGLES2());
366 Assert.assertFalse(gl.isGLES1());
367
368 Assert.assertFalse(ctx.isGL4bc());
369 Assert.assertFalse(ctx.isGL4());
370 Assert.assertFalse(ctx.isGL3bc());
371 Assert.assertFalse(ctx.isGL3());
372 Assert.assertFalse(ctx.isGL2());
373 Assert.assertFalse(ctx.isGL2GL3());
374 Assert.assertTrue(ctx.isGL4ES3());
375 Assert.assertTrue(ctx.isGL3ES3());
376 Assert.assertTrue(gles3CompatAvail);
377 Assert.assertTrue(ctx.isGL2ES2());
378 Assert.assertFalse(ctx.isGL2ES1());
379 Assert.assertTrue(ctx.isGLES3());
380 Assert.assertTrue(ctx.isGLES2());
381 Assert.assertFalse(ctx.isGLES1());
382 }
383
384 protected static void validateGLProfileGLES2(final GLProfile glp) {
385 Assert.assertFalse(glp.isGL4bc());
386 Assert.assertFalse(glp.isGL4());
387 Assert.assertFalse(glp.isGL3bc());
388 Assert.assertFalse(glp.isGL3());
389 Assert.assertFalse(glp.isGL2());
390 Assert.assertFalse(glp.isGLES3());
391 Assert.assertTrue(glp.isGLES2());
392 Assert.assertFalse(glp.isGLES1());
393 Assert.assertFalse(glp.isGL2GL3());
394 Assert.assertFalse(glp.isGL4ES3());
395 Assert.assertFalse(glp.isGL3ES3());
396 Assert.assertTrue(glp.isGL2ES2());
397 Assert.assertFalse(glp.isGL2ES1());
398 }
399 protected static void validateGLES2(final GL gl) {
400 final GLContext ctx = gl.getContext();
401 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
402
403 Assert.assertFalse(gl.isGL4bc());
404 Assert.assertFalse(gl.isGL4());
405 Assert.assertFalse(gl.isGL3bc());
406 Assert.assertFalse(gl.isGL3());
407 Assert.assertFalse(gl.isGL2());
408 Assert.assertFalse(gl.isGL2GL3());
409 Assert.assertFalse(gl.isGL4ES3());
410 Assert.assertFalse(gl.isGL3ES3());
411 Assert.assertTrue(gl.isGL2ES2());
412 Assert.assertFalse(gl.isGL2ES1());
413 Assert.assertFalse(gl.isGLES3());
414 Assert.assertTrue(gl.isGLES2());
415 Assert.assertFalse(gl.isGLES1());
416
417 Assert.assertFalse(ctx.isGL4bc());
418 Assert.assertFalse(ctx.isGL4());
419 Assert.assertFalse(ctx.isGL3bc());
420 Assert.assertFalse(ctx.isGL3());
421 Assert.assertFalse(ctx.isGL2());
422 Assert.assertFalse(ctx.isGL2GL3());
423 Assert.assertFalse(ctx.isGL4ES3());
424 Assert.assertFalse(ctx.isGL3ES3());
425 Assert.assertFalse(gles3CompatAvail);
426 Assert.assertTrue(ctx.isGL2ES2());
427 Assert.assertFalse(ctx.isGL2ES1());
428 Assert.assertFalse(ctx.isGLES3());
429 Assert.assertTrue(ctx.isGLES2());
430 Assert.assertFalse(ctx.isGLES1());
431 }
432
433 protected static void validateGLProfileGLES1(final GLProfile glp) {
434 Assert.assertFalse(glp.isGL4bc());
435 Assert.assertFalse(glp.isGL4());
436 Assert.assertFalse(glp.isGL3bc());
437 Assert.assertFalse(glp.isGL3());
438 Assert.assertFalse(glp.isGL2());
439 Assert.assertFalse(glp.isGLES3());
440 Assert.assertFalse(glp.isGLES2());
441 Assert.assertTrue(glp.isGLES1());
442 Assert.assertFalse(glp.isGL2GL3());
443 Assert.assertFalse(glp.isGL4ES3());
444 Assert.assertFalse(glp.isGL3ES3());
445 Assert.assertFalse(glp.isGL2ES2());
446 Assert.assertTrue(glp.isGL2ES1());
447 }
448 protected static void validateGLES1(final GL gl) {
449 final GLContext ctx = gl.getContext();
450 final boolean gles3CompatAvail = ctx.isGLES3Compatible();
451
452 Assert.assertFalse(gl.isGL4bc());
453 Assert.assertFalse(gl.isGL4());
454 Assert.assertFalse(gl.isGL3bc());
455 Assert.assertFalse(gl.isGL3());
456 Assert.assertFalse(gl.isGL2());
457 Assert.assertFalse(gl.isGL2GL3());
458 Assert.assertFalse(gl.isGL4ES3());
459 Assert.assertFalse(gl.isGL3ES3());
460 Assert.assertFalse(gl.isGL2ES2());
461 Assert.assertTrue(gl.isGL2ES1());
462 Assert.assertFalse(gl.isGLES3());
463 Assert.assertFalse(gl.isGLES2());
464 Assert.assertTrue(gl.isGLES1());
465
466 Assert.assertFalse(ctx.isGL4bc());
467 Assert.assertFalse(ctx.isGL4());
468 Assert.assertFalse(ctx.isGL3bc());
469 Assert.assertFalse(ctx.isGL3());
470 Assert.assertFalse(ctx.isGL2());
471 Assert.assertFalse(ctx.isGL2GL3());
472 Assert.assertFalse(ctx.isGL4ES3());
473 Assert.assertFalse(ctx.isGL3ES3());
474 Assert.assertFalse(gles3CompatAvail);
475 Assert.assertFalse(ctx.isGL2ES2());
476 Assert.assertTrue(ctx.isGL2ES1());
477 Assert.assertFalse(ctx.isGLES3());
478 Assert.assertFalse(ctx.isGLES2());
479 Assert.assertTrue(ctx.isGLES1());
480 }
481
482 protected static void validateGLProfileGL2GL3(final GLProfile glp) {
483 if( glp.isGL4bc() ) {
484 validateGLProfileGL4bc(glp);
485 } else if(glp.isGL3bc()) {
486 validateGLProfileGL3bc(glp);
487 } else if(glp.isGL2()) {
488 validateGLProfileGL2(glp);
489 } else if(glp.isGL4()) {
490 validateGLProfileGL4(glp);
491 } else if(glp.isGL3()) {
492 validateGLProfileGL3(glp);
493 } else {
494 throw new GLException("GL2GL3 is neither GL4bc, GL3bc, GL2, GL4 nor GL3");
495 }
496 }
497 protected static void validateGL2GL3(final GL gl) {
498 if( gl.isGL4bc() ) {
499 validateGL4bc(gl);
500 } else if(gl.isGL3bc()) {
501 validateGL3bc(gl);
502 } else if(gl.isGL2()) {
503 validateGL2(gl);
504 } else if(gl.isGL4()) {
505 validateGL4(gl);
506 } else if(gl.isGL3()) {
507 validateGL3(gl);
508 } else {
509 throw new GLException("GL2GL3 is neither GL4bc, GL3bc, GL2, GL4 nor GL3");
510 }
511 }
512
513 protected static void validateGLProfileGL4ES3(final GLProfile glp) {
514 if( glp.isGL4bc() ) {
515 validateGLProfileGL4bc(glp);
516 } else if( glp.isGL4() ) {
517 validateGLProfileGL4(glp);
518 } else if( glp.isGLES3() ) {
519 validateGLProfileGLES3(glp);
520 } else {
521 throw new GLException("GL4ES3 is neither GL4bc, GL4 nor GLES3");
522 }
523 }
524 protected static void validateGL4ES3(final GL gl) {
525 if( gl.isGL4bc() ) {
526 validateGL4bc(gl);
527 } else if( gl.isGL4() ) {
528 validateGL4(gl);
529 } else if( gl.isGLES3() ) {
530 validateGLES3(gl);
531 } else {
532 throw new GLException("GL4ES3 is neither GL4bc, GL4 nor GLES3");
533 }
534 }
535
536 protected static void validateGLProfileGL2ES2(final GLProfile glp) {
537 if( glp.isGL4bc() ) {
538 validateGLProfileGL4bc(glp);
539 } else if(glp.isGL3bc()) {
540 validateGLProfileGL3bc(glp);
541 } else if(glp.isGL2()) {
542 validateGLProfileGL2(glp);
543 } else if(glp.isGL4()) {
544 validateGLProfileGL4(glp);
545 } else if(glp.isGL3()) {
546 validateGLProfileGL3(glp);
547 } else if(glp.isGLES3()) {
548 validateGLProfileGLES3(glp);
549 } else if(glp.isGLES2()) {
550 validateGLProfileGLES2(glp);
551 } else {
552 throw new GLException("GL2ES2 is neither GL4bc, GL3bc, GL2, GL4, GL3, GLES3 nor GLES2");
553 }
554 }
555 protected static void validateGL2ES2(final GL gl) {
556 if( gl.isGL4bc() ) {
557 validateGL4bc(gl);
558 } else if(gl.isGL3bc()) {
559 validateGL3bc(gl);
560 } else if(gl.isGL2()) {
561 validateGL2(gl);
562 } else if(gl.isGL4()) {
563 validateGL4(gl);
564 } else if(gl.isGL3()) {
565 validateGL3(gl);
566 } else if(gl.isGLES3()) {
567 validateGLES3(gl);
568 } else if(gl.isGLES2()) {
569 validateGLES2(gl);
570 } else {
571 throw new GLException("GL2ES2 is neither GL4bc, GL3bc, GL2, GL4, GL3, GLES3 nor GLES2");
572 }
573 }
574
575 protected static void validateGLProfileGL2ES1(final GLProfile glp) {
576 if( glp.isGL4bc() ) {
577 validateGLProfileGL4bc(glp);
578 } else if(glp.isGL3bc()) {
579 validateGLProfileGL3bc(glp);
580 } else if(glp.isGL2()) {
581 validateGLProfileGL2(glp);
582 } else if(glp.isGLES1()) {
583 validateGLProfileGLES1(glp);
584 } else {
585 throw new GLException("GL2ES1 is neither GL4bc, GL3bc, GL2 nor GLES1");
586 }
587 }
588 protected static void validateGL2ES1(final GL gl) {
589 if( gl.isGL4bc() ) {
590 validateGL4bc(gl);
591 } else if(gl.isGL3bc()) {
592 validateGL3bc(gl);
593 } else if(gl.isGL2()) {
594 validateGL2(gl);
595 } else if(gl.isGLES1()) {
596 validateGLES1(gl);
597 } else {
598 throw new GLException("GL2ES1 is neither GL4bc, GL3bc, GL2 nor GLES1");
599 }
600 }
601
602 protected static void validateOffline(final String requestedProfile, final GLProfile glp) {
603 System.err.println("GLProfile Mapping "+requestedProfile+" -> "+glp);
604
605 final boolean gles3CompatAvail = GLContext.isGLES3CompatibleAvailable(GLProfile.getDefaultDevice());
606 if( glp.getImplName().equals(GLProfile.GL4bc) ) {
607 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4bc));
608 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4));
609 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3bc));
610 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
611 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
612 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2GL3));
613 if( gles3CompatAvail ) {
614 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3));
615 } else {
616 Assert.assertFalse(GLProfile.isAvailable(GLProfile.GL4ES3));
617 }
618 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
619 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
620 } else if(glp.getImplName().equals(GLProfile.GL3bc)) {
621 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3bc));
622 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
623 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
624 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2GL3));
625 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
626 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
627 } else if(glp.getImplName().equals(GLProfile.GL2)) {
628 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
629 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2GL3));
630 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
631 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
632 } else if(glp.getImplName().equals(GLProfile.GL4)) {
633 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4));
634 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
635 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2GL3));
636 if( gles3CompatAvail ) {
637 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3));
638 } else {
639 Assert.assertFalse(GLProfile.isAvailable(GLProfile.GL4ES3));
640 }
641 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
642 } else if(glp.getImplName().equals(GLProfile.GL3)) {
643 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
644 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2GL3));
645 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
646 } else if(glp.getImplName().equals(GLProfile.GLES3)) {
647 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GLES3));
648 if( gles3CompatAvail ) {
649 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3));
650 } else {
651 Assert.assertFalse(GLProfile.isAvailable(GLProfile.GL4ES3));
652 }
653 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
654 } else if(glp.getImplName().equals(GLProfile.GLES2)) {
655 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GLES2));
656 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
657 } else if(glp.getImplName().equals(GLProfile.GLES1)) {
658 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GLES1));
659 Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
660 }
661 if( glp.isGL4bc() ) {
662 validateGLProfileGL4bc(glp);
663 } else if(glp.isGL3bc()) {
664 validateGLProfileGL3bc(glp);
665 } else if(glp.isGL2()) {
666 validateGLProfileGL2(glp);
667 } else if(glp.isGL4()) {
668 validateGLProfileGL4(glp);
669 } else if(glp.isGL3()) {
670 validateGLProfileGL3(glp);
671 } else if(glp.isGLES3()) {
672 validateGLProfileGLES3(glp);
673 } else if(glp.isGLES2()) {
674 validateGLProfileGLES2(glp);
675 } else if(glp.isGLES1()) {
676 validateGLProfileGLES1(glp);
677 }
678
679 if( requestedProfile == GLProfile.GL4bc ) {
680 validateGLProfileGL4bc(glp);
681 } else if( requestedProfile == GLProfile.GL3bc ) {
682 validateGLProfileGL3bc(glp);
683 } else if( requestedProfile == GLProfile.GL2 ) {
684 validateGLProfileGL2(glp);
685 } else if( requestedProfile == GLProfile.GL4 ) {
686 validateGLProfileGL4(glp);
687 } else if( requestedProfile == GLProfile.GL3 ) {
688 validateGLProfileGL3(glp);
689 } else if( requestedProfile == GLProfile.GLES3 ) {
690 validateGLProfileGLES3(glp);
691 } else if( requestedProfile == GLProfile.GLES2 ) {
692 validateGLProfileGLES2(glp);
693 } else if( requestedProfile == GLProfile.GLES1 ) {
694 validateGLProfileGLES1(glp);
695 } else if( requestedProfile == GLProfile.GL2GL3 ) {
696 validateGLProfileGL2GL3(glp);
697 } else if( requestedProfile == GLProfile.GL4ES3 ) {
698 validateGLProfileGL4ES3(glp);
699 } else if( requestedProfile == GLProfile.GL2ES2 ) {
700 validateGLProfileGL2ES2(glp);
701 } else if( requestedProfile == GLProfile.GL2ES1 ) {
702 validateGLProfileGL2ES1(glp);
703 }
704
705 }
706
707 protected static void validateOnline(final String requestedProfile, final GLProfile glpReq, final GL gl) {
708 final GLContext ctx = gl.getContext();
709 final GLProfile glp = gl.getGLProfile();
710
711 System.err.println("GLContext Mapping "+requestedProfile+" -> "+glpReq+" -> "+glp+" -> "+ctx.getGLVersion());
712
713 System.err.println("GL impl. class "+gl.getClass().getName());
714 if( gl.isGL4() ) {
715 Assert.assertNotNull( gl.getGL4() );
716 System.err.println("GL Mapping "+glp+" -> GL4");
717 }
718 if( gl.isGL4bc() ) {
719 Assert.assertNotNull( gl.getGL4bc() );
720 System.err.println("GL Mapping "+glp+" -> GL4bc");
721 }
722 if( gl.isGL3() ) {
723 Assert.assertNotNull( gl.getGL3() );
724 System.err.println("GL Mapping "+glp+" -> GL3");
725 }
726 if( gl.isGL3bc() ) {
727 Assert.assertNotNull( gl.getGL3bc() );
728 System.err.println("GL Mapping "+glp+" -> GL3bc");
729 }
730 if( gl.isGL2() ) {
731 Assert.assertNotNull( gl.getGL2() );
732 System.err.println("GL Mapping "+glp+" -> GL2");
733 }
734 if( gl.isGLES3() ) {
735 Assert.assertNotNull( gl.getGLES3() );
736 System.err.println("GL Mapping "+glp+" -> GLES3");
737 }
738 if( gl.isGLES2() ) {
739 Assert.assertNotNull( gl.getGLES2() );
740 System.err.println("GL Mapping "+glp+" -> GLES2");
741 }
742 if( gl.isGLES1() ) {
743 Assert.assertNotNull( gl.getGLES1() );
744 System.err.println("GL Mapping "+glp+" -> GLES1");
745 }
746 if( gl.isGL4ES3() ) {
747 Assert.assertNotNull( gl.getGL4ES3() );
748 System.err.println("GL Mapping "+glp+" -> GL4ES3");
749 }
750 if( gl.isGL3ES3() ) {
751 Assert.assertNotNull( gl.getGL3ES3() );
752 System.err.println("GL Mapping "+glp+" -> GL3ES3");
753 }
754 if( gl.isGL2GL3() ) {
755 Assert.assertNotNull( gl.getGL2GL3() );
756 System.err.println("GL Mapping "+glp+" -> GL2GL3");
757 }
758 if( gl.isGL2ES2() ) {
759 Assert.assertNotNull( gl.getGL2ES2() );
760 System.err.println("GL Mapping "+glp+" -> GL2ES2");
761 }
762 if( gl.isGL2ES1() ) {
763 Assert.assertNotNull( gl.getGL2ES1() );
764 System.err.println("GL Mapping "+glp+" -> GL2ES1");
765 }
766
767 if( gl.isGL4bc() ) {
768 validateGL4bc(gl);
769 } else if(gl.isGL3bc()) {
770 validateGL3bc(gl);
771 } else if(gl.isGL2()) {
772 validateGL2(gl);
773 } else if(gl.isGL4()) {
774 validateGL4(gl);
775 } else if(gl.isGL3()) {
776 validateGL3(gl);
777 } else if(gl.isGLES3()) {
778 validateGLES3(gl);
779 } else if(gl.isGLES2()) {
780 validateGLES2(gl);
781 } else if(gl.isGLES1()) {
782 validateGLES1(gl);
783 }
784
785 if( requestedProfile == GLProfile.GL4bc ) {
786 validateGL4bc(gl);
787 } else if( requestedProfile == GLProfile.GL3bc ) {
788 if( gl.isGL4bc() ) {
789 validateGL4bc(gl);
790 } else if( gl.isGL3bc() ) {
791 validateGL3bc(gl);
792 } else {
793 throw new GLException("GL3bc is neither GL4bc nor GL3bc");
794 }
795 } else if( requestedProfile == GLProfile.GL2 ) {
796 if( gl.isGL4bc() ) {
797 validateGL4bc(gl);
798 } else if( gl.isGL3bc() ) {
799 validateGL3bc(gl);
800 } else if( gl.isGL2() ) {
801 validateGL2(gl);
802 } else {
803 throw new GLException("GL2 is neither GL4bc, GL3bc, GL2");
804 }
805 } else if( requestedProfile == GLProfile.GL4 ) {
806 if( gl.isGL4bc() ) {
807 validateGL4bc(gl);
808 } else if( gl.isGL4() ) {
809 validateGL4(gl);
810 } else {
811 throw new GLException("GL4 is neither GL4bc, nor GL4");
812 }
813 } else if( requestedProfile == GLProfile.GL3 ) {
814 if( gl.isGL4bc() ) {
815 validateGL4bc(gl);
816 } else if( gl.isGL3bc() ) {
817 validateGL3bc(gl);
818 } else if( gl.isGL4() ) {
819 validateGL4(gl);
820 } else if( gl.isGL3() ) {
821 validateGL3(gl);
822 } else {
823 throw new GLException("GL3 is neither GL4bc, GL3bc, GL4 nor GL3");
824 }
825 } else if( requestedProfile == GLProfile.GLES3 ) {
826 validateGLES3(gl);
827 } else if( requestedProfile == GLProfile.GLES2 ) {
828 if( gl.isGLES3() ) {
829 validateGLES3(gl);
830 } else if( gl.isGLES2() ) {
831 validateGLES2(gl);
832 } else {
833 throw new GLException("GLES2 is neither GLES3 nor GLES2");
834 }
835 } else if( requestedProfile == GLProfile.GLES1 ) {
836 validateGLES1(gl);
837 } else if( requestedProfile == GLProfile.GL2GL3 ) {
838 validateGL2GL3(gl);
839 } else if( requestedProfile == GLProfile.GL4ES3 ) {
840 validateGL4ES3(gl);
841 } else if( requestedProfile == GLProfile.GL2ES2 ) {
842 validateGL2ES2(gl);
843 } else if( requestedProfile == GLProfile.GL2ES1 ) {
844 validateGL2ES1(gl);
845 }
846 }
847
848 protected void validateOnlineOnscreen(final String requestedProfile, final GLProfile glp) throws InterruptedException {
849 final GLCapabilitiesImmutable caps = new GLCapabilities(glp);
850 final GLWindow glWindow = GLWindow.create(caps);
851 Assert.assertNotNull(glWindow);
852 glWindow.setTitle(getSimpleTestName("."));
853
854 glWindow.addGLEventListener(new GLEventListener() {
855
856 public void init(final GLAutoDrawable drawable) {
857 final GL gl = drawable.getGL();
858 System.err.println(JoglVersion.getGLStrings(gl, null, false));
859
860 validateOnline(requestedProfile, glp, gl);
861 }
862
863 public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {
864 }
865
866 public void display(final GLAutoDrawable drawable) {
867 }
868
869 public void dispose(final GLAutoDrawable drawable) {
870 }
871 });
872
873 glWindow.setSize(128, 128);
874 glWindow.setVisible(true);
875 Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, true, null));
876 Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, true, null));
877
878 glWindow.display();
879 Thread.sleep(100);
880 // Same definition as in GLProfile for 'disableOpenGLARBContext'
881 final boolean isOSX = Platform.OSType.MACOS == Platform.getOSType();
882 final boolean disableOpenGLARBContext = null != System.getProperty("jogl.disable.openglarbcontext") && !isOSX;
883 if( disableOpenGLARBContext ) {
884 Assert.assertFalse("Property 'jogl.disable.openglarbcontext' set, but created w/ ARB",
886 }
887 glWindow.destroy();
888 Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, false, null));
889 Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, false, null));
890 }
891
892 protected void validateOnlineOffscreen(final String requestedProfile, final GLCapabilitiesImmutable caps)
893 throws InterruptedException {
894 final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile());
895 final GLAutoDrawable glad = factory.createOffscreenAutoDrawable(null, caps, null, 128, 128);
896 Assert.assertNotNull(glad);
897
899 public void init(final GLAutoDrawable drawable) {
900 final GL gl = drawable.getGL();
901 System.err.println(JoglVersion.getGLStrings(gl, null, false));
902
903 validateOnline(requestedProfile, caps.getGLProfile(), gl);
904 }
905
906 public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {
907 }
908
909 public void display(final GLAutoDrawable drawable) {
910 }
911
912 public void dispose(final GLAutoDrawable drawable) {
913 }
914 });
915 glad.display();
916 Thread.sleep(100);
917 // Same definition as in GLProfile for 'disableOpenGLARBContext'
918 final boolean isOSX = Platform.OSType.MACOS == Platform.getOSType();
919 final boolean disableOpenGLARBContext = PropertyAccess.isPropertyDefined("jogl.disable.openglarbcontext", true) && !isOSX;
920 if( disableOpenGLARBContext ) {
921 Assert.assertFalse("Property 'jogl.disable.openglarbcontext' set, but created w/ ARB",
923 }
924 glad.destroy();
925 }
926}
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
Definition: GLWindow.java:121
final void setTitle(final String title)
Definition: GLWindow.java:297
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
Definition: GLWindow.java:625
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
Definition: GLWindow.java:615
final void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
Definition: GLWindow.java:605
static GLWindow create(final GLCapabilitiesImmutable caps)
Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display wi...
Definition: GLWindow.java:169
Specifies a set of OpenGL capabilities.
Abstraction for an OpenGL rendering context.
Definition: GLContext.java:74
static final boolean isGLES3CompatibleAvailable(final AbstractGraphicsDevice device)
Returns true if a ES3 compatible profile is available, i.e.
final boolean isGL2()
Indicates whether this GLContext is capable of GL2.
final boolean isGL4bc()
Indicates whether this GLContext is capable of GL4bc.
final boolean isGL2GL3()
Indicates whether this GLContext is capable of GL2GL3.
final boolean isGL3()
Indicates whether this GLContext is capable of GL3.
final boolean isCreatedWithARBMethod()
Definition: GLContext.java:794
final boolean isGL2ES2()
Indicates whether this GLContext is capable of GL2ES2.
final boolean isGLES3Compatible()
Return true if this context is an ES3 context or implements the extension GL_ARB_ES3_compatibility,...
Definition: GLContext.java:906
final boolean isGL3ES3()
Indicates whether this GLContext is capable of GL3ES3.
final boolean isGLES2()
Indicates whether this GLContext is capable of GLES2.
final boolean isGLES3()
Indicates whether this GLContext is capable of GLES3.
final boolean isGL2ES1()
Indicates whether this GLContext is capable of GL2ES1.
final boolean isGLES1()
Indicates whether this GLContext is capable of GLES1.
final String getGLVersion()
Returns a valid OpenGL version string, ie
Definition: GLContext.java:769
final boolean isGL4()
Indicates whether this GLContext is capable of GL4.
final boolean isGL3bc()
Indicates whether this GLContext is capable of GL3bc.
final boolean isGL4ES3()
Returns true if this profile is capable of GL4ES3, i.e.
abstract GLOffscreenAutoDrawable createOffscreenAutoDrawable(AbstractGraphicsDevice device, GLCapabilitiesImmutable caps, GLCapabilitiesChooser chooser, int width, int height)
Creates a realized GLOffscreenAutoDrawable incl it's offscreen NativeSurface with the given capabilit...
static GLDrawableFactory getFactory(final GLProfile glProfile)
Returns the sole GLDrawableFactory instance.
A generic exception for OpenGL errors used throughout the binding as a substitute for RuntimeExceptio...
Specifies the the OpenGL profile.
Definition: GLProfile.java:77
static boolean isAvailable(final AbstractGraphicsDevice device, final String profile)
Returns the availability of a profile on a device.
Definition: GLProfile.java:305
final boolean isGLES3()
Indicates whether this profile is capable of GLES3.
static final String GLES3
The embedded OpenGL profile ES 3.x, with x >= 0.
Definition: GLProfile.java:588
static final String GL2ES2
The intersection of the desktop GL3, GL2 and embedded ES2 profile.
Definition: GLProfile.java:594
final boolean isGLES2()
Indicates whether this profile is capable of GLES2.
static final String GL3
The desktop OpenGL core profile 3.x, with x >= 1.
Definition: GLProfile.java:576
final boolean isGL4ES3()
Indicates whether this profile is capable of GL4ES3.
static final String GLES2
The embedded OpenGL profile ES 2.x, with x >= 0.
Definition: GLProfile.java:585
final boolean isGL2ES2()
Indicates whether this profile is capable of GL2ES2.
static final String GL4bc
The desktop OpenGL compatibility profile 4.x, with x >= 0, ie GL2 plus GL4.
Definition: GLProfile.java:566
final boolean isGL4bc()
Indicates whether this profile is capable of GL4bc.
static final String GL2GL3
The intersection of the desktop GL3 and GL2 profile.
Definition: GLProfile.java:597
final boolean isGLES1()
Indicates whether this profile is capable of GLES1.
final boolean isGL4()
Indicates whether this profile is capable of GL4.
final boolean isGL3ES3()
Indicates whether this profile is capable of GL3ES3.
final boolean isGL2GL3()
Indicates whether this profile is capable of GL2GL3.
static AbstractGraphicsDevice getDefaultDevice()
static final String GL3bc
The desktop OpenGL compatibility profile 3.x, with x >= 1, ie GL2 plus GL3.
Definition: GLProfile.java:573
static final String GL2
The desktop OpenGL profile 1.x up to 3.0.
Definition: GLProfile.java:579
final boolean isGL2ES1()
Indicates whether this profile is capable of GL2ES1.
final boolean isGL3bc()
Indicates whether this profile is capable of GL3bc.
static final String GLES1
The embedded OpenGL profile ES 1.x, with x >= 0.
Definition: GLProfile.java:582
final String getImplName()
return this profiles implementation name, eg.
static final String GL4ES3
The intersection of the desktop GL4 and ES3 profile, available only if either ES3 or GL4 w/ GL_ARB_ES...
Definition: GLProfile.java:600
static final String GL4
The desktop OpenGL core profile 4.x, with x >= 0.
Definition: GLProfile.java:569
final boolean isGL3()
Indicates whether this profile is capable of GL3.
final boolean isGL2()
Indicates whether this profile is capable of GL2 .
static final String GL2ES1
The intersection of the desktop GL2 and embedded ES1 profile.
Definition: GLProfile.java:591
static StringBuilder getGLStrings(final GL gl, final StringBuilder sb)
static void validateOffline(final String requestedProfile, final GLProfile glp)
static void validateOnline(final String requestedProfile, final GLProfile glpReq, final GL gl)
void validateOnlineOffscreen(final String requestedProfile, final GLCapabilitiesImmutable caps)
void validateOnlineOnscreen(final String requestedProfile, final GLProfile glp)
static boolean waitForRealized(final Screen screen, final boolean realized, final Runnable waitAction)
static boolean waitForVisible(final Window win, final boolean visible, final Runnable waitAction)
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
GL getGL()
Returns the GL pipeline object this GLAutoDrawable uses.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
GLContext getContext()
Returns the context associated with this drawable.
GLES1 getGLES1()
Casts this object to the GLES1 interface.
boolean isGL2GL3()
Indicates whether this GL object conforms to a GL2GL3 compatible profile.
boolean isGL2ES1()
Indicates whether this GL object conforms to a GL2ES1 compatible profile.
GL4ES3 getGL4ES3()
Casts this object to the GL4ES3 interface.
GL2ES1 getGL2ES1()
Casts this object to the GL2ES1 interface.
boolean isGL4bc()
Indicates whether this GL object conforms to the OpenGL ≥ 4.0 compatibility profile.
boolean isGL3ES3()
Indicates whether this GL object conforms to a GL3ES3 compatible profile.
GL2ES2 getGL2ES2()
Casts this object to the GL2ES2 interface.
GL4 getGL4()
Casts this object to the GL4 interface.
GLProfile getGLProfile()
Returns the GLProfile associated with this GL object.
GL3 getGL3()
Casts this object to the GL3 interface.
boolean isGL3()
Indicates whether this GL object conforms to the OpenGL ≥ 3.1 core profile.
boolean isGL2()
Indicates whether this GL object conforms to the OpenGL ≤ 3.0 profile.
boolean isGL2ES2()
Indicates whether this GL object conforms to a GL2ES2 compatible profile.
GL3bc getGL3bc()
Casts this object to the GL3bc interface.
boolean isGLES1()
Indicates whether this GL object conforms to the OpenGL ES ≥ 1.0 profile.
GLContext getContext()
Returns the GLContext associated which this GL object.
GLES2 getGLES2()
Casts this object to the GLES2 interface.
boolean isGLES3()
Indicates whether this GL object conforms to the OpenGL ES ≥ 3.0 profile.
boolean isGL4ES3()
Returns true if this GL object conforms to a GL4ES3 compatible profile, i.e.
GL2 getGL2()
Casts this object to the GL2 interface.
GLES3 getGLES3()
Casts this object to the GLES3 interface.
GL3ES3 getGL3ES3()
Casts this object to the GL3ES3 interface.
GL4bc getGL4bc()
Casts this object to the GL4bc interface.
boolean isGL3bc()
Indicates whether this GL object conforms to the OpenGL ≥ 3.1 compatibility profile.
boolean isGL4()
Indicates whether this GL object conforms to the OpenGL ≥ 4.0 core profile.
GL2GL3 getGL2GL3()
Casts this object to the GL2GL3 interface.
boolean isGLES2()
Indicates whether this GL object conforms to the OpenGL ES ≥ 2.0 profile.
Specifies an immutable set of OpenGL capabilities.
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.