func UpdateDirectionalLight(f func(dL DirectionalLight) DirectionalLight) {
	directionalLight = f(directionalLight)

	// Bind light buffer
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, directionalLightBuffer)
	gl.BufferData(gl.SHADER_STORAGE_BUFFER, int(unsafe.Sizeof(directionalLight)), unsafe.Pointer(&directionalLight), gl.DYNAMIC_DRAW)

	// Unbind for safety.
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, 0)
}
// UpdateDirectionalLight updates the global directional light by calling the provided function and applying the result of the function.
UpdateDirectionalLight updates the global directional light by calling the provided function and applying the result of the function.
// UpdateDirectionalLight updates the global directional light by calling the provided function and applying the result of the function .
func UpdateDirectionalLight(f func(dL DirectionalLight) DirectionalLight) {
	directionalLight = f(directionalLight)
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, directionalLightBuffer)
	gl.BufferData(gl.SHADER_STORAGE_BUFFER, int(unsafe.Sizeof(directionalLight)), unsafe.Pointer(&directionalLight), gl.DYNAMIC_DRAW)
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, 0)
}
func UpdateDirectionalLight ( f func ( dL DirectionalLight ) DirectionalLight ) { directionalLight = f ( directionalLight ) gl . BindBuffer ( gl . SHADER_STORAGE_BUFFER , directionalLightBuffer ) gl . BufferData ( gl . SHADER_STORAGE_BUFFER , int ( unsafe . Sizeof ( directionalLight ) ) , unsafe . Pointer ( & directionalLight ) , gl . DYNAMIC_DRAW ) gl . BindBuffer ( gl . SHADER_STORAGE_BUFFER , 0 ) }
UpdateDirectionalLight updates the global directional light by calling the provided function and applying the result of the function.
UpdateDirectionalLight updates the global directional light by calling the provided function and applying the result of the function .
// Bind light buffer // Unbind for safety.