Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Remove JOGL and library specific AppSettings and the reflective code to instantiate non LWJGL3 desktop backends.

Open
#2,777 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java

Research direction

Start with AppSettings and JmeDesktopSystem, then review the progress in pull request #2776 and the backend modules such as jme3-lwjgl3. The work is ready when library-specific settings are deprecated, generic OpenGL settings are defined, and reflective desktop and audio backend selection is replaced with known class paths. The issue notes that this should follow removal of the lwjgl2 backend.

Written by the indexing model from the issue text.

Description

Refactoring and Cleanup

Originally jme used to support multiple opengl/al bindings on desktop, but nowadays we pretty much settled with LWJGL3.
We should deprecate all the LWJGL_ JOGL_ keys in AppSettings and add generic OPENGLXX OPENGLESXX to select opengl(es) versions (when possible).

We should also replace all this reflective code in JmeDesktopSystem

  @Override
    public JmeContext newContext(AppSettings settings, Type contextType) {
        initialize(settings);
        JmeContext ctx;
        if (settings.getRenderer() == null
                || settings.getRenderer().equals("NULL")
                || contextType == JmeContext.Type.Headless) {
            ctx = new NullContext();
            ctx.setSettings(settings);
        } else if (settings.getRenderer().startsWith("LWJGL") || settings.getRenderer().startsWith("ANGLE")) {
            ctx = newContextLwjgl(settings, contextType);
            ctx.setSettings(settings);
        } else if (settings.getRenderer().startsWith("JOGL")) {
            ctx = newContextJogl(settings, contextType);
            ctx.setSettings(settings);
        } else if (settings.getRenderer().startsWith("CUSTOM")) {
            ctx = newContextCustom(settings, contextType);
            ctx.setSettings(settings);
        } else {
            throw new UnsupportedOperationException(
                    "Unrecognizable renderer specified: "
                    + settings.getRenderer());
        }
        return ctx;
    }


    @Override
    public AudioRenderer newAudioRenderer(AppSettings settings) {
        initialize(settings);

        AL al;
        ALC alc;
        EFX efx;
        if (settings.getAudioRenderer().startsWith("LWJGL")) {
            al = newObject("com.jme3.audio.lwjgl.LwjglAL");
            alc = newObject("com.jme3.audio.lwjgl.LwjglALC");
            efx = newObject("com.jme3.audio.lwjgl.LwjglEFX");
        } else if (settings.getAudioRenderer().startsWith("JOAL")) {
            al = newObject("com.jme3.audio.joal.JoalAL");
            alc = newObject("com.jme3.audio.joal.JoalALC");
            efx = newObject("com.jme3.audio.joal.JoalEFX");
        } else {
            throw new UnsupportedOperationException(
                    "Unrecognizable audio renderer specified: "
                    + settings.getAudioRenderer());
        }

        if (al == null || alc == null || efx == null) {
            return null;
        }

        return new ALAudioRenderer(al, alc, efx);
    }


with known class paths eg. com.jme3.system.DesktopGL that the backend modules (such as jme3-lwjgl3) can implement.

This should probably be resolved after we get rid of the lwjgl2 backend.

Some non-breaking progress on this was made as part of https://github.com/jMonkeyEngine/jmonkeyengine/pull/2776 to simplify android development

Dominant language
Java
Stars
4.3k
Forks
1.2k
Avg merge
10h 57m
Merged PRs (30d)
21

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jMonkeyEngine/jmonkeyengine

All issues in jMonkeyEngine/jmonkeyengine

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.