示例#1
0
文件: ovr.go 项目: krux02/libovr
// Calculates texture size recommended for rendering one eye within HMD, given FOV cone.
// Higher FOV will generally require larger textures to maintain quality.
//  - pixelsPerDisplayPixel specifies that number of render target pixels per display
//    pixel at center of distortion; 1.0 is the default value. Lower values
//    can improve performance.
func (hmd *Hmd) GetFovTextureSize(eye EyeType, fov FovPort, pixelsPerDisplayPixel float32) Sizei {
	var cFov C.ovrFovPort
	cFov.DownTan = C.float(fov.DownTan)
	cFov.LeftTan = C.float(fov.LeftTan)
	cFov.RightTan = C.float(fov.RightTan)
	cFov.UpTan = C.float(fov.UpTan)
	return sizei(C.ovrHmd_GetFovTextureSize(hmd.cptr(), C.ovrEyeType(eye), cFov, C.float(pixelsPerDisplayPixel)))
}
示例#2
0
文件: ovr.go 项目: postfix/ovr
func (hmd *Hmd) GetFovTextureSize(eye EyeType, fov FovPort, pixelsPerDisplayPixel float32) Sizei {
	return newSizei(C.ovrHmd_GetFovTextureSize(hmd.hmdRef, C.ovrEyeType(eye), fov.toC(), C.float(pixelsPerDisplayPixel)))
}