summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-10 04:48:39 +0100
committerSven Gothel <[email protected]>2012-03-10 04:48:39 +0100
commit42a08f9c8a6b86a104d9feba6e29397933b020c5 (patch)
treec167312095de5c0fe14c2da17273ad853dd6ba3d /src/jogl/classes/javax
parent3424091ecaa0d885ce7fd7c3a2279930cfd56040 (diff)
Minor changes: DefaultGLCapabilitiesChooser + GearsES1/2 and Android demos
DefaultGLCapabilitiesChooser: Move 'static' values to final static. GearsES1/2: Handle width>=height case -> flip frustum. Android: Enable fps trace dump after visibility, use default RGBA_8888, Explicitly don't use swapInterval (-1). NEWTGearsES2TransActivity: Gather Screen size and set demo view 2/3 of it.
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
index 1bb509479..8aa6d5165 100644
--- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
@@ -88,6 +88,21 @@ import javax.media.nativewindow.CapabilitiesImmutable;
public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
private static final boolean DEBUG = Debug.isPropertyDefined("jogl.debug.CapabilitiesChooser", true, AccessController.getContext());
+ final static int NO_SCORE = -9999999;
+ final static int DOUBLE_BUFFER_MISMATCH_PENALTY = 1000;
+ final static int OPAQUE_MISMATCH_PENALTY = 750;
+ final static int STENCIL_MISMATCH_PENALTY = 500;
+ final static int MULTISAMPLE_MISMATCH_PENALTY = 500;
+ final static int MULTISAMPLE_EXTENSION_MISMATCH_PENALTY = 250; // just a little drop, no scale
+ // Pseudo attempt to keep equal rank penalties scale-equivalent
+ // (e.g., stencil mismatch is 3 * accum because there are 3 accum
+ // components)
+ final static int COLOR_MISMATCH_PENALTY_SCALE = 36;
+ final static int DEPTH_MISMATCH_PENALTY_SCALE = 6;
+ final static int ACCUM_MISMATCH_PENALTY_SCALE = 1;
+ final static int STENCIL_MISMATCH_PENALTY_SCALE = 3;
+ final static int MULTISAMPLE_MISMATCH_PENALTY_SCALE = 3;
+
public int chooseCapabilities(final CapabilitiesImmutable desired,
final List /*<CapabilitiesImmutable>*/ available,
final int windowSystemRecommendedChoice) {
@@ -122,20 +137,6 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
// Create score array
int[] scores = new int[availnum];
- final int NO_SCORE = -9999999;
- final int DOUBLE_BUFFER_MISMATCH_PENALTY = 1000;
- final int OPAQUE_MISMATCH_PENALTY = 750;
- final int STENCIL_MISMATCH_PENALTY = 500;
- final int MULTISAMPLE_MISMATCH_PENALTY = 500;
- final int MULTISAMPLE_EXTENSION_MISMATCH_PENALTY = 250; // just a little drop, no scale
- // Pseudo attempt to keep equal rank penalties scale-equivalent
- // (e.g., stencil mismatch is 3 * accum because there are 3 accum
- // components)
- final int COLOR_MISMATCH_PENALTY_SCALE = 36;
- final int DEPTH_MISMATCH_PENALTY_SCALE = 6;
- final int ACCUM_MISMATCH_PENALTY_SCALE = 1;
- final int STENCIL_MISMATCH_PENALTY_SCALE = 3;
- final int MULTISAMPLE_MISMATCH_PENALTY_SCALE = 3;
for (int i = 0; i < scores.length; i++) {
scores[i] = NO_SCORE;