From 6680a1dec457b2427049e6c648c4ea0c8b7adddb Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sat, 31 May 2014 19:11:50 -0400 Subject: [PATCH] * FilterPostProcessor now crashes early if packed float texture isn't supported - since it is now required by all filters --- .../src/main/java/com/jme3/post/FilterPostProcessor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java index 7fc7a72be..a7de31e9b 100644 --- a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java +++ b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java @@ -129,7 +129,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { return filters.iterator(); } - public void initialize(RenderManager rm, ViewPort vp) { + public void initialize(RenderManager rm, ViewPort vp) { renderManager = rm; renderer = rm.getRenderer(); viewPort = vp; @@ -137,6 +137,11 @@ public class FilterPostProcessor implements SceneProcessor, Savable { fsQuad.setWidth(1); fsQuad.setHeight(1); + if (!renderer.getCaps().contains(Caps.PackedFloatTexture)) { + throw new RendererException("FilterPostProcessor requires the " + + "video hardware to support packed float texture."); + } + Camera cam = vp.getCamera(); //save view port diensions