public void makeCurrentContext() throws Ardor3dException { _canvasCallback.makeCurrent(false); ContextManager.switchContext(this); }
private void giveBackContext() { _parentContext.makeCurrent(); ContextManager.switchContext(_oldContext.getContextKey()); }
public void makeCurrentContext() throws Ardor3dException { try { _canvasCallback.makeCurrent(); GLContext.useContext(_context); ContextManager.switchContext(this); } catch (final LWJGLException e) { throw new Ardor3dException("Failed to claim OpenGL context.", e); } }
private void giveBackContext() throws LWJGLException { if (Display.isCreated()) { Display.makeCurrent(); ContextManager.switchContext(_oldContext.getContextKey()); } else if (_oldContext.getContextKey() instanceof AWTGLCanvas) { ((AWTGLCanvas) _oldContext.getContextKey()).makeCurrent(); ContextManager.switchContext(_oldContext.getContextKey()); } }
ContextManager.switchContext(_context);
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++; }
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.switchContext(this);
ContextManager.switchContext(this); try { _buff.makeCurrent();
ContextManager.switchContext(this);
ContextManager.switchContext(this);
ContextManager.switchContext(_context);