From 116c7161f7066f374fc4938fbb0e02399a0791d4 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Fri, 9 Nov 2012 06:30:46 +0000 Subject: [PATCH] Added a workaround the incomplete draw buffer in basicShadowRenderer git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9978 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/shadow/BasicShadowRenderer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/core/com/jme3/shadow/BasicShadowRenderer.java b/engine/src/core/com/jme3/shadow/BasicShadowRenderer.java index 9e3b5a61a..ed0ba7ef3 100644 --- a/engine/src/core/com/jme3/shadow/BasicShadowRenderer.java +++ b/engine/src/core/com/jme3/shadow/BasicShadowRenderer.java @@ -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");