Add pre-render method to VRViewManager in preparation for adding Oculus

Rift support. See
https://hub.jmonkeyengine.org/t/libovr-oculus-rift-support/39427
empirephoenix-patch-1
Campbell Suter 7 years ago
parent 132b0abc50
commit 4ce05dd0ca
No known key found for this signature in database
GPG Key ID: 754A66CCF3F73C0F
  1. 10
      jme3-vr/src/main/java/com/jme3/app/VRAppState.java
  2. 4
      jme3-vr/src/main/java/com/jme3/util/AbstractVRViewManager.java
  3. 6
      jme3-vr/src/main/java/com/jme3/util/VRViewManager.java

@ -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…
Cancel
Save