Skip to content
GLaM: OpenGL Mathematics for Go
Go Assembly
Branch: master
Clone or download
Pull request Compare This branch is 733 commits behind cozely:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
math
noise
LICENSE
README.md
doc.go
ivec2.go
ivec3.go
ivec4.go
mat4.go
mat4_test.go
vec2.go
vec3.go
vec3_test.go
vec4.go
vec4_test.go

README.md

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/drakmaniso/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/drakmaniso/glam/math"

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

Package GLaM Noise

import "github.com/drakmaniso/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

You can’t perform that action at this time.