Skip to content

Ferguzz/glam

 
 

Repository files navigation

GLaM: OpenGL Mathematics for Go

Features

GLaM is a Go package providing mathematical types and operations for use with OpenGL. It is written with game development in mind, so the focus is on speed over portability or accuracy.

NOTE: this is a work in progress.

  • Vectors and matrices.
  • Efficient single-precision math.
  • Some noise functions (Perlin, Simplex...).

Package GLaM

import "github.com/Ferguzz/glam"

This package provides vectors and matrices, and their associated operations.

  • The names mirrors the GLSL types: Vec2, Vec3, Vec4, Mat3, Mat4, IVec3...
  • All types are pure values: there's no heap allocation, and no hidden data.
  • All types have the same memory layout than their corresponding GLSL types.
  • Most methods are inlined by the compiler.

Package GLaM Math

import "github.com/Ferguzz/glam/math"

This package aims to provide fast float32 math functions, using assembly when appropriate.

Package GLaM Noise

import "github.com/Ferguzz/glam/noise"

The Perlin and Simplex noise functions are adapted from "Simplex Noise Demystified" by Stefan Gustavson (code in the public domain).

Author

Laurent Moussault moussault.laurent@gmail.com

About

GLaM: OpenGL Mathematics for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.2%
  • Assembly 4.8%