Renders the scene once every refresh
162403
def display(self):
        ""
        self.compositor.waitGetPoses(self.poses, openvr.k_unMaxTrackedDeviceCount, None, 0)
        hmd_pose0 = self.poses[openvr.k_unTrackedDeviceIndex_Hmd]
        if not hmd_pose0.bPoseIsValid:
            return
        # hmd_pose = hmd_pose0.mDeviceToAbsoluteTracking
        # 1) On-screen render:
        if True:
            glClearColor(0.8, 0.4, 0.4, 0) # Pink background
            glClear(GL_COLOR_BUFFER_BIT)
            # glutSwapBuffers()
            glFlush() # Single buffer
        # 2) VR render
        # TODO: render different things to each eye
        glBindFramebuffer(GL_FRAMEBUFFER, self.fb)
        glClearColor(0.8, 0.4, 0.4, 0) # Pink background
        glClear(GL_COLOR_BUFFER_BIT)
        glBindFramebuffer(GL_FRAMEBUFFER, 0)
        #
        # TODO: use different textures for each eye
        self.compositor.submit(openvr.Eye_Left, self.texture)
        self.compositor.submit(openvr.Eye_Right, self.texture)
        glBindFramebuffer(GL_FRAMEBUFFER, 0)
742696
function onPagerendered(obj) {
        cache[obj.url] = {
            resource: obj.resource,
            time: Date.now()
        };

        //page render end
        trigger('onpagerendercomplete',{
            url : obj.url
        });
    }
1234257
function _renderFrame(time) {
            var stage = _stages[_state].stage;
            // update all game objects
            me.game.update(time, stage);
            // render all game objects
            me.game.draw(stage);
            // schedule the next frame update
            if (_animFrameId !== -1) {
                _animFrameId = window.requestAnimationFrame(_renderFrame);
            }
        }
366124
def render_scene(self):
		""
		self.canvas.SetCurrent ( self.context )
		self.renderer.render_scene()
		# Done rendering
		# self.canvas.SwapBuffers()
		if self.canvas.IsDoubleBuffered():
			self.canvas.SwapBuffers()
			print ("double buffered") # Do not want
		else:
			pass
			# TODO: SwapBuffers() seems required to show on desktop monitor,
			# but causes stalling when monitor is slower than VR headset
			self.canvas.SwapBuffers()
936216
function () {
    var sceneEl = this.el.sceneEl;
    var canvasEl = sceneEl.canvas;

    // Wait for canvas to load.
    if (!canvasEl) {
      sceneEl.addEventListener('render-target-loaded', bind(this.addEventListeners, this));
      return;
    }

    // Mouse events.
    canvasEl.addEventListener('mousedown', this.onMouseDown, false);
    window.addEventListener('mousemove', this.onMouseMove, false);
    window.addEventListener('mouseup', this.onMouseUp, false);

    // Touch events.
    canvasEl.addEventListener('touchstart', this.onTouchStart);
    window.addEventListener('touchmove', this.onTouchMove);
    window.addEventListener('touchend', this.onTouchEnd);

    // sceneEl events.
    sceneEl.addEventListener('enter-vr', this.onEnterVR);
    sceneEl.addEventListener('exit-vr', this.onExitVR);

    // Pointer Lock events.
    if (this.data.pointerLockEnabled) {
      document.addEventListener('pointerlockchange', this.onPointerLockChange, false);
      document.addEventListener('mozpointerlockchange', this.onPointerLockChange, false);
      document.addEventListener('pointerlockerror', this.onPointerLockError, false);
    }
  }
1044651
def _render(self):
        
        if hasattr(self, 'ren_win'):
            if hasattr(self, 'render_trigger'):
                self.render_trigger.emit()
            elif not self._first_time:
                self.render()
314306
def render_scene(self):
		""
		self.init_gl() # should be a no-op after the first frame is rendered
		SDL_GL_MakeCurrent ( self.window, self.context )
		self.renderer.render_scene()
		# Done rendering
		# SDL_GL_SwapWindow(self.window)
		glFlush()
865213
synchronized void refresh() {
    if(reinitOnRefresh) {
      LOG.debug("Reinitialize in thread " + Thread.currentThread().getName());
      reinitialize();
      reinitOnRefresh = false;
      return;
    }
    synchronized(plot) {
      boolean refreshcss = false;
      if(plotmap == null) {
        throw new IllegalStateException("Plotmap is null");
      }
      final int thumbsize = (int) Math.max(screenwidth / plotmap.getWidth(), screenheight / plotmap.getHeight());
      for(PlotItem pi : plotmap.keySet()) {
        for(Iterator<PlotItem> iter = pi.itemIterator(); iter.hasNext();) {
          PlotItem it = iter.next();

          for(Iterator<VisualizationTask> tit = it.tasks.iterator(); tit.hasNext();) {
            VisualizationTask task = tit.next();
            Pair<Element, Visualization> pair = vistoelem.get(it, task);
            // New task?
            if(pair == null) {
              if(visibleInOverview(task)) {
                Element elem = plot.svgElement(SVGConstants.SVG_G_TAG);
                pair = new Pair<>(elem, embedOrThumbnail(thumbsize, it, task, elem));
                vistoelem.get(it, null).first.appendChild(elem);
                vistoelem.put(it, task, pair);
                refreshcss = true;
              }
            }
            else if(pair.first != null) {
              if(visibleInOverview(task)) {
                // unhide if hidden.
                if(pair.first.hasAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY)) {
                  pair.first.removeAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY);
                }
              }
              else {
                // hide if there is anything to hide.
                if(pair.first.hasChildNodes()) {
                  pair.first.setAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY, SVGConstants.CSS_HIDDEN_VALUE);
                }
              }
              // TODO: unqueue pending thumbnails
            }
          }
        }
      }
      if(refreshcss) {
        plot.updateStyleElement();
      }
    }
  }
