Remove JOGL and library specific AppSettings and the reflective code to instantiate non LWJGL3 desktop backends.
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
- Domain
- backend, desktop-dev
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
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jMonkeyEngine/jmonkeyengine
-
Documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jMonkeyEngine/jmonkeyengine#2928 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jMonkeyEngine/jmonkeyengine#2919 · 1 comment ·
Maintainers usually reply within 1 day
-
defect
Difficulty 1/5 Under an hour Newbie friendliness 88/100
jMonkeyEngine/jmonkeyengine#2717 ·
Maintainers usually reply within 1 day
-
Documentation
Difficulty 3/5 1-2 days Newbie friendliness 55/100
jMonkeyEngine/jmonkeyengine#2931 · 1 comment ·
Maintainers usually reply within 1 day
-
Documentation
Difficulty 3/5 1-2 days Newbie friendliness 57/100
jMonkeyEngine/jmonkeyengine#2930 · 3 comments ·
Maintainers usually reply within 1 day
All issues in jMonkeyEngine/jmonkeyengine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
openhab/openhab-addons#21882 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
YunaiV/ruoyi-vue-pro#1273 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#9253 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/hone-maven-plugin#1298 ·
Maintainers usually reply within 1 day