TestProjectedWater as StandardGame


I am trying to get the TestProjectedWater working as a GameState within a StandardGame. So far I am able to generate the Camera, Skybox, Fog, and even the waterEffectRenderPass. However, the water shows up as a fully black static plane. I am most probably doing something wrong with the rendering as I was not jet able to implement something similar like the pManager = new BasicPassManager(); used in SimplePassGame.

It would be very kind if somebody could give me some hints or examples about how to use TestProjectedWater within a StandardGame.

Last remark. If I generate a BasicPassManager and add the Renderer() and waterEffectRenderPass, some random colors show up on the dark water which are moving similar to the waves. This fancy colored surface also gives me some impression of being reflective. If it helps I'll post some code.


Well. I try to answer myself. However, it seems that I still don't fully understand whats going on, as it only works on a 7600GS under Windows but not on a 6200 under Linux. I have not tested whether the gfx card or driver or OS makes the difference. The 6200 under Linux throws a 'GL_FRAMEBUFFER_UNSUPPORTED_EXT exception' ,at com.jme.renderer.lwjgl.LWJGLTextureRenderer.checkFBOComplete(LWJGLTextureRenderer.java:475). The other computer works fine. If somebody could give me more insight into this I would very much appreciate it. What's strange for me is, that the official TestProjectedWater demo of jme works fine (without refraction).

My GameState basically has its own BasicPassManager where I attach the waterEffectRenderPass and afterwards the rootNode. The GameState itself has its own update and render functions, without calling the super.render function.

public void render(float interpolation) {

   //dont let super render it, as it would result in strange effects
    //   super.render(interpolation);
    /** Let the PassManager render. */
    Callable<?> pManagerrender = new Callable() {
        public Object call() throws Exception {
            return null;

Some cards, and specially with not very good (or updated) drivers would claim that they support some GL extensions, and then when asked to perform them would really not support them. This seems to be the case with your FBO extension… jME devs are currently working in a way to implement render to texture with a user-defined fallback to pbuffers. Keep an eye on that, or try to update your drivers…

ProjectGridWater also works in my Windows installation, but fails in my Linux one  :x

Maybe you're using an older version of jME? The old one didn't check support for FBO before using it.