func InitPointLights() {
	AddPointLight(mgl32.Vec3{0, 12, 0}, mgl32.Vec3{1, 0, 0}, 1.0, 10.0)
	AddPointLight(mgl32.Vec3{36, 12, 0}, mgl32.Vec3{0, 1, 0}, 1.0, 10.0)
	AddPointLight(mgl32.Vec3{0, 12, 36}, mgl32.Vec3{0, 0, 1}, 1.0, 10.0)
	AddPointLight(mgl32.Vec3{36, 12, 36}, mgl32.Vec3{1, 1, 0}, 1.0, 10.0)

	// Prepare light buffers
	gl.GenBuffers(1, &lightBuffer)
	gl.GenBuffers(1, &visibleLightIndicesBuffer)

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

	// Bind visible light indices buffer
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, visibleLightIndicesBuffer)
	gl.BufferData(gl.SHADER_STORAGE_BUFFER, int(getTotalNumTiles())*int(unsafe.Sizeof(&VisibleIndex{}))*MaximumPointLights, nil, gl.STATIC_DRAW)

	// Unbind for safety.
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, 0)
}
// InitPointLights sets up buffer space for light culling calculations and storage.
InitPointLights sets up buffer space for light culling calculations and storage.
// InitPointLights sets up buffer space for light culling calculations and storage .
func InitPointLights() {
	AddPointLight(mgl32.Vec3{0, 12, 0}, mgl32.Vec3{1, 0, 0}, 1.0, 10.0)
	AddPointLight(mgl32.Vec3{36, 12, 0}, mgl32.Vec3{0, 1, 0}, 1.0, 10.0)
	AddPointLight(mgl32.Vec3{0, 12, 36}, mgl32.Vec3{0, 0, 1}, 1.0, 10.0)
	AddPointLight(mgl32.Vec3{36, 12, 36}, mgl32.Vec3{1, 1, 0}, 1.0, 10.0)
	gl.GenBuffers(1, &lightBuffer)
	gl.GenBuffers(1, &visibleLightIndicesBuffer)
	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, visibleLightIndicesBuffer)
	gl.BufferData(gl.SHADER_STORAGE_BUFFER, int(getTotalNumTiles())*int(unsafe.Sizeof(&VisibleIndex{}))*MaximumPointLights, nil, gl.STATIC_DRAW)
	gl.BindBuffer(gl.SHADER_STORAGE_BUFFER, 0)
}
func InitPointLights ( ) { AddPointLight ( mgl32 . Vec3 { 0 , 12 , 0 } , mgl32 . Vec3 { 1 , 0 , 0 } , 1.0 , 10.0 ) AddPointLight ( mgl32 . Vec3 { 36 , 12 , 0 } , mgl32 . Vec3 { 0 , 1 , 0 } , 1.0 , 10.0 ) AddPointLight ( mgl32 . Vec3 { 0 , 12 , 36 } , mgl32 . Vec3 { 0 , 0 , 1 } , 1.0 , 10.0 ) AddPointLight ( mgl32 . Vec3 { 36 , 12 , 36 } , mgl32 . Vec3 { 1 , 1 , 0 } , 1.0 , 10.0 ) gl . GenBuffers ( 1 , & lightBuffer ) gl . GenBuffers ( 1 , & visibleLightIndicesBuffer ) 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 , visibleLightIndicesBuffer ) gl . BufferData ( gl . SHADER_STORAGE_BUFFER , int ( getTotalNumTiles ( ) ) * int ( unsafe . Sizeof ( & VisibleIndex { } ) ) * MaximumPointLights , nil , gl . STATIC_DRAW ) gl . BindBuffer ( gl . SHADER_STORAGE_BUFFER , 0 ) }
InitPointLights sets up buffer space for light culling calculations and storage.
InitPointLights sets up buffer space for light culling calculations and storage .
// Prepare light buffers // Bind light buffer // Bind visible light indices buffer // Unbind for safety.