Added a workaround the incomplete draw buffer in basicShadowRenderer
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9978 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
c7d42dede5
commit
116c7161f7
@ -68,6 +68,7 @@ public class BasicShadowRenderer implements SceneProcessor {
|
||||
private boolean noOccluders = false;
|
||||
private Vector3f[] points = new Vector3f[8];
|
||||
private Vector3f direction = new Vector3f();
|
||||
protected Texture2D dummyTex;
|
||||
|
||||
/**
|
||||
* Creates a BasicShadowRenderer
|
||||
@ -79,6 +80,10 @@ public class BasicShadowRenderer implements SceneProcessor {
|
||||
shadowMap = new Texture2D(size, size, Format.Depth);
|
||||
shadowFB.setDepthTexture(shadowMap);
|
||||
shadowCam = new Camera(size, size);
|
||||
|
||||
//DO NOT COMMENT THIS (it prevent the OSX incomplete read buffer crash)
|
||||
dummyTex = new Texture2D(size, size, Format.RGBA8);
|
||||
shadowFB.setColorTexture(dummyTex);
|
||||
|
||||
preshadowMat = new Material(manager, "Common/MatDefs/Shadow/PreShadow.j3md");
|
||||
postshadowMat = new Material(manager, "Common/MatDefs/Shadow/BasicPostShadow.j3md");
|
||||
|
Loading…
x
Reference in New Issue
Block a user