diff --git a/src/itdelatrisu/opsu/render/CurveRenderState.java b/src/itdelatrisu/opsu/render/CurveRenderState.java index b7c80a68..b37cf041 100644 --- a/src/itdelatrisu/opsu/render/CurveRenderState.java +++ b/src/itdelatrisu/opsu/render/CurveRenderState.java @@ -81,8 +81,7 @@ public class CurveRenderState { * {@link #draw(org.newdawn.slick.Color, org.newdawn.slick.Color, itdelatrisu.opsu.objects.curves.Vec2f[])} * are undone. */ - public static void shutdown() - { + public static void shutdown() { staticState.shutdown(); FrameBufferCache.shutdown(); } @@ -149,7 +148,7 @@ public class CurveRenderState { } /** - * Discard the cache mapping for this curve object + * Discard the cache mapping for this curve object. */ public void discardCache() { fbo = null; @@ -464,16 +463,13 @@ public class CurveRenderState { /** * Cleanup any OpenGL objects that may have been initialized. */ - private void shutdown() - { - if(gradientTexture != 0) - { + private void shutdown() { + if (gradientTexture != 0) { GL11.glDeleteTextures(gradientTexture); gradientTexture = 0; } - if(program != 0) - { + if (program != 0) { GL20.glDeleteProgram(program); program = 0; attribLoc = 0; diff --git a/src/itdelatrisu/opsu/render/FrameBufferCache.java b/src/itdelatrisu/opsu/render/FrameBufferCache.java index ab4bea7b..c4d94a5b 100644 --- a/src/itdelatrisu/opsu/render/FrameBufferCache.java +++ b/src/itdelatrisu/opsu/render/FrameBufferCache.java @@ -124,15 +124,14 @@ public class FrameBufferCache { /** * Clear the cache pool of Framebuffers. - * If there were any previous Framebuffers in the cache delete them - * this is necessary for cases when the game gets re-started with a - * different resolution without closing the process + * If there were any previous Framebuffers in the cache, delete them. + *

+ * This is necessary for cases when the game gets restarted with a + * different resolution without closing the process. */ - public static void shutdown() - { + public static void shutdown() { FrameBufferCache fbcInstance = FrameBufferCache.getInstance(); - for(Rendertarget target: fbcInstance.cache) - { + for (Rendertarget target : fbcInstance.cache) { target.destroyRTT(); } fbcInstance.cache.clear(); diff --git a/src/itdelatrisu/opsu/render/Rendertarget.java b/src/itdelatrisu/opsu/render/Rendertarget.java index 2166d52a..df50c73f 100644 --- a/src/itdelatrisu/opsu/render/Rendertarget.java +++ b/src/itdelatrisu/opsu/render/Rendertarget.java @@ -35,7 +35,7 @@ public class Rendertarget { /** The FBO ID. */ private final int fboID; - /** The texture ID. for the color buffer this rendertarget renders into. */ + /** The texture ID for the color buffer this rendertarget renders into. */ private final int textureID; /** The renderbuffer ID for the depth buffer that this rendertarget renders into. */ @@ -120,8 +120,7 @@ public class Rendertarget { * Destroy the OpenGL objects associated with this Rendertarget. Do not try * to use this rendertarget with OpenGL after calling this method. */ - public void destroyRTT() - { + public void destroyRTT() { GL30.glDeleteFramebuffers(fboID); GL30.glDeleteRenderbuffers(depthBufferID); GL11.glDeleteTextures(textureID);