public void popFBOTextureRenderer() { AbstractFBOTextureRenderer top = _textureRenderers.pop(); top.deactivate(); if (_textureRenderers.size() > 0) { top = _textureRenderers.peek(); top.activate(); } }
protected void doDraw(final List<? extends Spatial> toDraw) { for (int x = 0, max = toDraw.size(); x < max; x++) { final Spatial spat = toDraw.get(x); doDraw(spat); } }
public void render(final Spatial toDraw, final Texture tex, final int clear) { try { ContextManager.getCurrentContext().pushFBOTextureRenderer(this); setupForSingleTexDraw(tex); if (_samples > 0 && _supportsMultisample) { setMSFBO(); } switchCameraIn(clear); doDraw(toDraw); switchCameraOut(); if (_samples > 0 && _supportsMultisample) { blitMSFBO(); } takedownForSingleTexDraw(tex); ContextManager.getCurrentContext().popFBOTextureRenderer(); } catch (final Exception e) { logger.logp(Level.SEVERE, this.getClass().toString(), "render(Spatial, Texture, boolean)", "Exception", e); } }
protected void switchCameraIn(final int clear) { // grab non-rtt settings _oldCamera = Camera.getCurrentCamera(); // swap to rtt settings _parentRenderer.getQueue().pushBuckets(); // clear the scene if (clear != 0) { clearBuffers(clear); } getCamera().update(); getCamera().apply(_parentRenderer); }
public void render(final Scene toDraw, final Texture tex, final int clear) { try { ContextManager.getCurrentContext().pushFBOTextureRenderer(this); setupForSingleTexDraw(tex); if (_samples > 0 && _supportsMultisample) { setMSFBO(); } switchCameraIn(clear); doDraw(toDraw); switchCameraOut(); if (_samples > 0 && _supportsMultisample) { blitMSFBO(); } takedownForSingleTexDraw(tex); ContextManager.getCurrentContext().popFBOTextureRenderer(); } catch (final Exception e) { logger.logp(Level.SEVERE, this.getClass().toString(), "render(Spatial, Texture, boolean)", "Exception", e); } }
public void render(final List<? extends Spatial> toDraw, final Texture tex, final int clear) { try { ContextManager.getCurrentContext().pushFBOTextureRenderer(this); setupForSingleTexDraw(tex); if (_samples > 0 && _supportsMultisample) { setMSFBO(); } switchCameraIn(clear); doDraw(toDraw); switchCameraOut(); if (_samples > 0 && _supportsMultisample) { blitMSFBO(); } takedownForSingleTexDraw(tex); ContextManager.getCurrentContext().popFBOTextureRenderer(); } catch (final Exception e) { logger.logp(Level.SEVERE, this.getClass().toString(), "render(List<Spatial>, Texture, boolean)", "Exception", e); } }
public void pushFBOTextureRenderer(final AbstractFBOTextureRenderer top) { if (_textureRenderers.size() > 0) { _textureRenderers.peek().deactivate(); } _textureRenderers.push(top); top.activate(); }