Add pre-render method to VRViewManager in preparation for adding Oculus
Rift support. See https://hub.jmonkeyengine.org/t/libovr-oculus-rift-support/39427
This commit is contained in:
parent
132b0abc50
commit
4ce05dd0ca
@ -432,6 +432,16 @@ public class VRAppState extends AbstractAppState {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(RenderManager rm) {
|
||||
super.render(rm);
|
||||
|
||||
// update compositor
|
||||
if( environment.getVRViewManager() != null ) {
|
||||
environment.getVRViewManager().render();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(AppStateManager stateManager, Application app) {
|
||||
super.initialize(stateManager, app);
|
||||
|
@ -129,6 +129,10 @@ public abstract class AbstractVRViewManager implements VRViewManager {
|
||||
return environment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles moving filters from the main view to each eye
|
||||
*/
|
||||
|
@ -150,6 +150,12 @@ public interface VRViewManager {
|
||||
*/
|
||||
public void update(float tpf);
|
||||
|
||||
/**
|
||||
* Set up the scene for rendering.
|
||||
* This method should be called before any rendering takes place.
|
||||
*/
|
||||
public void render();
|
||||
|
||||
/**
|
||||
* Send the rendering result as textures to the two eyes.
|
||||
* This method should be called after all the rendering operations
|
||||
|
Loading…
x
Reference in New Issue
Block a user