Skip to content

Commit 6ade1a0

Browse files
committed
AppSettings: change the gamma-correction default from false to true
1 parent 30bddef commit 6ade1a0

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

jme3-core/src/main/java/com/jme3/system/AppSettings.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public final class AppSettings extends HashMap<String, Object> {
284284
defaults.put("SettingsDialogImage", "/com/jme3/app/Monkey.png");
285285
defaults.put("MinHeight", 0);
286286
defaults.put("MinWidth", 0);
287-
defaults.put("GammaCorrection", false);
287+
defaults.put("GammaCorrection", true);
288288
defaults.put("Resizable", false);
289289
defaults.put("SwapBuffers", true);
290290
defaults.put("OpenCL", false);
@@ -916,11 +916,13 @@ public void setSettingsDialogImage(String path) {
916916
}
917917

918918
/**
919-
* Enables Gamma Correction
920-
* This requires that the GPU supports GL_ARB_framebuffer_sRGB and will
921-
* disabled otherwise.
922-
* @param gammaCorrection
923-
* (Default : true)
919+
* Enable or disable gamma correction. If enabled, the main framebuffer will
920+
* be configured for sRGB colors, and sRGB images will be linearized.
921+
*
922+
* Gamma correction requires a GPU that supports GL_ARB_framebuffer_sRGB;
923+
* otherwise this setting will be ignoreded.
924+
*
925+
* @param gammaCorrection true to enable, false to disable (Default : true)
924926
*/
925927
public void setGammaCorrection(boolean gammaCorrection) {
926928
putBoolean("GammaCorrection", gammaCorrection);
@@ -1095,10 +1097,15 @@ public String getSettingsDialogImage() {
10951097
return getString("SettingsDialogImage");
10961098
}
10971099

1100+
/**
1101+
* Test whether gamma correction should be enabled.
1102+
*
1103+
* @return true for enabled, false for disabled
1104+
*/
10981105
public boolean isGammaCorrection() {
10991106
return getBoolean("GammaCorrection");
11001107
}
1101-
1108+
11021109
/**
11031110
* Allows the display window to be resized by dragging its edges.
11041111
*

0 commit comments

Comments
 (0)