1025311
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WRepeater repeater = (WRepeater) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:panel");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendClose();

		xml.appendTag("ui:content");
		paintRows(repeater, renderContext);
		xml.appendEndTag("ui:content");

		xml.appendEndTag("ui:panel");
	}
958190
function RenderManager(view) {
	this.running = false;
	this._frame = 0;

	this.view = view;
	this.skipFrames = 0;
	this.skipFramesCounter = 0;
	this.onEnterFrame = new signals.Signal();
	this.onExitFrame = new signals.Signal();
	this.render = this.render.bind(this);
	this.renderLoop = this.renderLoop.bind(this);
}
484886
private void refresh() {
        if (!refreshCheckStart()) {
            return;
        }
        final TileStates tileStates = mTilesOverlay.getTileStates();
        do {
            mTilesOverlay.drawTiles(null, mProjection, mProjection.getZoomLevel(), mViewPort);
            boolean ready = true;
            if (mIncludeFlags != 0 && mIncludeFlags != INCLUDE_FLAGS_ALL) {
                if (ready && (mIncludeFlags & INCLUDE_FLAG_UPTODATE) == 0 && tileStates.getUpToDate() != 0) {
                    ready = false;
                }
                if (ready && (mIncludeFlags & INCLUDE_FLAG_EXPIRED) == 0 && tileStates.getExpired() != 0) {
                    ready = false;
                }
                if (ready && (mIncludeFlags & INCLUDE_FLAG_SCALED) == 0 && tileStates.getScaled() != 0) {
                    ready = false;
                }
                if (ready && (mIncludeFlags & INCLUDE_FLAG_NOTFOUND) == 0 && tileStates.getNotFound() != 0) {
                    ready = false;
                }
            }
            if (ready) {
                if (mStatus == Status.CANVAS_OK || mStatus == Status.PAINTING) {
                    return;
                }
                if (!refreshCheckFinish()) {
                    return;
                }
                mStatus = Status.PAINTING;
                if (mIsDetached) {
                    return;
                }
                draw();
                mStatus = Status.CANVAS_OK;
                final MapSnapshotable mapSnapshotable = mMapSnapshotable;
                if (mapSnapshotable != null) {
                    mapSnapshotable.callback(MapSnapshot.this);
                }
            }
        } while(refreshCheckEnd());
    }
450754
function resize() {
    var w = $(window).width(), h = $(window).height();
    canvas.attr({ width: w, height: h });
    scene.getCamera().setAspect(w / h);
    renderer.clearViewport();
  }
956704
async def refresh(self):
        """"""
        raw_data = await self.request.get(self._resource_path, {"refresh": "true"})

        self._raw_data = raw_data[ATTR_SHADE]
787911
@Override
	public void render(GuiRenderer renderer)
	{
		if (!isVisible())
			return;

		//		if (getGui().isOverlay())
		//		{
		//			GlStateManager.blendFunc(GL11.GL_CONSTANT_ALPHA, GL11.GL_ONE_MINUS_CONSTANT_ALPHA);
		//			GL14.glBlendColor(1, 1, 1, (float) getAlpha() / 255);
		//		}

		//store last drawn component so that it can be set back after drawing.
		//makes sure components overriding rendering and calling super still have correct
		//relative position in case super renders other components.
		UIComponent oldComponent = renderer.currentComponent;

		//draw background
		IGuiRenderer gr = backgroundRenderer.get();
		if (gr != null)
		{
			renderer.currentComponent = this;
			gr.render(renderer);
			renderer.next();
		}

		//draw foreground
		gr = foregroundRenderer.get();
		if (gr != null)
		{
			ClipArea area = IClipable.intersected(this);
			if (!area.fullClip())
			{
				if (!(this instanceof IControlComponent))
					renderer.startClipping(area);
				renderer.currentComponent = this;
				gr.render(renderer);
				if (!(this instanceof IControlComponent))
					renderer.endClipping(area);
			}
		}

		for (IControlComponent c : controlComponents)
			c.render(renderer);

		renderer.currentComponent = oldComponent;
	}
1247166
function (renderer) {

        var _gl = renderer.gl;
        var cache = this._cache;

        cache.use(renderer.__uid__);

        var renderBuffer = cache.get(KEY_RENDERBUFFER);
        if (renderBuffer) {
            _gl.deleteRenderbuffer(renderBuffer);
        }
        var frameBuffer = cache.get(KEY_FRAMEBUFFER);
        if (frameBuffer) {
            _gl.deleteFramebuffer(frameBuffer);
        }
        cache.deleteContext(renderer.__uid__);

        // Clear cache for reusing
        this._textures = {};

    }
603378
function () {
        var self = this;

        // Render any new items
        self.items().each(function (ctrl, index) {
          var containerElm;

          ctrl.parent(self);

          if (!ctrl.state.get('rendered')) {
            containerElm = self.getEl('body');

            // Insert or append the item
            if (containerElm.hasChildNodes() && index <= containerElm.childNodes.length - 1) {
              $(containerElm.childNodes[index]).before(ctrl.renderHtml());
            } else {
              $(containerElm).append(ctrl.renderHtml());
            }

            ctrl.postRender();
            ReflowQueue.add(ctrl);
          }
        });

        self._layout.applyClasses(self.items().filter(':visible'));
        self._lastRect = null;

        return self;
      }
226812
protected void increaseRefreshInterval() {
		refreshInterval = Math.min(REFRESH_INTERVALS.size() - 1, refreshInterval + 1);

		// reset view
		resetAllParts();

		synchronized (refreshThread) {
			refreshThread.notify();
		}
	}