/** * Applies all currently set renderstates to the supplied context * * @param context */ public void applyPassNodeStates(final RenderContext context) { context.pushEnforcedStates(); context.enforceStates(_passStates); }
/** * Applies all currently set renderstates to the supplied context * * @param context */ public void applyPassNodeStates(final RenderContext context) { context.pushEnforcedStates(); context.enforceStates(_passStates); }
/** 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; }
private void activate() { if (_active == 0) { try { _oldContext = ContextManager.getCurrentContext(); _pbuffer.makeCurrent(); ContextManager.switchContext(_pbuffer); ContextManager.getCurrentContext().clearEnforcedStates(); ContextManager.getCurrentContext().enforceStates(_enforcedStates); if (_bgColorDirty) { GL11.glClearColor(_backgroundColor.getRed(), _backgroundColor.getGreen(), _backgroundColor.getBlue(), _backgroundColor.getAlpha()); _bgColorDirty = false; } } catch (final LWJGLException e) { logger.logp(Level.SEVERE, this.getClass().toString(), "activate()", "Exception", e); throw new Ardor3dException(); } } _active++; }
public void render(final Renderer renderer, final Camera camera, final List<Spatial> spatials, final Spatial spatial, final EnumMap<StateType, RenderState> enforcedStates) { if (camera != Camera.getCurrentCamera()) { camera.update(); } camera.apply(renderer); final RenderContext context = ContextManager.getCurrentContext(); context.enforceStates(enforcedStates); if (spatial != null) { spatial.onDraw(renderer); } else { for (final Spatial spat : spatials) { spat.onDraw(renderer); } } renderer.renderBuckets(); context.clearEnforcedStates(); }
public void render(final Renderer renderer, final Camera camera, final List<Spatial> spatials, final Spatial spatial, final RenderMaterial enforcedMaterial, final EnumMap<StateType, RenderState> enforcedStates) { camera.apply(renderer); final RenderContext context = ContextManager.getCurrentContext(); context.enforceMaterial(enforcedMaterial); context.enforceStates(enforcedStates); if (spatial != null) { spatial.onDraw(renderer); } else { for (final Spatial spat : spatials) { spat.onDraw(renderer); } } renderer.renderBuckets(); context.clearEnforcedStates(); context.enforceMaterial(null); }
private void activate() { if (_active == 0) { _oldContext = ContextManager.getCurrentContext(); _context.makeCurrent(); ContextManager.switchContext(_context); ContextManager.getCurrentContext().clearEnforcedStates(); ContextManager.getCurrentContext().enforceStates(_enforcedStates); if (_bgColorDirty) { final GL gl = GLContext.getCurrentGL(); gl.glClearColor(_backgroundColor.getRed(), _backgroundColor.getGreen(), _backgroundColor.getBlue(), _backgroundColor.getAlpha()); _bgColorDirty = false; } } _active++; }
ContextManager.getCurrentContext().pushEnforcedStates(); ContextManager.getCurrentContext().clearEnforcedStates(); ContextManager.getCurrentContext().enforceStates(_enforcedStates);
ContextManager.getCurrentContext().pushEnforcedStates(); ContextManager.getCurrentContext().clearEnforcedStates(); ContextManager.getCurrentContext().enforceStates(_enforcedStates);
ContextManager.getCurrentContext().enforceStates(_enforcedStates);