* RenderManager will reload "shader" boolean on each invocation of render(), since Renderer might not have proper capabilities set before canvas has been attached

jMP
 * Fixed some illegal calls in SceneApplication

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7095 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent 4cc44936c4
commit 9b84a79811
  1. 4
      build.xml
  2. 4
      engine/src/core/com/jme3/renderer/RenderManager.java
  3. 9
      sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java

@ -10,7 +10,7 @@
</condition>
</fail>
<target name="build" description="Builds the complete SDK" depends="-check-platform">
<target name="build" description="Builds the complete SDK" depends="-check-platform, -update-sdk-platform-config">
<ant dir="engine" target="update-sdk"/>
<ant dir="sdk" target="build"/>
</target>
@ -73,5 +73,7 @@
message="nbplatform.default.harness.dir=${nbplatform.dir}${file.separator}harness&#xD;&#xA;" append="true"/>
<replace file="sdk/nbproject/private/platform-private.properties" token="\" value="\\"/>
</target>
<target name="update-sdk-platform-config" depends="-update-sdk-platform-config"/>
</project>

@ -85,7 +85,7 @@ public class RenderManager {
private Material forcedMaterial = null;
private String forcedTechnique = null;
private RenderState forcedRenderState = null;
private final boolean shader;
private boolean shader;
private int viewX, viewY, viewWidth, viewHeight;
private float near, far;
private Matrix4f orthoMatrix = new Matrix4f();
@ -734,6 +734,8 @@ public class RenderManager {
return;
}
this.shader = renderer.getCaps().contains(Caps.GLSL100);
for (int i = 0; i < preViewPorts.size(); i++) {
renderViewPort(preViewPorts.get(i), tpf);
}

@ -127,8 +127,6 @@ public class SceneApplication extends Application implements LookupProvider, Loo
createCanvas();
startCanvas(true);
getContext().setAutoFlushFrames(true);
getContext().setSystemListener(this);
progressHandle.progress("initialize Base Application", 1);
// if (!java.awt.EventQueue.isDispatchThread()) {
// java.awt.EventQueue.invokeAndWait(new Runnable() {
@ -180,9 +178,6 @@ public class SceneApplication extends Application implements LookupProvider, Loo
previewProcessor = new ScenePreviewProcessor();
previewProcessor.setupPreviewView();
// enable depth test and back-face culling for performance
renderer.applyRenderState(RenderState.DEFAULT);
getProgressHandle().progress("Prepare Camera", 4);
camLight = new PointLight();
camLight.setColor(ColorRGBA.White);
@ -244,7 +239,9 @@ public class SceneApplication extends Application implements LookupProvider, Loo
guiNode.updateGeometricState();
toolsNode.updateGeometricState();
getStateManager().render(renderManager);
renderManager.render(tpf);
if (context.isRenderable()){
renderManager.render(tpf);
}
getStateManager().postRender();
} catch (Exception e) {
handleError(e.getMessage(), e);

Loading…
Cancel
Save