コード例 #1
0
 public RenderPipeline(PipelineResources resources)
 {
     MLight.ClearLightDict();
     this.resources     = resources;
     current            = this;
     data.buffer        = new CommandBuffer();
     data.frustumPlanes = new Vector4[6];
     gpurpEvents        = GetAllEvents(resources.gpurpEvents);
     foreach (var i in gpurpEvents)
     {
         i.InitEvent(resources);
     }
 }
コード例 #2
0
 public override void Dispose()
 {
     if (current != this)
     {
         return;
     }
     current = null;
     data.buffer.Dispose();
     foreach (var i in gpurpEvents)
     {
         i.DisposeEvent();
     }
     PipelineSharedData.DisposeAll();
 }
 public RenderPipeline(GameObject pipelinePrefab, PipelineResources resources)
 {
     allDrawEvents.Clear();
     MLight.ClearLightDict();
     this.pipelinePrefab = pipelinePrefab;
     this.resources      = resources;
     current             = this;
     data.buffer         = new CommandBuffer();
     data.frustumPlanes  = new Vector4[6];
     allEvents           = pipelinePrefab.GetComponentsInChildren <PipelineEvent>();
     foreach (var i in allEvents)
     {
         i.InitEvent(resources);
     }
 }