Hi! So I want to create a thin OpenGL wrapper that...
# gamedev
d
Hi! So I want to create a thin OpenGL wrapper that targets every platform that Kotlin supports (including wasm). So it'll call to either OpenGL, OpenGL ES or WebGL where appropriate. I have started basic code generation from the official registry but I'm stuck on design and would like some input/tips/advice. 1) `expect`/`actual` or common interface for the commands. I haven't really used ES or WebGL so I'm not sure which will work better for versioning. 2) Top level functions or an object pass around to call gl commands on. 3) Strongly typed enums or plain old `Int`s. 4) Should this be shipped as a gradle plugin that generates the bindings in your project or just ship the generated library. 5) Any idiomatic Kotlin ideas? 6) Should this be in a channel of its own?
a
Have you tried libktx?
d
Isn't it jvm only and only extensions?
d
LibGDX + Kotlin can only works on the JVM/Android/iOS (for iOS it’s not out of the box, and I never tested it)
a
In theory LibGDX works even in the browser
through GWT
although I've never tried it
d
Not with Kotlin as GWT use Java Source code as input. (And not Kotlin source file nor java byte code)
d
Is it interoperable with javascript, swift, obj-C and C?