Ejemplo n.º 1
0
 void pushLayer(CanvasLayer newLayer) {
   allLayers.add(newLayer);
   LayerRenderNode layerRenderNode = LayerRenderNode.obtain(this, newLayer);
   layersStack.add(layerRenderNode);
   currentLayer.add(layerRenderNode);
   currentLayer = layerRenderNode;
   lastSimple = null;
 }
Ejemplo n.º 2
0
    void render(GlContext glContext) {
      for (RenderNode node : nodes) {
        if (node instanceof LayerRenderNode) {
          ((LayerRenderNode) node).render(glContext);
        }
      }

      startLayer();
      glContext.render(getCalls());
      calls.clear();
      endLayer();

      for (RenderNode node : nodes) {
        if (node instanceof LayerRenderNode) {
          ((LayerRenderNode) node).resetBuffer();
        }
      }
    }
Ejemplo n.º 3
0
 static LayerRenderNode obtain(RenderGraph graph, CanvasLayer layer) {
   LayerRenderNode command = Pools.obtain(LayerRenderNode.class);
   command.graph = graph;
   command.layer = layer;
   return command;
 }