Bug 1384 - Allow GLRendererQuirks to be overridden by user properties
Summary: Allow GLRendererQuirks to be overridden by user properties
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2.4.0
Hardware: All all
: P2 enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 1383
  Show dependency treegraph
 
Reported: 2019-08-21 02:13 CEST by Sven Gothel
Modified: 2019-08-23 07:31 CEST (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
209bb2f0dc3418d168dc6887802bf4368b6d6f4e 2c4114b50f4023843073acf6d4cea223fb491e7e
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2019-08-21 02:13:27 CEST
Allow GLRendererQuirks to be overridden by user properties,
allowing to either force (inject) a quirk by a user property 
or to ignore a quirk by a user property.

This helps:
- debugging certain quirk behavior (See Bug 1383)
- allowing a user to customize the quirk setting

Proposal:
    /**
     * Allow overriding any quirk settings
     * via the two properties:
     * <ul>
     *   <li>jogl.quirks.force</li>
     *   <li>jogl.quirks.ignore</li>
     * </ul>
     * Both contain a list of capital sensitive quirk names separated by comma.
     * Example:
     * <pre>
     * java -Djogl.quirks.force=GL3CompatNonCompliant,NoFullFBOSupport -cp my_classpath some.main.Class
     * </pre>
     * <p>
     * Naturally, one quirk can only be listed in one override list.
     * Hence the two override sets force and ignore are unique.
     * </p>
     */
    public static enum Override {
        /**
         * No override.
         */
        NONE,
        /**
         * Enforce the quirk, i.e. allowing the code path to be injected w/o actual cause.
         */
        FORCE,
        /**
         * Ignore the quirk, i.e. don't set the quirk if otherwise caused.
         */
        IGNORE
    }
Comment 1 Sven Gothel 2019-08-21 02:20:43 CEST
commit 209bb2f0dc3418d168dc6887802bf4368b6d6f4e
adds this feature plus:

    +++
    
    This patch also refines the quirk: GLNonCompliant -> GL3CompatNonCompliant,
    i.e. constraints its semantics to GL3 compatible context.
    
    +++
    
    This patch also removed useless code of GLRendererQuirk,
    i.e. the 'int[] quirk' array arguments which are nonsense
    or wasteful, as we operate with bitmasks.
Comment 2 Sven Gothel 2019-08-23 07:31:52 CEST
commit 2c4114b50f4023843073acf6d4cea223fb491e7e
Move remaining 'lose' property quirks into GLRendererQuirks.Override