/** * @param shared returns the shared GLContext, based on set shared GLAutoDrawable * or GLContext. Maybe null if none is set. * @return true if initialization is pending due to a set shared GLAutoDrawable or GLContext * which is not ready yet. Otherwise false. */ public boolean isSharedGLContextPending(final GLContext[] shared) { final GLContext shareWith; final boolean pending; if ( null != sharedAutoDrawable ) { shareWith = sharedAutoDrawable.getContext(); pending = null == shareWith || !shareWith.isCreated() || !sharedAutoDrawable.areAllGLEventListenerInitialized(); } else { shareWith = sharedContext; pending = null != shareWith && !shareWith.isCreated(); } shared[0] = shareWith; return pending; }
wait && ( !drawable.isRealized() || null==drawable.getContext() ) ) { return false;
@Override public final void display(GLAutoDrawable drawable) { if (!drawable.getContext().isCurrent()) { return; } try { customRender(); } catch (Throwable ex) { logger.error("Error in custom code!", ex); } GLAnimatorControl ani = drawable.getAnimator(); //TODO GameTime updates einbaun logger.trace(String.format("%d Objects took %dms to render; fps:%f", robjekts.size(), ani.getLastFPSPeriod(), ani.getLastFPS())); if (info != null) { info.setFPS(ani.getTotalFPS()); } float delta = ani.getLastFPSPeriod(); for (ShaderUniform su : animated) { su.setData(delta); } if (info != null) { info.setMemInfo(meminfo); } }
wait && ( !drawable.isRealized() || null==drawable.getContext() ) ) { return false;
keepLocked ? srcUpstreamLock : null, srcSurfaceLocked && keepLocked ? srcSurface : null, src.getContext(), aSz, srcAnim, srcAnimStarted);
public void init(GLAutoDrawable drawable) { vtkAbstractJoglComponent.this.isWindowCreated = true; // Make sure the JOGL Context is current GLContext ctx = drawable.getContext(); if (!ctx.isCurrent()) { ctx.makeCurrent(); } // Init VTK OpenGL RenderWindow vtkAbstractJoglComponent.this.glRenderWindow.SetMapped(1); vtkAbstractJoglComponent.this.glRenderWindow.SetPosition(0, 0); vtkAbstractJoglComponent.this.setSize(drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); vtkAbstractJoglComponent.this.glRenderWindow.OpenGLInit(); }
b.disposeGLEventListener(b.getGLEventListener(i), false); b.setContext( a.setContext( b.getContext(), false ), false );