Skip to content

Commit

Permalink
crlf and solution file
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvux committed Aug 1, 2014
1 parent 508901f commit c261938
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 83 deletions.
166 changes: 83 additions & 83 deletions Nodes/VVVV.DX11.Nodes/Nodes/Geometry/GeometryTopologyNode.cs
@@ -1,83 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;

using SlimDX;
using SlimDX.Direct3D11;

using VVVV.PluginInterfaces.V2;
using VVVV.PluginInterfaces.V1;

using FeralTic.DX11;
using FeralTic.DX11.Resources;

namespace VVVV.DX11.Nodes
{
[PluginInfo(Name = "Topology", Category = "DX11.Geometry", Version = "", Author = "vux")]
public class GeometryTopologyNode : IPluginEvaluate, IDX11ResourceProvider
{
[Input("Geometry In",CheckIfChanged=true)]
protected Pin<DX11Resource<IDX11Geometry>> FInGeom;

[Input("Topology")]
protected IDiffSpread<PrimitiveTopology> FInTopology;

[Input("Enabled")]
protected IDiffSpread<bool> FInEnabled;

[Output("Geometry Out")]
protected ISpread<DX11Resource<IDX11Geometry>> FOutGeom;

bool invalidate = false;

public void Evaluate(int SpreadMax)
{
invalidate = false;

if (this.FInGeom.PluginIO.IsConnected)
{
this.FOutGeom.SliceCount = SpreadMax;

for (int i = 0; i < SpreadMax; i++) { if (this.FOutGeom[i] == null) { this.FOutGeom[i] = new DX11Resource<IDX11Geometry>(); } }

invalidate = this.FInGeom.IsChanged || this.FInEnabled.IsChanged || this.FInTopology.IsChanged;

if (invalidate) { this.FOutGeom.Stream.IsChanged = true; }
}
else
{
this.FOutGeom.SliceCount = 0;
}
}

public void Update(IPluginIO pin, DX11RenderContext context)
{
Device device = context.Device;

if (this.invalidate)
{
for (int i = 0; i < this.FOutGeom.SliceCount; i++)
{
if (this.FInEnabled[i] && this.FInTopology[i] != PrimitiveTopology.Undefined)
{

IDX11Geometry geom = this.FInGeom[i][context].ShallowCopy();
geom.Topology = this.FInTopology[i];
this.FOutGeom[i][context] = geom;
}
else
{
this.FOutGeom[i][context] = this.FInGeom[i][context];
}
}
}
}

public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
{
//Not ownding resource eg: do nothing
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;

using SlimDX;
using SlimDX.Direct3D11;

using VVVV.PluginInterfaces.V2;
using VVVV.PluginInterfaces.V1;

using FeralTic.DX11;
using FeralTic.DX11.Resources;

namespace VVVV.DX11.Nodes
{
[PluginInfo(Name = "Topology", Category = "DX11.Geometry", Version = "", Author = "vux")]
public class GeometryTopologyNode : IPluginEvaluate, IDX11ResourceProvider
{
[Input("Geometry In",CheckIfChanged=true)]
protected Pin<DX11Resource<IDX11Geometry>> FInGeom;

[Input("Topology")]
protected IDiffSpread<PrimitiveTopology> FInTopology;

[Input("Enabled")]
protected IDiffSpread<bool> FInEnabled;

[Output("Geometry Out")]
protected ISpread<DX11Resource<IDX11Geometry>> FOutGeom;

bool invalidate = false;

public void Evaluate(int SpreadMax)
{
invalidate = false;

if (this.FInGeom.PluginIO.IsConnected)
{
this.FOutGeom.SliceCount = SpreadMax;

for (int i = 0; i < SpreadMax; i++) { if (this.FOutGeom[i] == null) { this.FOutGeom[i] = new DX11Resource<IDX11Geometry>(); } }

invalidate = this.FInGeom.IsChanged || this.FInEnabled.IsChanged || this.FInTopology.IsChanged;

if (invalidate) { this.FOutGeom.Stream.IsChanged = true; }
}
else
{
this.FOutGeom.SliceCount = 0;
}
}

public void Update(IPluginIO pin, DX11RenderContext context)
{
Device device = context.Device;

if (this.invalidate)
{
for (int i = 0; i < this.FOutGeom.SliceCount; i++)
{
if (this.FInEnabled[i] && this.FInTopology[i] != PrimitiveTopology.Undefined)
{

IDX11Geometry geom = this.FInGeom[i][context].ShallowCopy();
geom.Topology = this.FInTopology[i];
this.FOutGeom[i][context] = geom;
}
else
{
this.FOutGeom[i][context] = this.FInGeom[i][context];
}
}
}
}

public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
{

}
}
}
11 changes: 11 additions & 0 deletions vvvv-dx11.sln
Expand Up @@ -40,6 +40,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VVVV.DX11.Nodes.kinect2", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VVVV.DX11.Nodes.QrCode", "Nodes\VVVV.DX11.Nodes.QrCode\VVVV.DX11.Nodes.QrCode.csproj", "{347BF0F2-19E1-4B2B-B125-8AC265CB034A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VVVV.Nodes.Bullet", "Nodes\VVVV.DX11.Nodes.Bullet\VVVV.Nodes.Bullet.csproj", "{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -142,6 +144,14 @@ Global
{347BF0F2-19E1-4B2B-B125-8AC265CB034A}.Release|x64.Build.0 = Release|x64
{347BF0F2-19E1-4B2B-B125-8AC265CB034A}.Release|x86.ActiveCfg = Release|x86
{347BF0F2-19E1-4B2B-B125-8AC265CB034A}.Release|x86.Build.0 = Release|x86
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Debug|x64.ActiveCfg = Debug|x64
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Debug|x64.Build.0 = Debug|x64
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Debug|x86.ActiveCfg = Debug|x86
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Debug|x86.Build.0 = Debug|x86
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Release|x64.ActiveCfg = Release|x64
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Release|x64.Build.0 = Release|x64
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Release|x86.ActiveCfg = Release|x86
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -159,5 +169,6 @@ Global
{63DD04AC-9DF1-43B2-937F-82C30A2EB280} = {34741DBE-D233-4D94-BDD9-1469F48C2F16}
{F7A2D9C3-515C-4045-B8D1-4AE0CC8802CD} = {34741DBE-D233-4D94-BDD9-1469F48C2F16}
{347BF0F2-19E1-4B2B-B125-8AC265CB034A} = {34741DBE-D233-4D94-BDD9-1469F48C2F16}
{220F0ECF-6A3B-4DEF-9C34-95ED87DFE439} = {34741DBE-D233-4D94-BDD9-1469F48C2F16}
EndGlobalSection
EndGlobal

0 comments on commit c261938

Please sign in to comment.