func AddPointLight(position, color mgl32.Vec3, intensity, radius float32) {
	mu.Lock()

	PointLights[nextPointLightIndex].Color = color
	PointLights[nextPointLightIndex].Intensity = intensity
	PointLights[nextPointLightIndex].Position = position
	PointLights[nextPointLightIndex].Radius = radius

	numPointLights++
	nextPointLightIndex++

	if numPointLights >= MaximumPointLights {
		numPointLights = MaximumPointLights - 1
	}
	if nextPointLightIndex >= MaximumPointLights {
		nextPointLightIndex = 0
	}

	mu.Unlock()

	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, lightBuffer)
	gl.BufferData(gl.SHADER_STORAGE_BUFFER, MaximumPointLights*int(unsafe.Sizeof(&PointLight{})), unsafe.Pointer(&PointLights), gl.DYNAMIC_DRAW)

	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, 0)
}
// AddPointLight adds a PointLight to the scene with the given attributes.
AddPointLight adds a PointLight to the scene with the given attributes.
// AddPointLight adds a PointLight to the scene with the given attributes .
func AddPointLight(position, color mgl32.Vec3, intensity, radius float32) {
	mu.Lock()
	PointLights[nextPointLightIndex].Color = color
	PointLights[nextPointLightIndex].Intensity = intensity
	PointLights[nextPointLightIndex].Position = position
	PointLights[nextPointLightIndex].Radius = radius
	numPointLights++
	nextPointLightIndex++
	if numPointLights >= MaximumPointLights {
		numPointLights = MaximumPointLights - 1
	}
	if nextPointLightIndex >= MaximumPointLights {
		nextPointLightIndex = 0
	}
	mu.Unlock()
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, lightBuffer)
	gl.BufferData(gl.SHADER_STORAGE_BUFFER, MaximumPointLights*int(unsafe.Sizeof(&PointLight{})), unsafe.Pointer(&PointLights), gl.DYNAMIC_DRAW)
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, 0)
}
func AddPointLight ( position , color mgl32 . Vec3 , intensity , radius float32 ) { mu . Lock ( ) PointLights [ nextPointLightIndex ] . Color = color PointLights [ nextPointLightIndex ] . Intensity = intensity PointLights [ nextPointLightIndex ] . Position = position PointLights [ nextPointLightIndex ] . Radius = radius numPointLights ++ nextPointLightIndex ++ if numPointLights >= MaximumPointLights { numPointLights = MaximumPointLights - 1 } if nextPointLightIndex >= MaximumPointLights { nextPointLightIndex = 0 } mu . Unlock ( ) gl . BindBuffer ( gl . SHADER_STORAGE_BUFFER , lightBuffer ) gl . BufferData ( gl . SHADER_STORAGE_BUFFER , MaximumPointLights * int ( unsafe . Sizeof ( & PointLight { } ) ) , unsafe . Pointer ( & PointLights ) , gl . DYNAMIC_DRAW ) gl . BindBuffer ( gl . SHADER_STORAGE_BUFFER , 0 ) }
AddPointLight adds a PointLight to the scene with the given attributes.
AddPointLight adds a PointLight to the scene with the given attributes .