예제 #1
0
파일: ovr.go 프로젝트: postfix/ovr
func (hmd *Hmd) GetEyeTimewarpMatrices(eye EyeType, renderPose Posef) [2]Matrix4f {
	twmOut := [2]C.ovrMatrix4f{}
	C.ovrHmd_GetEyeTimewarpMatrices(hmd.hmdRef, C.ovrEyeType(eye), renderPose.toC(), &twmOut[0])

	return [2]Matrix4f{newMatrix4f(twmOut[0]), newMatrix4f(twmOut[1])}
}
예제 #2
0
파일: ovr.go 프로젝트: krux02/libovr
// Computes timewarp matrices used by distortion mesh shader, these are used to adjust
// for orientation change since the last call to ovrHmd_GetEyePose for this eye.
// The ovrDistortionVertex::TimeWarpFactor is used to blend between the matrices,
// usually representing two different sides of the screen.
// Must be called on the same thread as ovrHmd_BeginFrameTiming.
func (hmd *Hmd) GetEyeTimewarpMatrices(eye EyeType, renderPose Posef) (twmOut [2]Matrix4f) {
	C.ovrHmd_GetEyeTimewarpMatrices(hmd.cptr(), C.ovrEyeType(eye), c_posef(renderPose), twmOut[0].cptr())
	return
}