AppSettings: change the gamma-correction default from false to true

master
Stephen Gold 5 years ago
parent 30bddef8c0
commit 6ade1a027e
  1. 21
      jme3-core/src/main/java/com/jme3/system/AppSettings.java

@ -284,7 +284,7 @@ public final class AppSettings extends HashMap<String, Object> {
defaults.put("SettingsDialogImage", "/com/jme3/app/Monkey.png"); defaults.put("SettingsDialogImage", "/com/jme3/app/Monkey.png");
defaults.put("MinHeight", 0); defaults.put("MinHeight", 0);
defaults.put("MinWidth", 0); defaults.put("MinWidth", 0);
defaults.put("GammaCorrection", false); defaults.put("GammaCorrection", true);
defaults.put("Resizable", false); defaults.put("Resizable", false);
defaults.put("SwapBuffers", true); defaults.put("SwapBuffers", true);
defaults.put("OpenCL", false); defaults.put("OpenCL", false);
@ -916,11 +916,13 @@ public final class AppSettings extends HashMap<String, Object> {
} }
/** /**
* Enables Gamma Correction * Enable or disable gamma correction. If enabled, the main framebuffer will
* This requires that the GPU supports GL_ARB_framebuffer_sRGB and will * be configured for sRGB colors, and sRGB images will be linearized.
* disabled otherwise. *
* @param gammaCorrection * Gamma correction requires a GPU that supports GL_ARB_framebuffer_sRGB;
* (Default : true) * otherwise this setting will be ignoreded.
*
* @param gammaCorrection true to enable, false to disable (Default : true)
*/ */
public void setGammaCorrection(boolean gammaCorrection) { public void setGammaCorrection(boolean gammaCorrection) {
putBoolean("GammaCorrection", gammaCorrection); putBoolean("GammaCorrection", gammaCorrection);
@ -1095,10 +1097,15 @@ public final class AppSettings extends HashMap<String, Object> {
return getString("SettingsDialogImage"); return getString("SettingsDialogImage");
} }
/**
* Test whether gamma correction should be enabled.
*
* @return true for enabled, false for disabled
*/
public boolean isGammaCorrection() { public boolean isGammaCorrection() {
return getBoolean("GammaCorrection"); return getBoolean("GammaCorrection");
} }
/** /**
* Allows the display window to be resized by dragging its edges. * Allows the display window to be resized by dragging its edges.
* *

Loading…
Cancel
Save