Skip to content
/ glx Public

glx is core immutable utility vector/math/angles/colors library with float32 precesion

Notifications You must be signed in to change notification settings

go-glx/glx

Repository files navigation

Glx

glx is core utility library for go-glx engine

NOT READY FOR REAL USE

core concept is "safety first", so library immutable and will copy vec/mat data for every call.

precision is float32 - low memory usage and its native for hardware (GPU's shaders, buffers, etc..) anyway use f32, so not need to convert data every syscall

Its contain:

  • f32 math
  • vectors/matrix
  • angles
  • colors

details

unsafe

lib use unsafe package, but only in cast place from float32 to []byte

func (v *Vec2) Data() []byte {
  return (*(*[SizeOfVec2]byte)(unsafe.Pointer(v)))[:]
}

This is very useful for fast cast vectors to GPU vertex data

About

glx is core immutable utility vector/math/angles/colors library with float32 precesion

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages