Created
August 26, 2019 17:41
-
-
Save elect86/641c6c2f82a9896edef49a270b545ae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface GlBufEco { | |
val buffers: GlBuffers | |
} | |
interface GlBufE | |
fun <E> Enum<E>.bind(target: BufferTarget) where E : Enum<E>, E : GlBufE = (Enum.Companion as GlBufEco).buffers[ordinal].bind(target) | |
enum class Buffer : GlBufE { | |
A; | |
companion object : GlBufEco { | |
override val buffers = GlBuffers<Buffer>() | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment