glm alternatives and similar libraries
Based on the "Graphics" category.
Alternatively, view glm alternatives based on common mentions on social networks and blogs.
-
imgui
Bloat-free Immediate Mode Graphical User interface for JVM with minimal dependencies (rewrite of dear imgui) -
modern-jogl-examples
Examples ported in JOGL from "Learning Modern 3D Graphic Programming" by J.L.McKesson -
bullet
JVM Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc. -
kaifu2x
Port of waifu2x to pure kotlin + opencl. Anime-style upscaler and noise reductor based on convolutional neural networks using coffee trained models -
glimpse-framework
DISCONTINUED. Glimpse is now further developed as a Kotlin Multiplatform project under glimpse-graphics/glimpse
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of glm or a related project?
Popular Comparisons
README
[glm](src/main/resources/logo-mini.png)
This is the Kotlin port of OpenGL Mathematics (GLM), written by g-truc (repository), a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.
GLM provides classes and functions designed and implemented with the same naming conventions and functionality than GLSL so that anyone who knows GLSL, can use GLM as well in Kotlin and Java.
This project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...
This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physic simulations and any development context that requires a simple and convenient mathematics library.
GLM is written entirely in Kotlin, but can be also used from Java. It is a platform independent library with no dependences other than kotlin-unsigned for unsigned support and kotlin-test for testing.
For more information about GLM, please have a look at the manual and the original API reference documentation. The source code and the documentation are licensed under both the Happy Bunny License (Modified MIT) or the MIT License.
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]).
import glm_.vec2.Vec2
import glm_.vec3.Vec3
import glm_.mat4x4.Mat4
import glm_.glm
fun camera(translate: Float, rotate: Vec2): Mat4 {
val projection = glm.perspective(glm.PIf * 0.25f, 4.0f / 3.0f, 0.1f, 100.0f)
var view = glm.translate(Mat4(1.0f), Vec3(0.0f, 0.0f, -translate))
view = glm.rotate(view, rotate.y, Vec3(-1.0f, 0.0f, 0.0f))
view = glm.rotate(view, rotate.x, Vec3(0.0f, 1.0f, 0.0f))
val model = glm.scale(Mat4(1.0f), Vec3(0.5f))
return projection * view * model
}
How to retrieve it:
You can find all the instructions by mary
*Note that all licence references and agreements mentioned in the glm README section above
are relevant to that project's source code only.