* 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: http://jmonkeyengine.googlecode.com/svn/trunk@7095
75d07b2b-3a1a-0410-a2c5-
0572b91ccdca
</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>
message="nbplatform.default.harness.dir=${nbplatform.dir}${file.separator}harness
" 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>
\ No newline at end of file
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();
return;
}
+ this.shader = renderer.getCaps().contains(Caps.GLSL100);
+
for (int i = 0; i < preViewPorts.size(); i++) {
renderViewPort(preViewPorts.get(i), tpf);
}
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() {
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);
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);