/** if enabled, set the states for this pass and then render. */ public final void renderPass(final Renderer r) { if (!_enabled) { return; } _context = ContextManager.getCurrentContext(); _context.pushEnforcedStates(); _context.enforceStates(_passStates); doRender(r); _context.popEnforcedStates(); _context = null; }
/** if enabled, set the states for this pass and then render. */ public final void renderPass(final Renderer r) { if (!_enabled) { return; } _context = ContextManager.getCurrentContext(); _context.pushEnforcedStates(); _context.enforceStates(_passStates); doRender(r); _context.popEnforcedStates(); _context = null; }
/** if enabled, set the states for this pass and then render. */ public final void renderPass(final TextureRenderer r, final int clear, final List<Texture> texs) { if (!_enabled) { return; } _context = ContextManager.getCurrentContext(); _context.pushEnforcedStates(); _context.enforceStates(_passStates); doRender(r, clear, texs); _context.popEnforcedStates(); _context = null; }
/** if enabled, set the states for this pass and then render. */ public final void renderPass(final TextureRenderer r, final int clear, final List<Texture> texs) { if (!_enabled) { return; } _context = ContextManager.getCurrentContext(); _context.pushEnforcedStates(); _context.enforceStates(_passStates); doRender(r, clear, texs); _context.popEnforcedStates(); _context = null; }
@Override public void draw(final Renderer r) { if (_children == null) { return; } final RenderContext context = ContextManager.getCurrentContext(); r.getQueue().pushBuckets(); for (final PassNodeState pass : _passNodeStates) { if (!pass.isEnabled()) { continue; } pass.applyPassNodeStates(context); Spatial child; for (int i = 0, cSize = _children.size(); i < cSize; i++) { child = _children.get(i); if (child != null) { child.onDraw(r); } } r.renderBuckets(); context.popEnforcedStates(); } r.getQueue().popBuckets(); }
@Override public void draw(final Renderer r) { if (_children == null) { return; } final RenderContext context = ContextManager.getCurrentContext(); r.getQueue().pushBuckets(); for (final PassNodeState pass : _passNodeStates) { if (!pass.isEnabled()) { continue; } pass.applyPassNodeStates(context); Spatial child; for (int i = 0, cSize = _children.size(); i < cSize; i++) { child = _children.get(i); if (child != null) { child.onDraw(r); } } r.renderBuckets(); context.popEnforcedStates(); } r.getQueue().popBuckets(); }
@Override protected void deactivate() { if (_active == 1) { final ReadOnlyColorRGBA bgColor = _parentRenderer.getBackgroundColor(); GL11.glClearColor(bgColor.getRed(), bgColor.getGreen(), bgColor.getBlue(), bgColor.getAlpha()); EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, 0); ContextManager.getCurrentContext().popEnforcedStates(); if (_neededClip) { _parentRenderer.popClip(); } } _active--; }
@Override protected void deactivate() { final GL gl = GLContext.getCurrentGL(); if (_active == 1) { final ReadOnlyColorRGBA bgColor = _parentRenderer.getBackgroundColor(); gl.glClearColor(bgColor.getRed(), bgColor.getGreen(), bgColor.getBlue(), bgColor.getAlpha()); gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0); ContextManager.getCurrentContext().popEnforcedStates(); if (_neededClip) { _parentRenderer.popClip(); } } _active--; }
_context.popEnforcedStates();
@Override public void deactivate() { if (_active == 1) { final ReadOnlyColorRGBA bgColor = _parentRenderer.getBackgroundColor(); GL11C.glClearColor(bgColor.getRed(), bgColor.getGreen(), bgColor.getBlue(), bgColor.getAlpha()); GL30C.glBindFramebuffer(GL30C.GL_FRAMEBUFFER, 0); ContextManager.getCurrentContext().popEnforcedStates(); ContextManager.getCurrentContext().popEnforcedMaterial(); if (_neededClip) { _parentRenderer.getScissorUtils().popClip(); } } _active--; }