mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
opengl: use nearest mipmaps by default
This commit is contained in:
parent
16e465a122
commit
bd0c54f105
@ -27,7 +27,7 @@ object OpenGLTextureUtil {
|
||||
glBindTexture(GL_TEXTURE_2D_ARRAY, textureId)
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT)
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT)
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, if (mipmaps == 0) GL_NEAREST else GL_NEAREST_MIPMAP_LINEAR)
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, if (mipmaps == 0) GL_NEAREST else GL_NEAREST_MIPMAP_NEAREST)
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, mipmaps)
|
||||
|
||||
|
34
src/test/java/example/jonathan2520/SRGBAveragerTest.kt
Normal file
34
src/test/java/example/jonathan2520/SRGBAveragerTest.kt
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
package example.jonathan2520
|
||||
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
internal class SRGBAveragerTest {
|
||||
|
||||
@Test
|
||||
fun `mix transparent 1`() {
|
||||
assertEquals(0xFFFFFFFF.toInt(), SRGBAverager.average(0xFFFFFF00.toInt(), 0xFFFFFFFF.toInt(), 0xFFFFFFFF.toInt(), 0xFFFFFFFF.toInt()))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `mix transparent 2`() {
|
||||
assertEquals(0x00, SRGBAverager.average(0xFFFFFF00.toInt(), 0xFFFFFF00.toInt(), 0xFFFFFFFF.toInt(), 0xFFFFFFFF.toInt()))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `mix transparent 3`() {
|
||||
assertEquals(0x00, SRGBAverager.average(0xFFFFFF00.toInt(), 0xFFFFFF00.toInt(), 0xFFFFFF00.toInt(), 0xFFFFFFFF.toInt()))
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user