Skip to content

Commit f85de8b

Browse files
authored
Merge branch 'jMonkeyEngine:master' into capdevon-Cinematic
2 parents 2a3d582 + 77fdf95 commit f85de8b

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2024 jMonkeyEngine
2+
* Copyright (c) 2009-2026 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -3492,19 +3492,11 @@ public void setMainFrameBufferSrgb(boolean enableSrgb) {
34923492
setFrameBuffer(null);
34933493

34943494
if (enableSrgb) {
3495-
if (
3496-
// Workaround: getBoolean(GLExt.GL_FRAMEBUFFER_SRGB_CAPABLE_EXT) causes error 1280 (invalid enum) on macos
3497-
JmeSystem.getPlatform().getOs() != Platform.Os.MacOS
3498-
&& !getBoolean(GLExt.GL_FRAMEBUFFER_SRGB_CAPABLE_EXT)
3499-
) {
3500-
logger.warning("Driver claims that default framebuffer " + "is not sRGB capable. Enabling anyway.");
3501-
}
3502-
35033495
gl.glEnable(GLExt.GL_FRAMEBUFFER_SRGB_EXT);
3504-
3505-
logger.log(Level.FINER, "SRGB FrameBuffer enabled (Gamma Correction)");
3496+
logger.log(Level.FINER, "sRGB FrameBuffer enabled (Gamma Correction)");
35063497
} else {
35073498
gl.glDisable(GLExt.GL_FRAMEBUFFER_SRGB_EXT);
3499+
logger.log(Level.FINER, "sRGB FrameBuffer disabled (Gamma Correction)");
35083500
}
35093501
}
35103502

jme3-core/src/main/java/com/jme3/util/TempVars.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.jme3.collision.bih.BIHNode.BIHStackData;
3737
import com.jme3.math.*;
3838
import com.jme3.scene.Spatial;
39+
import java.io.Closeable;
3940
import java.nio.FloatBuffer;
4041
import java.nio.IntBuffer;
4142
import java.util.ArrayList;
@@ -47,7 +48,7 @@
4748
* This returns an available instance of the TempVar class ensuring this
4849
* particular instance is never used elsewhere in the meantime.
4950
*/
50-
public class TempVars {
51+
public class TempVars implements Closeable{
5152

5253
/**
5354
* Allow X instances of TempVars in a single thread.
@@ -226,4 +227,9 @@ public void release() {
226227
public final CollisionResults collisionResults = new CollisionResults();
227228
public final float[] bihSwapTmp = new float[9];
228229
public final ArrayList<BIHStackData> bihStack = new ArrayList<>();
230+
231+
@Override
232+
public void close(){
233+
release();
234+
}
229235
}

0 commit comments

Comments
 (0)