@@ -5,7 +5,6 @@ package uno.glfw
55import glm_.vec2.Vec2
66import glm_.vec2.Vec2d
77import glm_.vec2.Vec2i
8- import gln.L
98import kool.*
109import org.lwjgl.glfw.GLFW
1110import org.lwjgl.glfw.GLFW.glfwDestroyCursor
@@ -28,7 +27,7 @@ class GlfwVidMode(val size: Vec2i, val redBits: Int, val greenBits: Int, val blu
2827 }
2928}
3029
31- operator fun Ptr<GlfwVidMode>.get (index : Int ) = GlfwVidMode ((adr.L + index * GlfwVidMode .Size ).toPtr())
30+ operator fun Ptr<GlfwVidMode>.get (index : Int ) = GlfwVidMode ((adr.toLong() + index * GlfwVidMode .Size ).toPtr())
3231
3332class GlfwGammaRamp (val red : IntArray , val green : IntArray , val blue : IntArray ) {
3433
@@ -42,9 +41,9 @@ class GlfwGammaRamp(val red: IntArray, val green: IntArray, val blue: IntArray)
4241 b[i] = blue[i].toUShort()
4342 }
4443 val ptr = stack.nmalloc(GLFWGammaRamp .ALIGNOF , GLFWGammaRamp .SIZEOF )
45- memPutAddress(ptr + GLFWGammaRamp .RED , r.adr.L )
46- memPutAddress(ptr + GLFWGammaRamp .GREEN , g.adr.L )
47- memPutAddress(ptr + GLFWGammaRamp .BLUE , b.adr.L )
44+ memPutAddress(ptr + GLFWGammaRamp .RED , r.adr.toLong() )
45+ memPutAddress(ptr + GLFWGammaRamp .GREEN , g.adr.toLong() )
46+ memPutAddress(ptr + GLFWGammaRamp .BLUE , b.adr.toLong() )
4847 memPutInt(ptr + GLFWGammaRamp .SIZE , red.size)
4948 return ptr.toPtr()
5049 }
@@ -62,7 +61,7 @@ fun GlfwGammaRamp(ptr: Ptr<GlfwGammaRamp>): GlfwGammaRamp {
6261value class GlfwCursor (val handle : Long ) {
6362 // --- [ glfwCreateCursor ] ---
6463 constructor (image: GlfwImage , hot: Int ) : this (image, hot, hot)
65- constructor (image: GlfwImage , xHot: Int , yHot: Int ) : this (stack { GLFW .nglfwCreateCursor(image.toStack(it).adr.L , xHot, yHot) })
64+ constructor (image: GlfwImage , xHot: Int , yHot: Int ) : this (stack { GLFW .nglfwCreateCursor(image.toStack(it).adr.toLong() , xHot, yHot) })
6665
6766 // --- [ glfwDestroyCursor ] ---
6867 fun destroy () = glfwDestroyCursor(handle)
@@ -115,7 +114,7 @@ class GlfwImage(val width: Int, val height: Int, val pixels: UByteArray) {
115114 val pPixels = stack.ptrUByte(pixels.size)
116115 for (i in pixels.indices)
117116 pPixels[i] = pixels[i]
118- memPutAddress(ptr + GLFWImage .PIXELS , pPixels.adr.L )
117+ memPutAddress(ptr + GLFWImage .PIXELS , pPixels.adr.toLong() )
119118 return ptr.toPtr()
120119 }
121120}
0 commit comments