diff options
author | Sven Gothel <[email protected]> | 2014-07-09 21:32:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-09 21:32:13 +0200 |
commit | efa5f1110725d41b7ea58010fe34b2a8aacd185b (patch) | |
tree | 61e5817a13717579f0b8853c8dc3498bc182a7bd /src/jogl/classes/com/jogamp/graph/curve | |
parent | 4fd8983ecce4c95ff502604fbeb4ecabcf1f5c26 (diff) |
Bug 801: Add Graph pass-2 shader for VBAA 'odd' sample count
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java index 289730ca0..23b82639f 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java @@ -323,14 +323,23 @@ public class RegionRenderer { PASS2_VBAA_QUAL0_SAMPLES4("vbaa", "_flipquad3", 4), /** Pass-2: VBAA Flipquad3, 8 samples */ PASS2_VBAA_QUAL0_SAMPLES8("vbaa", "_flipquad3", 8), - /** Pass-2: VBAA All-Equal, 2 samples */ - PASS2_VBAA_QUAL1_SAMPLES2("vbaa", "_allequal", 2), - /** Pass-2: VBAA All-Equal, 4 samples */ - PASS2_VBAA_QUAL1_SAMPLES4("vbaa", "_allequal", 4), - /** Pass-2: VBAA All-Equal, 6 samples */ - PASS2_VBAA_QUAL1_SAMPLES6("vbaa", "_allequal", 6), - /** Pass-2: VBAA All-Equal, 8 samples */ - PASS2_VBAA_QUAL1_SAMPLES8("vbaa", "_allequal", 8); + + /** Pass-2: VBAA Brute-Force, Odd, 1 samples */ + PASS2_VBAA_QUAL1_SAMPLES1("vbaa", "_bforce_odd", 1), + /** Pass-2: VBAA Brute-Force, Even, 2 samples */ + PASS2_VBAA_QUAL1_SAMPLES2("vbaa", "_bforce_even", 2), + /** Pass-2: VBAA Brute-Force, Odd, 3 samples */ + PASS2_VBAA_QUAL1_SAMPLES3("vbaa", "_bforce_odd", 3), + /** Pass-2: VBAA Brute-Force, Even, 4 samples */ + PASS2_VBAA_QUAL1_SAMPLES4("vbaa", "_bforce_even", 4), + /** Pass-2: VBAA Brute-Force, Odd, 5 samples */ + PASS2_VBAA_QUAL1_SAMPLES5("vbaa", "_bforce_odd", 5), + /** Pass-2: VBAA Brute-Force, Even, 6 samples */ + PASS2_VBAA_QUAL1_SAMPLES6("vbaa", "_bforce_even", 6), + /** Pass-2: VBAA Brute-Force, Odd, 7 samples */ + PASS2_VBAA_QUAL1_SAMPLES7("vbaa", "_bforce_odd", 7), + /** Pass-2: VBAA Brute-Force, Even, 8 samples */ + PASS2_VBAA_QUAL1_SAMPLES8("vbaa", "_bforce_even", 8); public final String tech; public final String sub; @@ -361,14 +370,16 @@ public class RegionRenderer { return PASS2_VBAA_QUAL0_SAMPLES8; } } else { - if( sampleCount < 4 ) { - return PASS2_VBAA_QUAL1_SAMPLES2; - } else if( sampleCount < 6 ) { - return PASS2_VBAA_QUAL1_SAMPLES4; - } else if( sampleCount < 8 ) { - return PASS2_VBAA_QUAL1_SAMPLES6; - } else { - return PASS2_VBAA_QUAL1_SAMPLES8; + switch( sampleCount ) { + case 0: // Fall through intended + case 1: return PASS2_VBAA_QUAL1_SAMPLES1; + case 2: return PASS2_VBAA_QUAL1_SAMPLES2; + case 3: return PASS2_VBAA_QUAL1_SAMPLES3; + case 4: return PASS2_VBAA_QUAL1_SAMPLES4; + case 5: return PASS2_VBAA_QUAL1_SAMPLES5; + case 6: return PASS2_VBAA_QUAL1_SAMPLES6; + case 7: return PASS2_VBAA_QUAL1_SAMPLES7; + default: return PASS2_VBAA_QUAL1_SAMPLES8; } } } else { |