File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
jme3-core/src/main/java/com/jme3 Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 3636import com .jme3 .collision .bih .BIHNode .BIHStackData ;
3737import com .jme3 .math .*;
3838import com .jme3 .scene .Spatial ;
39+ import java .io .Closeable ;
3940import java .nio .FloatBuffer ;
4041import java .nio .IntBuffer ;
4142import java .util .ArrayList ;
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}
You can’t perform that action at this time.
0 commit comments