Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 668 Bytes

readme.md

File metadata and controls

32 lines (22 loc) · 668 Bytes

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