Esempio n. 1
0
File: ovr.go Progetto: postfix/ovr
func (hmd *Hmd) GetRenderScaleAndOffset(fov FovPort, textureSize Sizei, renderViewport Recti) [2]Vector2f {
	uvScaleOffsetOut := [2]C.ovrVector2f{}
	C.ovrHmd_GetRenderScaleAndOffset(fov.toC(), textureSize.toC(), renderViewport.toC(), &uvScaleOffsetOut[0])

	return [2]Vector2f{newVector2f(uvScaleOffsetOut[0]), newVector2f(uvScaleOffsetOut[1])}
}
Esempio n. 2
0
File: ovr.go Progetto: krux02/libovr
// Computes updated 'uvScaleOffsetOut' to be used with a distortion if render target size or
// viewport changes after the fact. This can be used to adjust render size every frame, if desired.
func (hmd *Hmd) GetRenderScaleAndOffset(fov FovPort, textureSize Sizei, renderViewport Recti) (uvScaleOffsetOut [2]Vector2f) {
	C.ovrHmd_GetRenderScaleAndOffset(c_fovPort(fov), c_sizei(textureSize), c_recti(renderViewport), uvScaleOffsetOut[0].cptr())
	return
}