push settings into config
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-05-15 15:19:52 -04:00
parent d5f2ccc4dc
commit f65d56d667
21 changed files with 105 additions and 100 deletions

View File

@ -1822,6 +1822,7 @@ Move serviceManager into engineState
Move timeKeeper into engineState Move timeKeeper into engineState
Move signalSystem into engineState Move signalSystem into engineState
Move some global state into rendering engine Move some global state into rendering engine
Push settings into config variable

View File

@ -249,7 +249,7 @@ public class CameraEntityUtils {
* @return The far clip * @return The far clip
*/ */
public static float getFarClip(Entity camera){ public static float getFarClip(Entity camera){
return Globals.userSettings.getGraphicsViewDistance(); return Globals.gameConfigCurrent.getSettings().getGraphicsViewDistance();
} }
/** /**

View File

@ -100,8 +100,8 @@ public class FluidCellManager {
program = Globals.terrainShaderProgram; program = Globals.terrainShaderProgram;
// drawRadius = Globals.userSettings.getGraphicsPerformanceLODChunkRadius(); // drawRadius = Globals.userSettings.getGraphicsPerformanceLODChunkRadius();
drawStepdownInterval = Globals.userSettings.getGameplayPhysicsCellRadius(); drawStepdownInterval = Globals.gameConfigCurrent.getSettings().getGameplayPhysicsCellRadius();
physicsRadius = Globals.userSettings.getGameplayPhysicsCellRadius(); physicsRadius = Globals.gameConfigCurrent.getSettings().getGameplayPhysicsCellRadius();
invalidateAllCells(); invalidateAllCells();

View File

@ -194,7 +194,7 @@ public class FoliageCellManager {
*/ */
public void update(){ public void update(){
Globals.profiler.beginCpuSample("FoliageCellManager.update"); Globals.profiler.beginCpuSample("FoliageCellManager.update");
if(shouldUpdate && Globals.clientState.playerEntity != null && Globals.userSettings.getGraphicsPerformanceEnableFoliageManager()){ if(shouldUpdate && Globals.clientState.playerEntity != null && Globals.gameConfigCurrent.getSettings().getGraphicsPerformanceEnableFoliageManager()){
Vector3d playerPos = EntityUtils.getPosition(Globals.clientState.playerEntity); Vector3d playerPos = EntityUtils.getPosition(Globals.clientState.playerEntity);
Vector3i absVoxelPos = Globals.clientState.clientWorldData.convertRealToAbsoluteVoxelSpace(playerPos); Vector3i absVoxelPos = Globals.clientState.clientWorldData.convertRealToAbsoluteVoxelSpace(playerPos);
int distCache = this.getDistCache(this.lastPlayerPos, absVoxelPos); int distCache = this.getDistCache(this.lastPlayerPos, absVoxelPos);

View File

@ -42,16 +42,16 @@ public class ImGuiRenderer {
if(ImGui.collapsingHeader("Debug Toggles")){ if(ImGui.collapsingHeader("Debug Toggles")){
ImGui.indent(); ImGui.indent();
if(ImGui.button("Draw Client Hitboxes")){ if(ImGui.button("Draw Client Hitboxes")){
Globals.userSettings.setGraphicsDebugDrawCollisionSpheresClient(!Globals.userSettings.getGraphicsDebugDrawCollisionSpheresClient()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawCollisionSpheresClient(!Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawCollisionSpheresClient());
} }
if(ImGui.button("Draw Server Hitboxes")){ if(ImGui.button("Draw Server Hitboxes")){
Globals.userSettings.setGraphicsDebugDrawCollisionSpheresServer(!Globals.userSettings.getGraphicsDebugDrawCollisionSpheresServer()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawCollisionSpheresServer(!Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawCollisionSpheresServer());
} }
if(ImGui.button("Draw Physics Objects")){ if(ImGui.button("Draw Physics Objects")){
Globals.userSettings.setGraphicsDebugDrawPhysicsObjects(!Globals.userSettings.graphicsDebugDrawPhysicsObjects()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawPhysicsObjects(!Globals.gameConfigCurrent.getSettings().graphicsDebugDrawPhysicsObjects());
} }
if(ImGui.button("Draw Grid Alignment Data")){ if(ImGui.button("Draw Grid Alignment Data")){
Globals.userSettings.setGraphicsDebugDrawGridAlignment(!Globals.userSettings.getGraphicsDebugDrawGridAlignment()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawGridAlignment(!Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawGridAlignment());
} }
ImGui.unindent(); ImGui.unindent();
} }

View File

@ -259,7 +259,7 @@ public class MenuGeneratorsInGame {
//label (toggle draw client collision spheres) //label (toggle draw client collision spheres)
Button toggleClientCollisionSpheresButton = Button.createButton("Toggle draw client collision spheres", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){ Button toggleClientCollisionSpheresButton = Button.createButton("Toggle draw client collision spheres", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){
// Main.running = false; // Main.running = false;
Globals.userSettings.setGraphicsDebugDrawCollisionSpheresClient(!Globals.userSettings.getGraphicsDebugDrawCollisionSpheresClient()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawCollisionSpheresClient(!Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawCollisionSpheresClient());
return false; return false;
}}); }});
toggleClientCollisionSpheresButton.setMarginTop(BUTTON_MARGIN); toggleClientCollisionSpheresButton.setMarginTop(BUTTON_MARGIN);
@ -269,7 +269,7 @@ public class MenuGeneratorsInGame {
//label (toggle draw server collision spheres) //label (toggle draw server collision spheres)
Button toggleServerCollisionSpheresButton = Button.createButton("Toggle draw server collision spheres", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){ Button toggleServerCollisionSpheresButton = Button.createButton("Toggle draw server collision spheres", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){
// Main.running = false; // Main.running = false;
Globals.userSettings.setGraphicsDebugDrawCollisionSpheresServer(!Globals.userSettings.getGraphicsDebugDrawCollisionSpheresServer()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawCollisionSpheresServer(!Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawCollisionSpheresServer());
return false; return false;
}}); }});
toggleServerCollisionSpheresButton.setMarginTop(BUTTON_MARGIN); toggleServerCollisionSpheresButton.setMarginTop(BUTTON_MARGIN);
@ -279,7 +279,7 @@ public class MenuGeneratorsInGame {
//label (toggle draw physics objects) //label (toggle draw physics objects)
Button togglePhysicsObjectsButton = Button.createButton("Toggle draw physics objects", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){ Button togglePhysicsObjectsButton = Button.createButton("Toggle draw physics objects", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){
// Main.running = false; // Main.running = false;
Globals.userSettings.setGraphicsDebugDrawPhysicsObjects(!Globals.userSettings.graphicsDebugDrawPhysicsObjects()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawPhysicsObjects(!Globals.gameConfigCurrent.getSettings().graphicsDebugDrawPhysicsObjects());
return false; return false;
}}); }});
togglePhysicsObjectsButton.setMarginTop(BUTTON_MARGIN); togglePhysicsObjectsButton.setMarginTop(BUTTON_MARGIN);
@ -289,7 +289,7 @@ public class MenuGeneratorsInGame {
//toggle draw grid alignment data //toggle draw grid alignment data
Button toggleDrawGridAlignmentDataButton = Button.createButton("Toggle draw grid alignment data", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){ Button toggleDrawGridAlignmentDataButton = Button.createButton("Toggle draw grid alignment data", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){
// Main.running = false; // Main.running = false;
Globals.userSettings.setGraphicsDebugDrawGridAlignment(!Globals.userSettings.getGraphicsDebugDrawGridAlignment()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawGridAlignment(!Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawGridAlignment());
return false; return false;
}}); }});
toggleDrawGridAlignmentDataButton.setMarginTop(BUTTON_MARGIN); toggleDrawGridAlignmentDataButton.setMarginTop(BUTTON_MARGIN);
@ -299,7 +299,7 @@ public class MenuGeneratorsInGame {
//label (toggle draw movement vectors) //label (toggle draw movement vectors)
Button toggleMovementVectorsButton = Button.createButton("Toggle draw movement vectors", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){ Button toggleMovementVectorsButton = Button.createButton("Toggle draw movement vectors", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){
// Main.running = false; // Main.running = false;
Globals.userSettings.setGraphicsDebugDrawMovementVectors(!Globals.userSettings.graphicsDebugDrawMovementVectors()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawMovementVectors(!Globals.gameConfigCurrent.getSettings().graphicsDebugDrawMovementVectors());
return false; return false;
}}); }});
toggleMovementVectorsButton.setMarginTop(BUTTON_MARGIN); toggleMovementVectorsButton.setMarginTop(BUTTON_MARGIN);
@ -309,7 +309,7 @@ public class MenuGeneratorsInGame {
//label (toggle draw navmesh) //label (toggle draw navmesh)
Button toggleNavmeshButton = Button.createButton("Toggle draw navmesh", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){ Button toggleNavmeshButton = Button.createButton("Toggle draw navmesh", new ClickableElement.ClickEventCallback(){public boolean execute(ClickEvent event){
// Main.running = false; // Main.running = false;
Globals.userSettings.setGraphicsDebugDrawNavmesh(!Globals.userSettings.graphicsDebugDrawNavmesh()); Globals.gameConfigCurrent.getSettings().setGraphicsDebugDrawNavmesh(!Globals.gameConfigCurrent.getSettings().graphicsDebugDrawNavmesh());
return false; return false;
}}); }});
toggleNavmeshButton.setMarginTop(BUTTON_MARGIN); toggleNavmeshButton.setMarginTop(BUTTON_MARGIN);

