Popularity
2.6
Stable
Activity
6.0
Stable
24
4
9

Programming language: Kotlin
License: MIT License
Tags: Graphics    
Latest version: v0.7.9

uno-sdk alternatives and similar libraries

Based on the "Graphics" category.
Alternatively, view uno-sdk alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of uno-sdk or a related project?

Add another 'Graphics' Library

README

unofficial-opengl-SDK

Build Status license Release Size Github All Releases Awesome Kotlin Badge

Gradle:

implementation "com.github.kotlin-graphics.uno-sdk:uno-core:$unoVersion" // uno_version can be a release tag or a commit id
implementation "com.github.kotlin-graphics.uno-sdk:uno-awt:$unoVersion" // uno_version can be a release tag or a commit id

This is kind of a small suite, born and shaped around GL, it includes the gln dependencies, such as unsigned support, glm and gli. Its main usage is basically as wrapper for the lwjgl glfw binding.

A kind of a gln for glfw. So, code more compact, type-safe, clear and intuitive. You can have up and running a whole gl clear example in just a couple of lines:

glfw.init("3.3")

val window = GlfwWindow(1280, 720, "OpenGL example").apply {
    init()
}

glClearColor(1f, 0f, 0f, 0f)

window.loop {
    glClear(GL_COLOR_BUFFER_BIT)
}

One cool feature is that it supports multiple listeners of the same type, like CharCallback:

var charCallback: CharCallbackT? = null
   get() = charCallbacks.getOrfirst(defaultKey)
   set(value) {
       charCallbacks[defaultKey] = value
       field = value
   }
val charCallbacks = sortedMapOf<String, CharCallbackT>()
val nCharCallback = GLFWCharCallbackI { _, codePoint -> charCallbacks.values.forEach { it(codePoint) } }

nCharCallback where n stays for native is the only and real callback

charCallback is just a comfortable interface to automatically set/get a single callback

charCallbacks is the SortedMap containing all the current callbacks

I've been chosen that so they can be easier ordered, the default callback has always this key:

val defaultKey = "0 - default"

I actually asked for this multi-callback in the native glfw, but in the meanwhile we can already use it. And this is also faster because it's all on the jvm!

Plus some other small utils like:

  • methods for allocating very easily many different type of buffers from a lot of different data type, such as different arrays and so on
  • an cap class for a deep and complete resume about a machine opengl capabilities
  • matrixStack for glm
  • glsl utils (to refresh)
  • an experimental kotlin stlib on intBuffers. So that you can for example textureName.forEach(::glDestroyTexture)
  • mousePole, an util for camera management
  • and attempt to port stb completely on jvm (unfinished)
  • timer util

And lately it also includes a counterpart of gln for vulkan, vkk, plus an util for making short-live allocations easy and free, kool.

Don't hesitate to contribute to the project by submitting issues or pull requests for bugs and features. Any feedback is welcome at [[email protected]](mailto://[email protected]).

Credits:


*Note that all licence references and agreements mentioned in the uno-sdk README section above are relevant to that project's source code only.