mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 02:59:19 +01:00
Replace GL11.GL_CLAMP with GL12.GL_CLAMP_TO_EDGE to fix GL_INVALID_ENUM
This commit is contained in:
parent
22ee84d74c
commit
876043bf2f
@ -8,14 +8,14 @@ import org.lwjgl.opengl._
|
||||
import java.awt.image.BufferedImage
|
||||
import java.nio.ByteBuffer
|
||||
|
||||
class Texture() extends Logging with Resource {
|
||||
class Texture extends Logging with Resource {
|
||||
val texture: Int = GL11.glGenTextures()
|
||||
|
||||
bind()
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST)
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST)
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP)
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP)
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE)
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE)
|
||||
|
||||
def this(image: BufferedImage) {
|
||||
this()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user