View File

@ -20,6 +20,7 @@ import electrosphere.data.foliage.FoliageTypeMap;
import electrosphere.data.item.ItemDataMap; import electrosphere.data.item.ItemDataMap;
import electrosphere.data.item.source.ItemSourcingMap; import electrosphere.data.item.source.ItemSourcingMap;
import electrosphere.data.projectile.ProjectileTypeHolder; import electrosphere.data.projectile.ProjectileTypeHolder;
import electrosphere.data.settings.UserSettings;
import electrosphere.data.struct.StructureDataLoader; import electrosphere.data.struct.StructureDataLoader;
import electrosphere.data.tutorial.HintDefinition; import electrosphere.data.tutorial.HintDefinition;
import electrosphere.data.units.UnitDefinitionFile; import electrosphere.data.units.UnitDefinitionFile;
@ -34,6 +35,11 @@ import electrosphere.util.FileUtils;
* Current configuration for the data of the game * Current configuration for the data of the game
*/ */
public class Config { public class Config {
/**
* Top level user settings object
*/
UserSettings userSettings;
/** /**
* The container for all creature definitions * The container for all creature definitions
@ -108,6 +114,7 @@ public class Config {
*/ */
public static Config loadDefaultConfig(){ public static Config loadDefaultConfig(){
Config config = new Config(); Config config = new Config();
config.userSettings = UserSettings.loadUserSettings();
config.creatureTypeLoader = Config.loadCreatureTypes("Data/entity/creatures.json"); config.creatureTypeLoader = Config.loadCreatureTypes("Data/entity/creatures.json");
config.itemMap = ItemDataMap.loadItemFiles("Data/entity/items.json"); config.itemMap = ItemDataMap.loadItemFiles("Data/entity/items.json");
config.foliageMap = Config.loadFoliageTypes("Data/entity/foliage.json"); config.foliageMap = Config.loadFoliageTypes("Data/entity/foliage.json");
@ -258,6 +265,14 @@ public class Config {
return loader; return loader;
} }
/**
* Gets the user settings
* @return The user settings
*/
public UserSettings getSettings(){
return this.userSettings;
}
/** /**
* Gets the interface for creature definitions loaded into memory * Gets the interface for creature definitions loaded into memory
* @return The interface * @return The interface

View File

@ -1,6 +1,5 @@
package electrosphere.data.settings; package electrosphere.data.settings;
import electrosphere.engine.Globals;
import electrosphere.logger.LoggerInterface; import electrosphere.logger.LoggerInterface;
import electrosphere.util.FileUtils; import electrosphere.util.FileUtils;
@ -253,16 +252,13 @@ public class UserSettings {
/** /**
* Loads the user's settings * Loads the user's settings
*/ */
public static void loadUserSettings(){ public static UserSettings loadUserSettings(){
if(Globals.userSettings == null){ LoggerInterface.loggerStartup.INFO("Load user settings");
LoggerInterface.loggerStartup.INFO("Load user settings"); UserSettings rVal = FileUtils.loadObjectFromAssetPath("/Config/settings.json", UserSettings.class);
Globals.userSettings = FileUtils.loadObjectFromAssetPath("/Config/settings.json", UserSettings.class); if(rVal == null){
if(Globals.userSettings == null){ rVal = UserSettings.getDefault();
Globals.userSettings = getDefault();
}
Globals.WINDOW_WIDTH = Globals.userSettings.displayWidth;
Globals.WINDOW_HEIGHT = Globals.userSettings.displayHeight;
} }
return rVal;
} }

View File

@ -1,29 +1,37 @@
package electrosphere.engine; package electrosphere.engine;
import java.lang.management.ManagementFactory;
import electrosphere.engine.service.ServiceManager; import electrosphere.engine.service.ServiceManager;
import electrosphere.engine.signal.SignalSystem; import electrosphere.engine.signal.SignalSystem;
import electrosphere.engine.threads.ThreadManager; import electrosphere.engine.threads.ThreadManager;
import electrosphere.engine.time.Timekeeper; import electrosphere.engine.time.Timekeeper;
import electrosphere.logger.LoggerInterface;
/** /**
* State of the engine * State of the engine
*/ */
public class EngineState { public class EngineState {
/**
* Java Process ID for this application
*/
public String javaPID = ManagementFactory.getRuntimeMXBean().getName();
/** /**
* The time keeping service * The time keeping service
*/ */
public Timekeeper timekeeper = new Timekeeper(); public Timekeeper timekeeper;
/** /**
* The thread manager * The thread manager
*/ */
public final ThreadManager threadManager = new ThreadManager(); public final ThreadManager threadManager;
/** /**
* The service manager * The service manager
*/ */
public final ServiceManager serviceManager = ServiceManager.create(); public final ServiceManager serviceManager;
/** /**
* The signal system * The signal system
@ -34,6 +42,13 @@ public class EngineState {
* Constructor * Constructor
*/ */
public EngineState(){ public EngineState(){
//init loggers
LoggerInterface.initLoggers();
LoggerInterface.loggerStartup.INFO("Initialize global variables");
this.timekeeper = new Timekeeper();
this.serviceManager = ServiceManager.create();
this.threadManager = new ThreadManager();
this.threadManager.init(); this.threadManager.init();
this.signalSystem = (SignalSystem)this.serviceManager.registerService(new SignalSystem()); this.signalSystem = (SignalSystem)this.serviceManager.registerService(new SignalSystem());
} }

View File

@ -1,7 +1,5 @@
package electrosphere.engine; package electrosphere.engine;
import java.lang.management.ManagementFactory;
import electrosphere.audio.AudioEngine; import electrosphere.audio.AudioEngine;
import electrosphere.audio.VirtualAudioSourceManager; import electrosphere.audio.VirtualAudioSourceManager;
import electrosphere.audio.collision.HitboxAudioService; import electrosphere.audio.collision.HitboxAudioService;
@ -20,7 +18,6 @@ import electrosphere.controls.MouseCallback;
import electrosphere.controls.ScrollCallback; import electrosphere.controls.ScrollCallback;
import electrosphere.controls.cursor.CursorState; import electrosphere.controls.cursor.CursorState;
import electrosphere.data.particle.ParticleDefinition; import electrosphere.data.particle.ParticleDefinition;
import electrosphere.data.settings.UserSettings;
import electrosphere.data.voxel.VoxelType; import electrosphere.data.voxel.VoxelType;
import electrosphere.engine.assetmanager.AssetDataStrings; import electrosphere.engine.assetmanager.AssetDataStrings;
import electrosphere.engine.assetmanager.AssetManager; import electrosphere.engine.assetmanager.AssetManager;
@ -55,16 +52,6 @@ import electrosphere.util.FileUtils;
*/ */
public class Globals { public class Globals {
//
//Process data
//
public static String javaPID;
//
//Top level user settings object
//
public static UserSettings userSettings;
/** /**
* State for the engine * State for the engine
*/ */
@ -295,22 +282,19 @@ public class Globals {
* Inits globals * Inits globals
*/ */
public static void initGlobals(){ public static void initGlobals(){
//initialize logging interfaces
LoggerInterface.initLoggers();
LoggerInterface.loggerStartup.INFO("Initialize global variables");
//gets java pid of engine
if(Globals.javaPID == null){
Globals.javaPID = ManagementFactory.getRuntimeMXBean().getName();
}
//load user settings //load user settings
Globals.WINDOW_WIDTH = 1920; Globals.WINDOW_WIDTH = 1920;
Globals.WINDOW_HEIGHT = 1080; Globals.WINDOW_HEIGHT = 1080;
UserSettings.loadUserSettings();
//spin up engine state //spin up engine state
Globals.engineState = new EngineState(); Globals.engineState = new EngineState();
//game config
gameConfigDefault = electrosphere.data.Config.loadDefaultConfig();
gameConfigCurrent = gameConfigDefault;
NetConfig.readNetConfig();
//render flags //render flags
RENDER_FLAG_RENDER_SHADOW_MAP = false; RENDER_FLAG_RENDER_SHADOW_MAP = false;
RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER_CONTENT = false; RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER_CONTENT = false;
@ -337,16 +321,12 @@ public class Globals {
shaderOptionMap.debug(); shaderOptionMap.debug();
//load asset manager //load asset manager
assetManager = new AssetManager(); assetManager = new AssetManager();
//game config
gameConfigDefault = electrosphere.data.Config.loadDefaultConfig();
gameConfigCurrent = gameConfigDefault;
NetConfig.readNetConfig();
// //
//Values that depend on the loaded config //Values that depend on the loaded config
Globals.clientState.clientSelectedVoxelType = (VoxelType)gameConfigCurrent.getVoxelData().getTypes().toArray()[1]; Globals.clientState.clientSelectedVoxelType = (VoxelType)gameConfigCurrent.getVoxelData().getTypes().toArray()[1];
//net monitor //net monitor
if(Globals.userSettings.getNetRunNetMonitor()){ if(Globals.gameConfigCurrent.getSettings().getNetRunNetMonitor()){
netMonitor = new NetMonitor(); netMonitor = new NetMonitor();
} }
//profiler //profiler
@ -548,7 +528,6 @@ public class Globals {
Globals.engineState = null; Globals.engineState = null;
Globals.renderingEngine = null; Globals.renderingEngine = null;
Globals.fileWatcherService = null; Globals.fileWatcherService = null;
Globals.javaPID = null;
Globals.RENDER_FLAG_RENDER_SHADOW_MAP = true; Globals.RENDER_FLAG_RENDER_SHADOW_MAP = true;
Globals.RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER_CONTENT = false; Globals.RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER_CONTENT = false;
Globals.RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER = false; Globals.RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER = false;

View File

@ -79,7 +79,7 @@ public class Player {
this.connectionHandler = connectionHandler; this.connectionHandler = connectionHandler;
id = connectionHandler.getPlayerId(); id = connectionHandler.getPlayerId();
this.dbId = dbId; this.dbId = dbId;
this.simulationRadius = Globals.userSettings.getGameplayPhysicsCellRadius(); this.simulationRadius = Globals.gameConfigCurrent.getSettings().getGameplayPhysicsCellRadius();
} }
/** /**

View File

@ -225,15 +225,15 @@ public class RenderingEngine {
GLFW.glfwWindowHint(GLFW.GLFW_OPENGL_DEBUG_CONTEXT, GLFW.GLFW_TRUE); GLFW.glfwWindowHint(GLFW.GLFW_OPENGL_DEBUG_CONTEXT, GLFW.GLFW_TRUE);
} }
if(Globals.userSettings.getDisplayWidth() <= 0 || Globals.userSettings.getDisplayHeight() <= 0){ if(Globals.gameConfigCurrent.getSettings().getDisplayWidth() <= 0 || Globals.gameConfigCurrent.getSettings().getDisplayHeight() <= 0){
throw new Error("Trying to create window with width or height less than 1! " + Globals.userSettings.getDisplayWidth() + " " + Globals.userSettings.getDisplayHeight()); throw new Error("Trying to create window with width or height less than 1! " + Globals.gameConfigCurrent.getSettings().getDisplayWidth() + " " + Globals.gameConfigCurrent.getSettings().getDisplayHeight());
} }
//Creates the window reference object //Creates the window reference object
if(Globals.userSettings.displayFullscreen() || Globals.WINDOW_FULLSCREEN){ if(Globals.gameConfigCurrent.getSettings().displayFullscreen() || Globals.WINDOW_FULLSCREEN){
//below line is for fullscreen //below line is for fullscreen
Globals.window = GLFW.glfwCreateWindow(Globals.userSettings.getDisplayWidth(), Globals.userSettings.getDisplayHeight(), "ORPG", GLFW.glfwGetPrimaryMonitor(), NULL); Globals.window = GLFW.glfwCreateWindow(Globals.gameConfigCurrent.getSettings().getDisplayWidth(), Globals.gameConfigCurrent.getSettings().getDisplayHeight(), "ORPG", GLFW.glfwGetPrimaryMonitor(), NULL);
} else { } else {
Globals.window = GLFW.glfwCreateWindow(Globals.userSettings.getDisplayWidth(), Globals.userSettings.getDisplayHeight(), "ORPG", NULL, NULL); Globals.window = GLFW.glfwCreateWindow(Globals.gameConfigCurrent.getSettings().getDisplayWidth(), Globals.gameConfigCurrent.getSettings().getDisplayHeight(), "ORPG", NULL, NULL);
} }
// Errors for failure to create window (IE: No GUI mode on linux ?) // Errors for failure to create window (IE: No GUI mode on linux ?)
if (Globals.window == NULL) { if (Globals.window == NULL) {
@ -310,7 +310,7 @@ public class RenderingEngine {
//this disables vsync to make game run faster //this disables vsync to make game run faster
//https://stackoverflow.com/questions/55598376/glfwswapbuffers-is-slow //https://stackoverflow.com/questions/55598376/glfwswapbuffers-is-slow
if(!Globals.userSettings.graphicsPerformanceEnableVSync()){ if(!Globals.gameConfigCurrent.getSettings().graphicsPerformanceEnableVSync()){
GLFW.glfwSwapInterval(0); GLFW.glfwSwapInterval(0);
} }
@ -328,12 +328,12 @@ public class RenderingEngine {
defaultFramebuffer = new Framebuffer(GL_DEFAULT_FRAMEBUFFER); defaultFramebuffer = new Framebuffer(GL_DEFAULT_FRAMEBUFFER);
//generate framebuffers //generate framebuffers
Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
RenderingEngine.screenTextureColor = screenTextureColor; RenderingEngine.screenTextureColor = screenTextureColor;
Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
RenderingEngine.screenTextureDepth = screenTextureDepth; RenderingEngine.screenTextureDepth = screenTextureDepth;
try { try {
Framebuffer screenFramebuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), screenTextureColor, screenTextureDepth); Framebuffer screenFramebuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY(), screenTextureColor, screenTextureDepth);
RenderingEngine.screenFramebuffer = screenFramebuffer; RenderingEngine.screenFramebuffer = screenFramebuffer;
} catch (Exception e){ } catch (Exception e){
LoggerInterface.loggerRenderer.ERROR(e); LoggerInterface.loggerRenderer.ERROR(e);
@ -367,10 +367,10 @@ public class RenderingEngine {
// //
try { try {
volumeDepthShaderProgram = VisualShader.loadSpecificShader("/Shaders/core/volumeBuffer/volumetric.vs", "/Shaders/core/volumeBuffer/volumetric.fs"); volumeDepthShaderProgram = VisualShader.loadSpecificShader("/Shaders/core/volumeBuffer/volumetric.vs", "/Shaders/core/volumeBuffer/volumetric.fs");
volumeDepthBackfaceTexture = FramebufferUtils.generateDepthBufferTexture(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); volumeDepthBackfaceTexture = FramebufferUtils.generateDepthBufferTexture(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
volumeDepthBackfaceFramebuffer = FramebufferUtils.generateDepthBuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), volumeDepthBackfaceTexture); volumeDepthBackfaceFramebuffer = FramebufferUtils.generateDepthBuffer(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY(), volumeDepthBackfaceTexture);
volumeDepthFrontfaceTexture = FramebufferUtils.generateDepthBufferTexture(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); volumeDepthFrontfaceTexture = FramebufferUtils.generateDepthBufferTexture(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
volumeDepthFrontfaceFramebuffer = FramebufferUtils.generateDepthBuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), volumeDepthFrontfaceTexture); volumeDepthFrontfaceFramebuffer = FramebufferUtils.generateDepthBuffer(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY(), volumeDepthFrontfaceTexture);
} catch(Exception e){ } catch(Exception e){
LoggerInterface.loggerRenderer.ERROR(e); LoggerInterface.loggerRenderer.ERROR(e);
} }
@ -379,9 +379,9 @@ public class RenderingEngine {
//Game normals //Game normals
// //
try { try {
gameImageNormalsTexture = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); gameImageNormalsTexture = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
Texture gameImageNormalsDepthTexture = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); Texture gameImageNormalsDepthTexture = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
gameImageNormalsFramebuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), gameImageNormalsTexture, gameImageNormalsDepthTexture); gameImageNormalsFramebuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY(), gameImageNormalsTexture, gameImageNormalsDepthTexture);
renderNormalsShader = VisualShader.loadSpecificShader("Shaders/core/anime/renderNormals.vs", "Shaders/core/anime/renderNormals.fs"); renderNormalsShader = VisualShader.loadSpecificShader("Shaders/core/anime/renderNormals.vs", "Shaders/core/anime/renderNormals.fs");
} catch(Exception e){ } catch(Exception e){
LoggerInterface.loggerRenderer.ERROR(e); LoggerInterface.loggerRenderer.ERROR(e);
@ -392,24 +392,24 @@ public class RenderingEngine {
// //
try { try {
transparencyAccumulatorClear = new float[]{0.0f, 0.0f, 0.0f, 0.0f}; transparencyAccumulatorClear = new float[]{0.0f, 0.0f, 0.0f, 0.0f};
transparencyAccumulatorTexture = FramebufferUtils.generateOITAccumulatorTexture(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); transparencyAccumulatorTexture = FramebufferUtils.generateOITAccumulatorTexture(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
transparencyRevealageClear = new float[]{1.0f, 1.0f, 1.0f, 1.0f}; transparencyRevealageClear = new float[]{1.0f, 1.0f, 1.0f, 1.0f};
transparencyRevealageTexture = FramebufferUtils.generateOITRevealageTexture(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); transparencyRevealageTexture = FramebufferUtils.generateOITRevealageTexture(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
transparencyBuffer = FramebufferUtils.generateOITFramebuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), transparencyAccumulatorTexture, transparencyRevealageTexture, screenTextureDepth); transparencyBuffer = FramebufferUtils.generateOITFramebuffer(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY(), transparencyAccumulatorTexture, transparencyRevealageTexture, screenTextureDepth);
oitCompositeProgram = VisualShader.loadSpecificShader("Shaders/core/oit/composite.vs", "Shaders/core/oit/composite.fs"); oitCompositeProgram = VisualShader.loadSpecificShader("Shaders/core/oit/composite.vs", "Shaders/core/oit/composite.fs");
} catch(Exception e){ } catch(Exception e){
LoggerInterface.loggerRenderer.ERROR(e); LoggerInterface.loggerRenderer.ERROR(e);
} }
//projection matrices //projection matrices
nearVolumeProjectionMatrix.setPerspective((float)(Globals.userSettings.getGraphicsFOV() * Math.PI /180.0f), (float)Globals.WINDOW_WIDTH / (float)Globals.WINDOW_HEIGHT, 0.1f, 100); nearVolumeProjectionMatrix.setPerspective((float)(Globals.gameConfigCurrent.getSettings().getGraphicsFOV() * Math.PI /180.0f), (float)Globals.WINDOW_WIDTH / (float)Globals.WINDOW_HEIGHT, 0.1f, 100);
// //
//Compositing textures and buffers //Compositing textures and buffers
// //
try { try {
normalsOutlineTexture = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); normalsOutlineTexture = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
normalsOutlineFrambuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), normalsOutlineTexture); normalsOutlineFrambuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY(), normalsOutlineTexture);
Globals.assetManager.addShaderToQueue("Shaders/core/anime/outlineNormals.vs", "Shaders/core/anime/outlineNormals.fs"); Globals.assetManager.addShaderToQueue("Shaders/core/anime/outlineNormals.vs", "Shaders/core/anime/outlineNormals.fs");
} catch(Exception e){ } catch(Exception e){
LoggerInterface.loggerRenderer.ERROR(e); LoggerInterface.loggerRenderer.ERROR(e);
@ -472,10 +472,10 @@ public class RenderingEngine {
// //
// Projection and View matrix creation // Projection and View matrix creation
// //
this.verticalFOV = (float)(Globals.userSettings.getGraphicsFOV() * Math.PI /180.0f); this.verticalFOV = (float)(Globals.gameConfigCurrent.getSettings().getGraphicsFOV() * Math.PI /180.0f);
//set local aspect ratio and global aspect ratio at the same time //set local aspect ratio and global aspect ratio at the same time
this.aspectRatio = Globals.WINDOW_WIDTH / (float)Globals.WINDOW_HEIGHT; this.aspectRatio = Globals.WINDOW_WIDTH / (float)Globals.WINDOW_HEIGHT;
this.projectionMatrix.setPerspective(this.verticalFOV, this.aspectRatio, this.nearClip, Globals.userSettings.getGraphicsViewDistance()); this.projectionMatrix.setPerspective(this.verticalFOV, this.aspectRatio, this.nearClip, Globals.gameConfigCurrent.getSettings().getGraphicsViewDistance());
this.viewMatrix.translation(new Vector3d(0.0f,0.0f,-3.0f)); this.viewMatrix.translation(new Vector3d(0.0f,0.0f,-3.0f));
/** /**
@ -517,7 +517,7 @@ public class RenderingEngine {
//Render content to the game framebuffer //Render content to the game framebuffer
if(Globals.RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER_CONTENT && shouldRunPipelines()){ if(Globals.RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER_CONTENT && shouldRunPipelines()){
if(Globals.userSettings.getGraphicsPerformanceOIT()){ if(Globals.gameConfigCurrent.getSettings().getGraphicsPerformanceOIT()){
mainContentPipeline.render(openGLState, renderPipelineState); mainContentPipeline.render(openGLState, renderPipelineState);
} else { } else {
mainContentNoOITPipeline.render(openGLState, renderPipelineState); mainContentNoOITPipeline.render(openGLState, renderPipelineState);
@ -632,7 +632,7 @@ public class RenderingEngine {
public void calculateProjectionMatrix(){ public void calculateProjectionMatrix(){
float radVerticalFOV = (float)(this.verticalFOV * Math.PI /180.0f); float radVerticalFOV = (float)(this.verticalFOV * Math.PI /180.0f);
float nearClip = 0.001f; float nearClip = 0.001f;
this.projectionMatrix.setPerspective(radVerticalFOV, this.aspectRatio, nearClip, Globals.userSettings.getGraphicsViewDistance()); this.projectionMatrix.setPerspective(radVerticalFOV, this.aspectRatio, nearClip, Globals.gameConfigCurrent.getSettings().getGraphicsViewDistance());
} }
/** /**

View File

@ -28,7 +28,7 @@ public class MainContentNoOITPipeline implements RenderPipeline {
openGLState.glDepthTest(true); openGLState.glDepthTest(true);
openGLState.glDepthFunc(GL40.GL_LESS); openGLState.glDepthFunc(GL40.GL_LESS);
GL40.glDepthMask(true); GL40.glDepthMask(true);
openGLState.glViewport(Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); openGLState.glViewport(Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
openGLState.glBlend(true); openGLState.glBlend(true);
openGLState.glBlendFunci(0, GL40.GL_ONE, GL40.GL_ONE); openGLState.glBlendFunci(0, GL40.GL_ONE, GL40.GL_ONE);

View File

@ -41,7 +41,7 @@ public class MainContentPipeline implements RenderPipeline {
openGLState.glDepthTest(true); openGLState.glDepthTest(true);
openGLState.glDepthFunc(GL40.GL_LESS); openGLState.glDepthFunc(GL40.GL_LESS);
GL40.glDepthMask(true); GL40.glDepthMask(true);
openGLState.glViewport(Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); openGLState.glViewport(Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
/// ///
/// R E N D E R I N G S T U F F /// R E N D E R I N G S T U F F

View File

@ -35,7 +35,7 @@ public class NormalsForOutlinePipeline implements RenderPipeline {
openGLState.glDepthFunc(GL40.GL_LESS); openGLState.glDepthFunc(GL40.GL_LESS);
GL40.glDepthMask(true); GL40.glDepthMask(true);
openGLState.glViewport(Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); openGLState.glViewport(Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
/// ///
/// R E N D E R I N G S T U F F /// R E N D E R I N G S T U F F

View File

@ -37,10 +37,10 @@ public class PostProcessingPipeline implements RenderPipeline {
*/ */
public void init(OpenGLState openGLState){ public void init(OpenGLState openGLState){
postProcessingShader = VisualShader.loadSpecificShader("Shaders/core/postprocessing/postprocessing.vs", "Shaders/core/postprocessing/postprocessing.fs"); postProcessingShader = VisualShader.loadSpecificShader("Shaders/core/postprocessing/postprocessing.vs", "Shaders/core/postprocessing/postprocessing.fs");
Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); Texture screenTextureColor = FramebufferUtils.generateScreenTextureColorAlpha(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); Texture screenTextureDepth = FramebufferUtils.generateScreenTextureDepth(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
try { try {
postProcessBuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY(), screenTextureColor, screenTextureDepth); postProcessBuffer = FramebufferUtils.generateScreenTextureFramebuffer(openGLState, Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY(), screenTextureColor, screenTextureDepth);
} catch (Exception e){ } catch (Exception e){
LoggerInterface.loggerRenderer.ERROR(e); LoggerInterface.loggerRenderer.ERROR(e);
} }
@ -54,7 +54,7 @@ public class PostProcessingPipeline implements RenderPipeline {
// //
openGLState.glDepthTest(false); openGLState.glDepthTest(false);
openGLState.glBlend(false); openGLState.glBlend(false);
openGLState.glViewport(Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); openGLState.glViewport(Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
postProcessBuffer.bind(openGLState); postProcessBuffer.bind(openGLState);

View File

@ -43,7 +43,7 @@ public class DebugBonesPipeline implements RenderPipeline {
openGLState.glDepthFunc(GL40.GL_LESS); openGLState.glDepthFunc(GL40.GL_LESS);
GL40.glDepthMask(true); GL40.glDepthMask(true);
openGLState.glBlend(false); openGLState.glBlend(false);
openGLState.glViewport(Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); openGLState.glViewport(Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
/// ///
/// R E N D E R I N G S T U F F /// R E N D E R I N G S T U F F

View File

@ -54,7 +54,7 @@ public class DebugContentPipeline implements RenderPipeline {
openGLState.glDepthTest(true); openGLState.glDepthTest(true);
openGLState.glDepthFunc(GL40.GL_LESS); openGLState.glDepthFunc(GL40.GL_LESS);
GL40.glDepthMask(true); GL40.glDepthMask(true);
openGLState.glViewport(Globals.userSettings.getRenderResolutionX(), Globals.userSettings.getRenderResolutionY()); openGLState.glViewport(Globals.gameConfigCurrent.getSettings().getRenderResolutionX(), Globals.gameConfigCurrent.getSettings().getRenderResolutionY());
/// ///
/// R E N D E R I N G S T U F F /// R E N D E R I N G S T U F F
@ -75,7 +75,7 @@ public class DebugContentPipeline implements RenderPipeline {
Matrix4d modelTransformMatrix = new Matrix4d(); Matrix4d modelTransformMatrix = new Matrix4d();
if(Globals.userSettings.getGraphicsDebugDrawCollisionSpheresClient()){ if(Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawCollisionSpheresClient()){
Model hitboxModel; Model hitboxModel;
for(HitboxCollectionState hitboxState : Globals.clientState.clientSceneWrapper.getHitboxManager().getAllHitboxes()){ for(HitboxCollectionState hitboxState : Globals.clientState.clientSceneWrapper.getHitboxManager().getAllHitboxes()){
for(DGeom geom : hitboxState.getGeometries()){ for(DGeom geom : hitboxState.getGeometries()){
@ -127,7 +127,7 @@ public class DebugContentPipeline implements RenderPipeline {
} }
} }
} }
if(Globals.userSettings.getGraphicsDebugDrawCollisionSpheresServer()){ if(Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawCollisionSpheresServer()){
Model hitboxModel; Model hitboxModel;
int serverIdForClientEntity = Globals.clientState.clientSceneWrapper.mapClientToServerId(Globals.clientState.playerEntity.getId()); int serverIdForClientEntity = Globals.clientState.clientSceneWrapper.mapClientToServerId(Globals.clientState.playerEntity.getId());
Entity serverPlayerEntity = EntityLookupUtils.getEntityById(serverIdForClientEntity); Entity serverPlayerEntity = EntityLookupUtils.getEntityById(serverIdForClientEntity);
@ -184,7 +184,7 @@ public class DebugContentPipeline implements RenderPipeline {
} }
} }
if(Globals.userSettings.graphicsDebugDrawPhysicsObjects()){ if(Globals.gameConfigCurrent.getSettings().graphicsDebugDrawPhysicsObjects()){
Model physicsGraphicsModel; Model physicsGraphicsModel;
CollisionEngine engine = Globals.clientState.clientSceneWrapper.getCollisionEngine(); CollisionEngine engine = Globals.clientState.clientSceneWrapper.getCollisionEngine();
for(Collidable collidable : engine.getCollidables()){ for(Collidable collidable : engine.getCollidables()){
@ -236,7 +236,7 @@ public class DebugContentPipeline implements RenderPipeline {
// //
//Draw grid alignment data //Draw grid alignment data
if(Globals.userSettings.getGraphicsDebugDrawGridAlignment()){ if(Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawGridAlignment()){
Model physicsGraphicsModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITCUBE); Model physicsGraphicsModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITCUBE);
for(Entity entity : Globals.clientState.clientSceneWrapper.getScene().getEntityList()){ for(Entity entity : Globals.clientState.clientSceneWrapper.getScene().getEntityList()){
CommonEntityType data = CommonEntityUtils.getCommonData(entity); CommonEntityType data = CommonEntityUtils.getCommonData(entity);
@ -269,7 +269,7 @@ public class DebugContentPipeline implements RenderPipeline {
//update pipeline state to use mats again //update pipeline state to use mats again
renderPipelineState.setUseMaterial(true); renderPipelineState.setUseMaterial(true);
if(Globals.userSettings.graphicsDebugDrawNavmesh()){ if(Globals.gameConfigCurrent.getSettings().graphicsDebugDrawNavmesh()){
throw new Error("Not yet implemented!"); throw new Error("Not yet implemented!");
} }

View File

@ -271,7 +271,7 @@ public class ActorPanel extends BufferedStandardDrawableContainerElement impleme
actor.applySpatialData(modelMatrix,new Vector3d(actorPosition)); actor.applySpatialData(modelMatrix,new Vector3d(actorPosition));
actor.draw(renderPipelineState,openGLState); actor.draw(renderPipelineState,openGLState);
RenderingEngine.setFOV(Globals.userSettings.getGraphicsFOV()); RenderingEngine.setFOV(Globals.gameConfigCurrent.getSettings().getGraphicsFOV());
RenderingEngine.setAspectRatio(2.0f); RenderingEngine.setAspectRatio(2.0f);
openGLState.glDepthTest(false); openGLState.glDepthTest(false);

View File

@ -76,9 +76,9 @@ public class DataCellPhysicsManager {
program = Globals.terrainShaderProgram; program = Globals.terrainShaderProgram;
drawRadius = Globals.userSettings.getGraphicsPerformanceLODChunkRadius(); drawRadius = Globals.gameConfigCurrent.getSettings().getGraphicsPerformanceLODChunkRadius();
drawStepdownInterval = Globals.userSettings.getGameplayPhysicsCellRadius(); drawStepdownInterval = Globals.gameConfigCurrent.getSettings().getGameplayPhysicsCellRadius();
physicsRadius = Globals.userSettings.getGameplayPhysicsCellRadius(); physicsRadius = Globals.gameConfigCurrent.getSettings().getGameplayPhysicsCellRadius();
update = true; update = true;
} }

View File

@ -17,7 +17,6 @@ public class StateCleanupCheckerExtension implements AfterEachCallback {
Object[] objectsToCheck = new Object[]{ Object[] objectsToCheck = new Object[]{
Globals.renderingEngine, Globals.renderingEngine,
Globals.audioEngine, Globals.audioEngine,
Globals.javaPID,
LoggerInterface.loggerEngine, LoggerInterface.loggerEngine,
RenderingEngine.screenFramebuffer, RenderingEngine.screenFramebuffer,
Globals.engineState, Globals.engineState,