public VertigoContext(ShapeMode shapeMode = ShapeMode.SDF, IDrawCallBatcher batcher = null, MaterialPool materialPool = null) { if (batcher == null) { batcher = new DefaultDrawCallBatcher(); } if (materialPool == null) { materialPool = DefaultMaterialPool; } this.defaultShapeMode = shapeMode; this.renderTextures = new Stack <RenderTexture>(); this.renderCalls = new StructList <RenderCall>(); this.renderTexturesToRelease = new LightList <RenderTexture>(); this.batcher = batcher; this.materialPool = materialPool; this.stateStack = new Stack <VertigoState>(); this.position = Vector3.zero; this.rotation = Quaternion.identity; this.scale = Vector3.one; this.shapeGenerator = new ShapeGenerator(); this.geometryGenerator = new GeometryGenerator(); this.geometryCache = new GeometryCache(); }
public void Draw(GeometryCache cache, VertigoMaterial material) { batcher.AddDrawCall(cache, new RangeInt(0, cache.shapes.size), material, renderState); }