diff options
author | makamys <makamys@outlook.com> | 2022-06-25 18:00:14 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-25 18:06:47 +0200 |
commit | faa2dd168f2f46a869be8497a63ca4f4f24d0c5c (patch) | |
tree | 3697abada8e5637f78cee12f7942250b027fcb59 /src/main/java | |
parent | 597c07013649361719de257b221b33cfdf35b923 (diff) | |
download | Neodymium-faa2dd168f2f46a869be8497a63ca4f4f24d0c5c.tar.gz Neodymium-faa2dd168f2f46a869be8497a63ca4f4f24d0c5c.tar.bz2 Neodymium-faa2dd168f2f46a869be8497a63ca4f4f24d0c5c.zip |
Fix indentation
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/NeoRenderer.java | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java index 78a4b21..aae651a 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java +++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java @@ -375,62 +375,62 @@ public class NeoRenderer { return true; } - public void reloadShader(int pass) { - Set<String> defines = new HashSet<>(); - if(Config.renderFog) { - defines.add("RENDER_FOG"); - } - if(Config.simplifyChunkMeshes) { - defines.add("SIMPLIFY_MESHES"); - } - if(Config.shortUV) { - defines.add("SHORT_UV"); - } - if(pass == 0) { - defines.add("PASS_0"); - } - - boolean errors = false; - - int vertexShader; - vertexShader = glCreateShader(GL_VERTEX_SHADER); - - glShaderSource(vertexShader, Preprocessor.preprocess(Util.readFile("shaders/chunk.vert"), defines)); - glCompileShader(vertexShader); - - if(glGetShaderi(vertexShader, GL_COMPILE_STATUS) == 0) { - System.out.println("Error compiling vertex shader: " + glGetShaderInfoLog(vertexShader, 256)); - errors = true; - } - - int fragmentShader; - fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); - - glShaderSource(fragmentShader, Preprocessor.preprocess(Util.readFile("shaders/chunk.frag"), defines)); - glCompileShader(fragmentShader); - - if(glGetShaderi(fragmentShader, GL_COMPILE_STATUS) == 0) { - System.out.println("Error compiling fragment shader: " + glGetShaderInfoLog(fragmentShader, 256)); - errors = true; - } - - int newShaderProgram = glCreateProgram(); - glAttachShader(newShaderProgram, vertexShader); - glAttachShader(newShaderProgram, fragmentShader); - glLinkProgram(newShaderProgram); - - if(glGetProgrami(newShaderProgram, GL_LINK_STATUS) == 0) { - System.out.println("Error linking shader: " + glGetShaderInfoLog(newShaderProgram, 256)); - errors = true; - } - - if(!errors) { - shaderPrograms[pass] = newShaderProgram; - } - - glDeleteShader(vertexShader); - glDeleteShader(fragmentShader); + public void reloadShader(int pass) { + Set<String> defines = new HashSet<>(); + if(Config.renderFog) { + defines.add("RENDER_FOG"); + } + if(Config.simplifyChunkMeshes) { + defines.add("SIMPLIFY_MESHES"); + } + if(Config.shortUV) { + defines.add("SHORT_UV"); } + if(pass == 0) { + defines.add("PASS_0"); + } + + boolean errors = false; + + int vertexShader; + vertexShader = glCreateShader(GL_VERTEX_SHADER); + + glShaderSource(vertexShader, Preprocessor.preprocess(Util.readFile("shaders/chunk.vert"), defines)); + glCompileShader(vertexShader); + + if(glGetShaderi(vertexShader, GL_COMPILE_STATUS) == 0) { + System.out.println("Error compiling vertex shader: " + glGetShaderInfoLog(vertexShader, 256)); + errors = true; + } + + int fragmentShader; + fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); + + glShaderSource(fragmentShader, Preprocessor.preprocess(Util.readFile("shaders/chunk.frag"), defines)); + glCompileShader(fragmentShader); + + if(glGetShaderi(fragmentShader, GL_COMPILE_STATUS) == 0) { + System.out.println("Error compiling fragment shader: " + glGetShaderInfoLog(fragmentShader, 256)); + errors = true; + } + + int newShaderProgram = glCreateProgram(); + glAttachShader(newShaderProgram, vertexShader); + glAttachShader(newShaderProgram, fragmentShader); + glLinkProgram(newShaderProgram); + + if(glGetProgrami(newShaderProgram, GL_LINK_STATUS) == 0) { + System.out.println("Error linking shader: " + glGetShaderInfoLog(newShaderProgram, 256)); + errors = true; + } + + if(!errors) { + shaderPrograms[pass] = newShaderProgram; + } + + glDeleteShader(vertexShader); + glDeleteShader(fragmentShader); + } public void reloadShader() { reloadShader(0); |