public class OSVRViewManager extends AbstractVRViewManager
environment, leftCamera, leftEyeDepth, leftEyeTexture, leftPostProcessor, leftViewPort, mirrorViewPort, rightCamera, rightEyeDepth, rightEyeTexture, rightPostProcessor, rightViewPort
LEFT_VIEW_NAME, RIGHT_VIEW_NAME
Constructor and Description |
---|
OSVRViewManager(VREnvironment environment)
Create a new VR view manager attached to the given
VR environment . |
Modifier and Type | Method and Description |
---|---|
protected int |
getLeftTexId()
Get the identifier of the left eye texture.
|
protected int |
getRightTexId()
Get the identifier of the right eye texture.
|
void |
initialize()
Initialize the VR view manager.
|
void |
moveScreenProcessingToEyes()
Handles moving filters from the main view to each eye
|
void |
postRender()
Send the textures to the two eyes.
|
void |
render()
This method contains action to be done during the rendering phase.
|
static Mesh |
setupDistortionMesh(int eye,
VRAPI api)
Set up a distortion mesh for the stereo view.
|
void |
syncScreenProcessing(ViewPort sourceViewport)
Sets the two views to use the list of
processors . |
void |
update(float tpf)
Update the VR view manager.
|
getHeightAdjustment, getLeftCamera, getLeftDepth, getLeftPostProcessor, getLeftTexture, getLeftViewPort, getMirrorViewPort, getResolutionMuliplier, getRightCamera, getRightDepth, getRightPostProcessor, getRightTexture, getRightViewPort, getVREnvironment, setHeightAdjustment, setResolutionMultiplier
public OSVRViewManager(VREnvironment environment)
VR environment
.environment
- the VR environment
to which this view manager is attached.protected int getLeftTexId()
getRightTexId()
,
getFullTexId()
protected int getRightTexId()
getLeftTexId()
,
getFullTexId()
public void postRender()
VRViewManager.render()
public void initialize()
public void update(float tpf)
tpf
- the time per frame.public void moveScreenProcessingToEyes()
moveScreenProcessingToEyes
in interface VRViewManager
moveScreenProcessingToEyes
in class AbstractVRViewManager
public void syncScreenProcessing(ViewPort sourceViewport)
processors
.syncScreenProcessing
in class AbstractVRViewManager
sourceViewport
- the viewport
that contains the processors to use.public static Mesh setupDistortionMesh(int eye, VRAPI api)
eye
- the eye to apply.api
- the underlying VR apipublic void render()
VRViewManager
render
method of an app state
.VRViewManager.postRender()