diff options
author | Sven Göthel <[email protected]> | 2024-01-14 04:19:10 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-14 04:19:10 +0100 |
commit | 6363ae5fb6975a6f2e7c1093ce81f25b699e3e61 (patch) | |
tree | e19fb3347ea0562972c87b6b6fbbf771933646ae /src/jogl/classes/com/jogamp/opengl | |
parent | 3062f72c7b83cef71d8e6d471846449aba66d861 (diff) |
Graph/GraphUI: Revise Graph Region ShaderMapping, fix AABBox-Clipping for Pass2-AA, revise Pass2 AA Quality parameter ..
Misc:
- Graph VBORegion2PVBAAES2: Drop unused FBO rescale
- Move MIN/MAX QUALITY/SAMPLE from GraphUI Scene -> Graph Region
+++
Quality -> Pass2 AA Quality
- Drop quality field in region
- Pass quality to GLRegion.draw(..) similar to sampleCount
for dynamic shader and switch
- TODO: Pass quality parameter in TextRegionUtil's functions
Fix RegionRenderer Shader Mapping
- Use ShaderKey class to properly implement the hash value and equals method
- For this, TextureSequence.getTextureFragmentShaderHashID() has been added
to provide actual shader-snippet for the equals function
- All required criterias are included in the hash value and equals method
Fix AABBox Clipping for Pass-2 AA
- Clipping in pass2-AA must happen in pass2 on actual gcu_PMVMatrix01 (not ortho)
+++
GraphUI GraphShape
- Rename: [get,set]{->AA}Quality()
GraphUI Scene
- Rename: mark{All->}ShapesDirty(), set{AllShapes->}Sharpness(), set{AllShapes->AA}Quality()
- Fix setSampleCount(..), i.e. markStatesDirty() not markShapesDirty()
- Fix setAAQuality(), markShapesDirty() and markStatesDirty(): Use forAll(..) to traverse through all shapes and groups.
GraphUI Group
- Add setFixedSize()
- Add setClipOnBox()
- Document setRelayoutOnDirtyShapes(), isShapeDirty()
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java | 14 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java | 21 |
2 files changed, 29 insertions, 6 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java index 2da2dcbfc..99704ced0 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java @@ -159,6 +159,7 @@ public class ImageSequence implements TextureSequence { } else if(null != texLookupFuncName && texLookupFuncName.length()>0) { textureLookupFunctionName = texLookupFuncName; } + textureFragmentShaderHashCode = 0; return textureLookupFunctionName; } @@ -180,13 +181,22 @@ public class ImageSequence implements TextureSequence { } @Override + public String getTextureFragmentShaderHashID() { + // return getTextureSampler2DType()+";"+getTextureLookupFunctionName()+";"+getTextureLookupFragmentShaderImpl(); + if( useBuildInTexLookup ) { + return getTextureSampler2DType()+";"+getTextureLookupFunctionName(); + } else { + return getTextureLookupFragmentShaderImpl(); + } + } + + @Override public int getTextureFragmentShaderHashCode() { if( !isTextureAvailable() ) { textureFragmentShaderHashCode = 0; return 0; } else if( 0 == textureFragmentShaderHashCode ) { - int hash = 31 + getTextureLookupFragmentShaderImpl().hashCode(); - hash = ((hash << 5) - hash) + getTextureSampler2DType().hashCode(); + final int hash = getTextureFragmentShaderHashID().hashCode(); textureFragmentShaderHashCode = hash; } return textureFragmentShaderHashCode; diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java index 8376f0fa5..6aa70f014 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java @@ -274,19 +274,31 @@ public interface TextureSequence { * @throws IllegalStateException if instance is not initialized * @see #getTextureLookupFunctionName() * @see #setTextureLookupFunctionName(String) + * @see #getTextureFragmentShaderHashID() * @see #getTextureFragmentShaderHashCode() * @see #getTextureSampler2DType() */ public String getTextureLookupFragmentShaderImpl() throws IllegalStateException; /** - * Returns the hash code of the strings: + * Returns the concatenated string representing the following values + * utilized for {@link #getTextureFragmentShaderHashCode()}. * <ul> + * <li>{@link #getTextureSampler2DType()}</li> * <li>{@link #getTextureLookupFunctionName()}</li> * <li>{@link #getTextureLookupFragmentShaderImpl()}</li> - * <li>{@link #getTextureSampler2DType()}</li> * </ul> * <p> + * To reduce string concatenating, implementation may simply return {@link #getTextureLookupFragmentShaderImpl()}, + * if it covers {@link #getTextureSampler2DType()} and {@link #getTextureLookupFunctionName()}. + * </p> + * @see #getTextureFragmentShaderHashCode() + */ + public String getTextureFragmentShaderHashID(); + + /** + * Returns the hash code of the string {@link #getTextureFragmentShaderHashID()}. + * <p> * User shall call {@link #setTextureLookupFunctionName(String)} first if intended. * </p> * <p> @@ -296,12 +308,13 @@ public interface TextureSequence { * <p> * </p> * <p> - * Implementation caches the resulting hash code, - * which must be reset to zero if {@link #isTextureAvailable() texture is not available}. + * Implementation caches the resulting hash code, which is reset by {@link #setTextureLookupFunctionName(String)} + * and this method if {@link #isTextureAvailable() texture is not available}. * </p> * @see #setTextureLookupFunctionName(String) * @see #getTextureLookupFunctionName() * @see #getTextureLookupFragmentShaderImpl() + * @see #getTextureFragmentShaderHashID() */ public int getTextureFragmentShaderHashCode(); |