diff options
| author | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-10-25 09:39:40 +1100 |
|---|---|---|
| committer | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-10-25 09:39:40 +1100 |
| commit | 3f86e881074dc4220aab23cae69f002c62f0b25a (patch) | |
| tree | 47bab2c49730b0fadebde420209472d5d63757ad /src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java | |
| parent | 7ebee833e54e95ffcd9dcfbad5744e299102acd9 (diff) | |
| download | notenoughupdates-3f86e881074dc4220aab23cae69f002c62f0b25a.tar.gz notenoughupdates-3f86e881074dc4220aab23cae69f002c62f0b25a.tar.bz2 notenoughupdates-3f86e881074dc4220aab23cae69f002c62f0b25a.zip | |
1.4.5
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java b/src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java index a97032c4..f0b92c6a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/DungeonBlocks.java @@ -84,7 +84,7 @@ public class DungeonBlocks implements IResourceManagerReloadListener { } for (int i = 0; i <= mipmapLevels; ++i) { - GL11.glTexImage2D(GL11.GL_TEXTURE_2D, i, GL11.GL_RGBA, w >> i, h >> i, 0, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer)((IntBuffer)null)); + GL11.glTexImage2D(GL11.GL_TEXTURE_2D, i, GL11.GL_RGBA, w >> i, h >> i, 0, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, ((IntBuffer)null)); } GlStateManager.bindTexture(textureId); @@ -159,7 +159,7 @@ public class DungeonBlocks implements IResourceManagerReloadListener { } for (int i = 0; i <= mipmapLevels; ++i) { - GL11.glTexImage2D(GL11.GL_TEXTURE_2D, i, GL11.GL_RGBA, w >> i, h >> i, 0, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer)((IntBuffer)null)); + GL11.glTexImage2D(GL11.GL_TEXTURE_2D, i, GL11.GL_RGBA, w >> i, h >> i, 0, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, ((IntBuffer)null)); } } GlStateManager.bindTexture(textureId); @@ -193,20 +193,6 @@ public class DungeonBlocks implements IResourceManagerReloadListener { int index = x+y*w2; int newCol = entry.getValue(); - /*float newAlpha = ((newCol >> 24) & 0xFF)/255f; - float newRed = ((newCol >> 16) & 0xFF)/255f; - float newGreen = ((newCol >> 8) & 0xFF)/255f; - float newBlue = (newCol & 0xFF)/255f;*/ - - /*int oldCol = intbuffer.get(index); - int oldAlpha = (oldCol >> 24) & 0xFF; - float oldRed = ((oldCol >> 16) & 0xFF)/255f; - float oldGreen = ((oldCol >> 8) & 0xFF)/255f; - float oldBlue = (oldCol & 0xFF)/255f; - - int r = (int)((newRed*newAlpha + oldRed*(1-newAlpha))*255); - int g = (int)((newGreen*newAlpha + oldGreen*(1-newAlpha))*255); - int b = (int)((newBlue*newAlpha + oldBlue*(1-newAlpha))*255);*/ intbuffer.put(index, newCol); } |
