diff options
author | Sven Göthel <[email protected]> | 2024-02-01 15:37:03 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-01 15:37:03 +0100 |
commit | 9ff736464e0d2762c424bab66bc6d03ccc6e6d11 (patch) | |
tree | 14e1a383a86bca406608841c7e3acf5d44cbee11 /src/jogl/classes/com/jogamp/graph/curve | |
parent | ca846bc67e6a074a182e97f29b3c34b90a12cac3 (diff) |
Bug 805: Graph/GraphUI TextureSequence Scale: Move Region.COLORTEXTURE_LETTERBOX_RENDERING_BIT to TextureSequence and add enabling/disabling of aratio adjustment + letter-box back-color
TextureSequence color-texture params fetched from Graph VBORegion* and fed into shader.
This allows more flexibility in aspect-ratio adjustment as well as setting a clipping background color for
the added letter-box space.
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/Region.java | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java index fac65c6ee..0238ba154 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/Region.java +++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java @@ -150,29 +150,16 @@ public abstract class Region { /** * Rendering-Mode bit for {@link #getRenderModes() Region} * <p> - * If set, a color texture is used to determine the color. + * If set, a color texture is used to determine the color via {#link TextureSequence} passed to implementation, e.g. GLRegion. * </p> * <p> * This mode-bit is a shader-key. * </p> - * @see #COLORTEXTURE_LETTERBOX_RENDERING_BIT + * @see TextureSequence#useARatioAdjustment() + * @see TextureSequence#useARatioLetterbox() */ public static final int COLORTEXTURE_RENDERING_BIT = 1 << 10; - /** - * Rendering-Mode bit for {@link #getRenderModes() Region} - * <p> - * If set, a used {@link #COLORTEXTURE_RENDERING_BIT} color texture is added letter-box space to match aspect-ratio, otherwise it will be zoomed in. - * </p> - * <p> - * This mode-bit is not a shader-key. - * </p> - * <p> - * Note that {@link #COLORTEXTURE_RENDERING_BIT} must also be set to even enable color texture. - * </p> - */ - public static final int COLORTEXTURE_LETTERBOX_RENDERING_BIT = 1 << 11; - /** Minimum pass2 AA-quality rendering {@value} for Graph Region AA {@link Region#getRenderModes() render-modes}: {@link #VBAA_RENDERING_BIT}. */ public static final int MIN_AA_QUALITY = 0; /** Maximum pass2 AA-quality rendering {@value} for Graph Region AA {@link Region#getRenderModes() render-modes}: {@link #VBAA_RENDERING_BIT}. */ @@ -254,11 +241,6 @@ public abstract class Region { return 0 != (renderModes & Region.COLORTEXTURE_RENDERING_BIT); } - /** Returns true if given {@code renderModes} has {@link Region#COLORTEXTURE_LETTERBOX_RENDERING_BIT} set. */ - public static boolean isColorTextureLetterbox(final int renderModes) { - return 0 != ( renderModes & Region.COLORTEXTURE_LETTERBOX_RENDERING_BIT ); - } - /** * Returns a unique technical description string for renderModes as follows: * <pre> @@ -271,11 +253,7 @@ public abstract class Region { final String cChanS = hasColorChannel(renderModes) ? "-cols" : ""; final String cTexS; if( hasColorTexture(renderModes) ) { - if( Region.isColorTextureLetterbox(renderModes) ) { - cTexS = "-ctex_lbox"; - } else { - cTexS = "-ctex_zoom"; - } + cTexS = "-ctex"; } else { cTexS = ""; } @@ -420,11 +398,6 @@ public abstract class Region { return Region.hasColorTexture(renderModes); } - /** Returns true if given {@code renderModes} has {@link Region#COLORTEXTURE_LETTERBOX_RENDERING_BIT} set. */ - public final boolean isColorTextureLetterbox() { - return Region.isColorTextureLetterbox(renderModes); - } - /** See {@link #setFrustum(Frustum)} */ public final Frustum getFrustum() { return frustum; } |