https://kotlinlang.org logo
#announcements
Title
# announcements
j

joelpedraza

09/27/2017, 2:24 PM
Copy code
inline fun <reified T> store(texelCoord: Vec3i, layer: Int, face: Int, level: Int, texel: T) {
       val blockSize = getSize(T::class)
}
Thanks @marstran
e

elect

09/27/2017, 2:25 PM
tried all the tricks to get smart compiling in the way, it didn't work
store
will store the texel in the given texture at the given coordinates
m

marstran

09/27/2017, 2:27 PM
Could you do
T::class
instead of
texel::class
?
e

elect

09/27/2017, 2:27 PM
wow, that made it, thanks Marius!
j

joelpedraza

09/27/2017, 2:27 PM
Ah of course, nice one
e

elect

09/27/2017, 2:27 PM
anyway Joel, that methods is just a common method I'm using to retrieve the size of the given texel
2 Views