本文整理汇总了C#中IPluginIO类的典型用法代码示例。如果您正苦于以下问题:C# IPluginIO类的具体用法?C# IPluginIO怎么用?C# IPluginIO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPluginIO类属于命名空间,在下文中一共展示了IPluginIO类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
if (this.FEnabled[0])
{
if (this.FPassLayerIn.IsConnected)
{
var hint = settings.RenderHint;
settings.RenderHint = eRenderHint.ApplyOnly;
for (int i = 0; i < this.FPassLayerIn.SliceCount; i++)
{
this.FPassLayerIn[i][context].Render(this.FPassLayerIn.PluginIO, context, settings);
}
settings.RenderHint = hint;
}
if (this.FLayerIn.IsConnected)
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
else
{
if (this.FLayerIn.IsConnected)
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
}
示例2: Destroy
public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
{
for (int i = 0; i < this.FOutput.SliceCount; i++)
{
this.FOutput[i].Dispose(context);
}
}
示例3: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
if (this.FEnabled[0])
{
if (this.FLayerIn.PluginIO.IsConnected)
{
List<IDX11RenderSemantic> semantics = new List<IDX11RenderSemantic>();
if (this.FInSemantics.PluginIO.IsConnected)
{
semantics.AddRange(this.FInSemantics);
settings.CustomSemantics.AddRange(semantics);
}
List<DX11Resource<IDX11RenderSemantic>> ressemantics = new List<DX11Resource<IDX11RenderSemantic>>();
if (this.FInResSemantics.PluginIO.IsConnected)
{
ressemantics.AddRange(this.FInResSemantics);
settings.ResourceSemantics.AddRange(ressemantics);
}
this.FLayerIn[0][context].Render(this.FLayerIn.PluginIO, context, settings);
foreach (IDX11RenderSemantic semantic in semantics)
{
settings.CustomSemantics.Remove(semantic);
}
foreach (DX11Resource<IDX11RenderSemantic> rs in ressemantics)
{
settings.ResourceSemantics.Remove(rs);
}
}
}
}
示例4: Update
public void Update(IPluginIO pin, DX11RenderContext context)
{
if (this.FOutGeom.SliceCount == 0) { return; }
if (this.dispatchBuffer == null)
{
this.dispatchBuffer = new DispatchIndirectBuffer(context);
}
if (!this.FOutGeom[0].Contains(context))
{
this.indirectDispatch = new DX11NullIndirectDispatcher();
this.indirectDispatch.IndirectArgs = this.dispatchBuffer;
DX11NullGeometry nullgeom = new DX11NullGeometry(context);
nullgeom.AssignDrawer(this.indirectDispatch);
this.FOutGeom[0][context] = nullgeom;
}
var countuav = this.FInArgBuffer[0][context];
var argBuffer = this.dispatchBuffer.Buffer;
int argOffset = this.FInArgOffset[0];
ResourceRegion region = new ResourceRegion(argOffset, 0, 0, argOffset + 12, 1, 1); //Packed xyz value here
context.CurrentDeviceContext.CopySubresourceRegion(this.FInArgBuffer[0][context].Buffer, 0, region, argBuffer, 0, 0, 0, 0);
}
示例5: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
IDX11Geometry g = settings.Geometry;
if (this.FEnabled[0])
{
if (this.FLayerIn.IsConnected)
{
if (this.FInGeometry.IsConnected)
{
settings.Geometry = this.FInGeometry[0][context];
}
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
else
{
if (this.FLayerIn.IsConnected)
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
settings.Geometry = g;
}
示例6: Destroy
public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
{
for (int i = 0; i < this.FOutGeom.SliceCount; i++)
{
if (this.FOutGeom[i] != null) { this.FOutGeom[i].Dispose(context); }
}
}
示例7: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
if (this.FEnabled[0])
{
if (this.FLayerIn.IsConnected)
{
bool popstate = false;
if (this.FInState.IsConnected)
{
context.RenderStateStack.Push(this.FInState[0]);
popstate = true;
}
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
if (popstate) { context.RenderStateStack.Pop(); }
}
}
else
{
if (this.FLayerIn.IsConnected)
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
}
示例8: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
IDX11Geometry g = settings.Geometry;
if (this.FEnabled[0])
{
if (this.FLayerIn.PluginIO.IsConnected)
{
IDX11Geometry geom = settings.Geometry;
settings.Geometry = null;
if (settings.BackBuffer is IDX11Buffer)
{
IDX11Buffer buffer = settings.BackBuffer as IDX11Buffer;
if (buffer.Buffer.Description.OptionFlags.HasFlag(ResourceOptionFlags.DrawIndirect))
{
this.dispatcher.DispatchBuffer = buffer.Buffer;
this.dispatcher.Offet = this.FInOffset[0];
settings.Geometry = this.geometry;
}
}
this.FLayerIn[0][context].Render(this.FLayerIn.PluginIO, context, settings);
settings.Geometry = geom;
}
}
settings.Geometry = g;
}
示例9: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
if (this.FEnabled[0])
{
if (this.FLayerIn.IsConnected)
{
var currentRef = context.CurrentDeviceContext.OutputMerger.BlendFactor;
context.CurrentDeviceContext.OutputMerger.BlendFactor = this.FInFactor[0];
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
context.CurrentDeviceContext.OutputMerger.BlendFactor = currentRef;
}
}
else
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
示例10: Update
public void Update(IPluginIO pin, DX11RenderContext context)
{
Device device = context.Device;
if (invalidate)
{
for (int i = 0; i < this.FOutGeom.SliceCount; i++)
{
if (this.FInEnabled[i])
{
DX11IndexedGeometry v = (DX11IndexedGeometry)this.FInGeom[i][context].ShallowCopy();
DX11PerVertexIndexedDrawer drawer = new DX11PerVertexIndexedDrawer();
v.AssignDrawer(drawer);
this.FOutGeom[i][context] = v;
}
else
{
this.FOutGeom[i][context] = this.FInGeom[i][context];
}
}
}
}
示例11: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
if (this.FEnabled[0])
{
bool bck = settings.PreserveShaderStages;
settings.PreserveShaderStages = true;
if (this.FLayerIn.IsConnected)
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
settings.PreserveShaderStages = bck;
}
else
{
if (this.FLayerIn.IsConnected)
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
}
示例12: Update
public void Update(IPluginIO pin, DX11RenderContext context)
{
if (this.FInvalidate)
{
for (int i = 0; i < FTextureOutput.SliceCount; i++)
{
if (this.FTextureOutput[i].Contains(context))
{
this.FTextureOutput[i].Dispose(context);
}
try
{
int p = unchecked((int) this.FPointer[i]);
IntPtr share = new IntPtr(p);
Texture2D tex = context.Device.OpenSharedResource<Texture2D>(share);
ShaderResourceView srv = new ShaderResourceView(context.Device, tex);
DX11Texture2D resource = DX11Texture2D.FromTextureAndSRV(context, tex, srv);
this.FTextureOutput[i][context] = resource;
this.FValid[i] = true;
}
catch (Exception)
{
this.FValid[i] = false;
}
}
this.FInvalidate = false;
}
}
示例13: Render
public void Render(IPluginIO pin, DX11RenderContext context, DX11RenderSettings settings)
{
if (this.FLayerIn.IsConnected)
{
bool allow = false;
for (int i = 0; i < this.FViewPortIndex.SliceCount;i++)
{
if (this.FViewPortIndex[i] < 0)
{
allow = true;
}
else if (this.FViewPortIndex[i] % settings.ViewportCount == settings.ViewportIndex)
{
allow = true;
}
}
if (allow)
{
for (int i = 0; i < this.FLayerIn.SliceCount; i++)
{
this.FLayerIn[i][context].Render(this.FLayerIn.PluginIO, context, settings);
}
}
}
}
示例14: Destroy
public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
{
if (this.FOutBody.SliceCount > 0)
{
this.FOutBody[0].Dispose(context);
}
}
示例15: Update
public void Update(IPluginIO pin, DX11RenderContext context)
{
foreach (var processor in FProcessor)
{
processor.UpdateTexture(context);
}
}