Skip to content

Commit b52727d

Browse files
committed
moved the texture options before the tex call
1 parent 26f72e9 commit b52727d

File tree

1 file changed

+1
-1
lines changed
  • common/src/main/kotlin/com/lambda/graphics/texture

1 file changed

+1
-1
lines changed

common/src/main/kotlin/com/lambda/graphics/texture/Texture.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ open class Texture(
7474
initialized = true
7575

7676
// Set this mipmap to `offset` to define the original texture
77-
glTexImage2D(GL_TEXTURE_2D, offset, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, readImage(image))
7877
setupTexture(GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR)
78+
glTexImage2D(GL_TEXTURE_2D, offset, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, readImage(image))
7979
if (levels > 1) glGenerateMipmap(GL_TEXTURE_2D) // This take the derived values GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL to generate the stack
8080
}
8181

0 commit comments

Comments
 (0)