Finished the ANX.Framework side of EffectAnnotation, EffectParameter and EffectTechnique

This commit is contained in:
SND\AstrorEnales_cp 2012-10-13 13:12:07 +00:00 committed by Konstantin Koch
parent f08d6ea189
commit 0b9acc40ee
25 changed files with 252 additions and 190 deletions

View File

@ -445,6 +445,7 @@
<Compile Include="NonXNA\Reflection\AssemblyLoader.cs" /> <Compile Include="NonXNA\Reflection\AssemblyLoader.cs" />
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" /> <Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" /> <Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" />
<Compile Include="NonXNA\RenderSystem\INativeEffectAnnotation.cs" />
<Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" /> <Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" />
<Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" /> <Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" />
<Compile Include="NonXNA\SoundSystem\IMicrophone.cs" /> <Compile Include="NonXNA\SoundSystem\IMicrophone.cs" />

View File

@ -445,6 +445,7 @@
<Compile Include="NonXNA\Reflection\AssemblyLoader.cs" /> <Compile Include="NonXNA\Reflection\AssemblyLoader.cs" />
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" /> <Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" /> <Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" />
<Compile Include="NonXNA\RenderSystem\INativeEffectAnnotation.cs" />
<Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" /> <Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" />
<Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" /> <Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" />
<Compile Include="NonXNA\SoundSystem\IMicrophone.cs" /> <Compile Include="NonXNA\SoundSystem\IMicrophone.cs" />

View File

@ -447,6 +447,7 @@
<Compile Include="NonXNA\Reflection\AssemblyLoader.cs" /> <Compile Include="NonXNA\Reflection\AssemblyLoader.cs" />
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" /> <Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" /> <Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" />
<Compile Include="NonXNA\RenderSystem\INativeEffectAnnotation.cs" />
<Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" /> <Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" />
<Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" /> <Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" />
<Compile Include="NonXNA\SoundSystem\IMicrophone.cs" /> <Compile Include="NonXNA\SoundSystem\IMicrophone.cs" />

View File

@ -448,6 +448,7 @@
<Compile Include="NonXNA\Reflection\AssemblyLoader.cs" /> <Compile Include="NonXNA\Reflection\AssemblyLoader.cs" />
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" /> <Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" /> <Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" />
<Compile Include="NonXNA\RenderSystem\INativeEffectAnnotation.cs" />
<Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" /> <Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" />
<Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" /> <Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" />
<Compile Include="NonXNA\SoundSystem\IMicrophone.cs" /> <Compile Include="NonXNA\SoundSystem\IMicrophone.cs" />

View File

@ -1,5 +1,6 @@
using System; using System;
using ANX.Framework.NonXNA.Development; using ANX.Framework.NonXNA.Development;
using ANX.Framework.NonXNA.RenderSystem;
// This file is part of the ANX.Framework created by the // This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license. // "ANX.Framework developer group" and released under the Ms-PL license.
@ -7,97 +8,86 @@ using ANX.Framework.NonXNA.Development;
namespace ANX.Framework.Graphics namespace ANX.Framework.Graphics
{ {
[PercentageComplete(10)] [PercentageComplete(100)]
[Developer("Glatzemann")] [Developer("AstrorEnales")]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
public sealed class EffectAnnotation public sealed class EffectAnnotation
{ {
private readonly INativeEffectAnnotation nativeAnnotation;
public int ColumnCount public int ColumnCount
{ {
get get { return nativeAnnotation.ColumnCount; }
{
throw new NotImplementedException();
}
} }
public string Name public string Name
{ {
get get { return nativeAnnotation.Name; }
{
throw new NotImplementedException();
}
} }
public EffectParameterClass ParameterClass public EffectParameterClass ParameterClass
{ {
get get { return nativeAnnotation.ParameterClass; }
{
throw new NotImplementedException();
}
} }
public EffectParameterType ParameterType public EffectParameterType ParameterType
{ {
get get { return nativeAnnotation.ParameterType; }
{
throw new NotImplementedException();
}
} }
public int RowCount public int RowCount
{ {
get get { return nativeAnnotation.RowCount; }
{
throw new NotImplementedException();
}
} }
public string Semantic public string Semantic
{ {
get get { return nativeAnnotation.Semantic; }
{
throw new NotImplementedException();
}
} }
internal EffectAnnotation(INativeEffectAnnotation setNativeAnnotation)
{
nativeAnnotation = setNativeAnnotation;
}
public bool GetValueBoolean() public bool GetValueBoolean()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueBoolean();
} }
public int GetValueInt32() public int GetValueInt32()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueInt32();
} }
public Matrix GetValueMatrix() public Matrix GetValueMatrix()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueMatrix();
} }
public float GetValueSingle() public float GetValueSingle()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueSingle();
} }
public string GetValueString() public string GetValueString()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueString();
} }
public Vector2 GetValueVector2() public Vector2 GetValueVector2()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueVector2();
} }
public Vector3 GetValueVector3() public Vector3 GetValueVector3()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueVector3();
} }
public Vector4 GetValueVector4() public Vector4 GetValueVector4()
{ {
throw new NotImplementedException(); return nativeAnnotation.GetValueVector4();
} }
} }
} }

View File

@ -35,9 +35,9 @@ namespace ANX.Framework.Graphics
get { return annotations.FirstOrDefault(annotation => annotation.Name == name); } get { return annotations.FirstOrDefault(annotation => annotation.Name == name); }
} }
internal EffectAnnotationCollection() internal EffectAnnotationCollection(List<EffectAnnotation> setAnnotations)
{ {
annotations = new List<EffectAnnotation>(); annotations = setAnnotations ?? new List<EffectAnnotation>();
} }
IEnumerator<EffectAnnotation> IEnumerable<EffectAnnotation>.GetEnumerator() IEnumerator<EffectAnnotation> IEnumerable<EffectAnnotation>.GetEnumerator()

View File

@ -9,280 +9,276 @@ using ANX.Framework.NonXNA.Development;
namespace ANX.Framework.Graphics namespace ANX.Framework.Graphics
{ {
[PercentageComplete(80)] [PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
[Developer("Glatzemann")] [Developer("Glatzemann")]
public sealed class EffectParameter public sealed class EffectParameter
{ {
#region Public (TODO) private readonly INativeEffectParameter nativeParameter;
public INativeEffectParameter NativeParameter { get; set; }
public EffectAnnotationCollection Annotations #region Public
{ public EffectAnnotationCollection Annotations
get {
{ get { return nativeParameter.Annotations; }
throw new NotImplementedException(); }
}
}
public EffectParameterCollection Elements public EffectParameterCollection Elements
{ {
get get { return nativeParameter.Elements; }
{
throw new NotImplementedException();
}
} }
public EffectParameterCollection StructureMembers public EffectParameterCollection StructureMembers
{ {
get get { return nativeParameter.StructureMembers; }
{
throw new NotImplementedException();
}
} }
public int ColumnCount public int ColumnCount
{ {
get { return NativeParameter.ColumnCount; } get { return nativeParameter.ColumnCount; }
} }
public string Name public string Name
{ {
get { return NativeParameter.Name; } get { return nativeParameter.Name; }
} }
public EffectParameterClass ParameterClass public EffectParameterClass ParameterClass
{ {
get { return NativeParameter.ParameterClass; } get { return nativeParameter.ParameterClass; }
} }
public EffectParameterType ParameterType public EffectParameterType ParameterType
{ {
get { return NativeParameter.ParameterType; } get { return nativeParameter.ParameterType; }
} }
public int RowCount public int RowCount
{ {
get { return NativeParameter.RowCount; } get { return nativeParameter.RowCount; }
} }
public string Semantic public string Semantic
{ {
get { return NativeParameter.Semantic; } get { return nativeParameter.Semantic; }
} }
#endregion #endregion
internal EffectParameter(INativeEffectParameter nativeParameter)
{
this.nativeParameter = nativeParameter;
}
#region GetValue #region GetValue
public bool GetValueBoolean() public bool GetValueBoolean()
{ {
return NativeParameter.GetValueBoolean(); return nativeParameter.GetValueBoolean();
} }
public bool[] GetValueBooleanArray(int count) public bool[] GetValueBooleanArray(int count)
{ {
return NativeParameter.GetValueBooleanArray(count); return nativeParameter.GetValueBooleanArray(count);
} }
public int GetValueInt32() public int GetValueInt32()
{ {
return NativeParameter.GetValueInt32(); return nativeParameter.GetValueInt32();
} }
public Int32[] GetValueInt32Array(int count) public Int32[] GetValueInt32Array(int count)
{ {
return NativeParameter.GetValueInt32Array(count); return nativeParameter.GetValueInt32Array(count);
} }
public Matrix GetValueMatrix() public Matrix GetValueMatrix()
{ {
return NativeParameter.GetValueMatrix(); return nativeParameter.GetValueMatrix();
} }
public Matrix[] GetValueMatrixArray(int count) public Matrix[] GetValueMatrixArray(int count)
{ {
return NativeParameter.GetValueMatrixArray(count); return nativeParameter.GetValueMatrixArray(count);
} }
public Matrix GetValueMatrixTranspose() public Matrix GetValueMatrixTranspose()
{ {
return NativeParameter.GetValueMatrixTranspose(); return nativeParameter.GetValueMatrixTranspose();
} }
public Matrix[] GetValueMatrixTransposeArray(int count) public Matrix[] GetValueMatrixTransposeArray(int count)
{ {
return NativeParameter.GetValueMatrixTransposeArray(count); return nativeParameter.GetValueMatrixTransposeArray(count);
} }
public Quaternion GetValueQuaternion() public Quaternion GetValueQuaternion()
{ {
return NativeParameter.GetValueQuaternion(); return nativeParameter.GetValueQuaternion();
} }
public Quaternion[] GetValueQuaternionArray(int count) public Quaternion[] GetValueQuaternionArray(int count)
{ {
return NativeParameter.GetValueQuaternionArray(count); return nativeParameter.GetValueQuaternionArray(count);
} }
public float GetValueSingle() public float GetValueSingle()
{ {
return NativeParameter.GetValueSingle(); return nativeParameter.GetValueSingle();
} }
public float[] GetValueSingleArray(int count) public float[] GetValueSingleArray(int count)
{ {
return NativeParameter.GetValueSingleArray(count); return nativeParameter.GetValueSingleArray(count);
} }
public string GetValueString() public string GetValueString()
{ {
return NativeParameter.GetValueString(); return nativeParameter.GetValueString();
} }
public Texture2D GetValueTexture2D() public Texture2D GetValueTexture2D()
{ {
return NativeParameter.GetValueTexture2D(); return nativeParameter.GetValueTexture2D();
} }
public Texture3D GetValueTexture3D() public Texture3D GetValueTexture3D()
{ {
return NativeParameter.GetValueTexture3D(); return nativeParameter.GetValueTexture3D();
} }
public TextureCube GetValueTextureCube() public TextureCube GetValueTextureCube()
{ {
return NativeParameter.GetValueTextureCube(); return nativeParameter.GetValueTextureCube();
} }
public Vector2 GetValueVector2() public Vector2 GetValueVector2()
{ {
return NativeParameter.GetValueVector2(); return nativeParameter.GetValueVector2();
} }
public Vector2[] GetValueVector2Array(int count) public Vector2[] GetValueVector2Array(int count)
{ {
return NativeParameter.GetValueVector2Array(count); return nativeParameter.GetValueVector2Array(count);
} }
public Vector3 GetValueVector3() public Vector3 GetValueVector3()
{ {
return NativeParameter.GetValueVector3(); return nativeParameter.GetValueVector3();
} }
public Vector3[] GetValueVector3Array(int count) public Vector3[] GetValueVector3Array(int count)
{ {
return NativeParameter.GetValueVector3Array(count); return nativeParameter.GetValueVector3Array(count);
} }
public Vector4 GetValueVector4() public Vector4 GetValueVector4()
{ {
return NativeParameter.GetValueVector4(); return nativeParameter.GetValueVector4();
} }
public Vector4[] GetValueVector4Array(int count) public Vector4[] GetValueVector4Array(int count)
{ {
return NativeParameter.GetValueVector4Array(count); return nativeParameter.GetValueVector4Array(count);
} }
#endregion #endregion
#region SetValue #region SetValue
public void SetValue([MarshalAs(UnmanagedType.U1)] bool value) public void SetValue([MarshalAs(UnmanagedType.U1)] bool value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(bool[] value) public void SetValue(bool[] value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(int value) public void SetValue(int value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(int[] value) public void SetValue(int[] value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Matrix value) public void SetValue(Matrix value)
{ {
NativeParameter.SetValue(value, false); nativeParameter.SetValue(value, false);
} }
public void SetValue(Matrix[] value) public void SetValue(Matrix[] value)
{ {
NativeParameter.SetValue(value, false); nativeParameter.SetValue(value, false);
} }
public void SetValue(Quaternion value) public void SetValue(Quaternion value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Quaternion[] value) public void SetValue(Quaternion[] value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(float value) public void SetValue(float value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(float[] value) public void SetValue(float[] value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(string value) public void SetValue(string value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Texture value) public void SetValue(Texture value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Vector2 value) public void SetValue(Vector2 value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Vector2[] value) public void SetValue(Vector2[] value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Vector3 value) public void SetValue(Vector3 value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Vector3[] value) public void SetValue(Vector3[] value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Vector4 value) public void SetValue(Vector4 value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValue(Vector4[] value) public void SetValue(Vector4[] value)
{ {
NativeParameter.SetValue(value); nativeParameter.SetValue(value);
} }
public void SetValueTranspose(Matrix value) public void SetValueTranspose(Matrix value)
{ {
NativeParameter.SetValue(value, true); nativeParameter.SetValue(value, true);
} }
public void SetValueTranspose(Matrix[] value) public void SetValueTranspose(Matrix[] value)
{ {
NativeParameter.SetValue(value, true); nativeParameter.SetValue(value, true);
} }
#endregion #endregion
} }

View File

@ -12,25 +12,10 @@ namespace ANX.Framework.Graphics
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
public sealed class EffectPass public sealed class EffectPass
{ {
private string name; private readonly Effect parentEffect;
private EffectAnnotationCollection annotations;
private Effect parentEffect;
public string Name public string Name { get; private set; }
{ public EffectAnnotationCollection Annotations { get; private set; }
get
{
return this.name;
}
}
public EffectAnnotationCollection Annotations
{
get
{
return this.annotations;
}
}
internal EffectPass(Effect parentEffect) internal EffectPass(Effect parentEffect)
{ {
@ -43,7 +28,7 @@ namespace ANX.Framework.Graphics
public void Apply() public void Apply()
{ {
parentEffect.PreBindSetParameters(); parentEffect.PreBindSetParameters();
parentEffect.NativeEffect.Apply(this.parentEffect.GraphicsDevice); parentEffect.NativeEffect.Apply(parentEffect.GraphicsDevice);
} }
} }
} }

View File

@ -8,7 +8,7 @@ using ANX.Framework.NonXNA.Development;
namespace ANX.Framework.Graphics namespace ANX.Framework.Graphics
{ {
[PercentageComplete(90)] [PercentageComplete(100)]
[Developer("Glatzemann")] [Developer("Glatzemann")]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
public sealed class EffectTechnique public sealed class EffectTechnique
@ -22,10 +22,7 @@ namespace ANX.Framework.Graphics
public EffectAnnotationCollection Annotations public EffectAnnotationCollection Annotations
{ {
get get { return NativeTechnique.Annotations; }
{
throw new NotImplementedException();
}
} }
public EffectPassCollection Passes { get; private set; } public EffectPassCollection Passes { get; private set; }

View File

@ -89,13 +89,10 @@ namespace ANX.Framework.Graphics
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
if (obj != null && obj is VertexElement) return obj is VertexElement && this == (VertexElement)obj;
return this == (VertexElement)obj;
return false;
} }
public static bool operator ==(VertexElement lhs, VertexElement rhs) public static bool operator ==(VertexElement lhs, VertexElement rhs)
{ {
return lhs.offset == rhs.offset && lhs.elementFormat == rhs.elementFormat && lhs.elementUsage == rhs.elementUsage && return lhs.offset == rhs.offset && lhs.elementFormat == rhs.elementFormat && lhs.elementUsage == rhs.elementUsage &&
lhs.usageIndex == rhs.usageIndex; lhs.usageIndex == rhs.usageIndex;

View File

@ -0,0 +1,31 @@
using ANX.Framework.Graphics;
using ANX.Framework.NonXNA.Development;
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ANX.Framework.NonXNA.RenderSystem
{
[PercentageComplete(100)]
[Developer("AstrorEnales")]
[TestState(TestStateAttribute.TestState.Untested)]
public interface INativeEffectAnnotation
{
int ColumnCount { get; }
string Name { get; }
EffectParameterClass ParameterClass { get; }
EffectParameterType ParameterType { get; }
int RowCount { get; }
string Semantic { get; }
bool GetValueBoolean();
int GetValueInt32();
Matrix GetValueMatrix();
float GetValueSingle();
string GetValueString();
Vector2 GetValueVector2();
Vector3 GetValueVector3();
Vector4 GetValueVector4();
}
}

View File

@ -22,6 +22,9 @@ namespace ANX.Framework.NonXNA
int RowCount { get; } int RowCount { get; }
EffectParameterClass ParameterClass { get; } EffectParameterClass ParameterClass { get; }
EffectParameterType ParameterType { get; } EffectParameterType ParameterType { get; }
EffectAnnotationCollection Annotations { get; }
EffectParameterCollection Elements { get; }
EffectParameterCollection StructureMembers { get; }
#region GetValue #region GetValue
bool GetValueBoolean(); bool GetValueBoolean();

View File

@ -14,7 +14,7 @@ namespace ANX.Framework.NonXNA
public interface INativeEffectTechnique public interface INativeEffectTechnique
{ {
string Name { get; } string Name { get; }
IEnumerable<EffectPass> Passes { get; } IEnumerable<EffectPass> Passes { get; }
EffectAnnotationCollection Annotations { get; }
} }
} }

View File

@ -214,12 +214,10 @@ namespace ANX.RenderSystem.GL3
#endregion #endregion
#region AddParametersFrom #region AddParametersFrom
private void AddParametersFrom(int programHandle, List<string> parameterNames, private void AddParametersFrom(int programHandle, List<string> parameterNames, EffectTechniqueGL3 technique)
EffectTechniqueGL3 technique)
{ {
int uniformCount; int uniformCount;
GL.GetProgram(programHandle, ProgramParameter.ActiveUniforms, GL.GetProgram(programHandle, ProgramParameter.ActiveUniforms, out uniformCount);
out uniformCount);
ErrorHelper.Check("GetProgram ActiveUniforms"); ErrorHelper.Check("GetProgram ActiveUniforms");
for (int index = 0; index < uniformCount; index++) for (int index = 0; index < uniformCount; index++)
@ -231,13 +229,8 @@ namespace ANX.RenderSystem.GL3
{ {
parameterNames.Add(name); parameterNames.Add(name);
int uniformIndex = GL.GetUniformLocation(programHandle, name); int uniformIndex = GL.GetUniformLocation(programHandle, name);
ErrorHelper.Check("GetUniformLocation name=" + name + ErrorHelper.Check("GetUniformLocation name=" + name + " uniformIndex=" + uniformIndex);
" uniformIndex=" + uniformIndex); parameters.Add(new EffectParameter(new EffectParameterGL3(technique, name, uniformIndex)));
parameters.Add(new EffectParameter()
{
NativeParameter =
new EffectParameterGL3(technique, name, uniformIndex),
});
} }
} }
} }

View File

@ -51,6 +51,21 @@ namespace ANX.RenderSystem.GL3
} }
public EffectParameterType ParameterType public EffectParameterType ParameterType
{
get { throw new NotImplementedException(); }
}
public EffectAnnotationCollection Annotations
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection Elements
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection StructureMembers
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }

View File

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using ANX.Framework.Graphics; using ANX.Framework.Graphics;
using ANX.Framework.NonXNA; using ANX.Framework.NonXNA;
@ -34,25 +35,23 @@ namespace ANX.RenderSystem.GL3
#endregion #endregion
#region Public #region Public
/// <summary> /// <summary>
/// The name of the effect technique. /// The name of the effect technique.
/// </summary> /// </summary>
public string Name public string Name { get; private set; }
{
get;
private set;
}
/// <summary> /// <summary>
/// The passes of the technique. /// The passes of the technique.
/// </summary> /// </summary>
public IEnumerable<EffectPass> Passes public IEnumerable<EffectPass> Passes
{ {
get get { yield return pass; }
{ }
yield return pass;
} public EffectAnnotationCollection Annotations
} {
get { throw new NotImplementedException(); }
}
#endregion #endregion
#region Constructor #region Constructor

View File

@ -42,15 +42,14 @@ namespace ANX.RenderSystem.Windows.DX10
{ {
get get
{ {
for (int i = 0; i < NativeEffect.Description.GlobalVariableCount; i++) for (int i = 0; i < NativeEffect.Description.GlobalVariableCount; i++)
{ {
EffectParameter_DX10 parDx10 = new EffectParameter_DX10(); var parDx10 = new EffectParameter_DX10
parDx10.NativeParameter = NativeEffect.GetVariableByIndex(i); {
NativeParameter = NativeEffect.GetVariableByIndex(i)
EffectParameter par = new EffectParameter(); };
par.NativeParameter = parDx10; yield return new EffectParameter(parDx10);
yield return par; }
}
} }
} }
#endregion #endregion

View File

@ -48,6 +48,21 @@ namespace ANX.RenderSystem.Windows.DX10
{ {
get { return DxFormatConverter.Translate(NativeParameter.TypeInfo.Description.Type); } get { return DxFormatConverter.Translate(NativeParameter.TypeInfo.Description.Type); }
} }
public EffectAnnotationCollection Annotations
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection Elements
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection StructureMembers
{
get { throw new NotImplementedException(); }
}
#endregion #endregion
#region SetValue (bool) #region SetValue (bool)

View File

@ -16,7 +16,7 @@ namespace ANX.RenderSystem.Windows.DX10
{ {
public class EffectTechnique_DX10 : INativeEffectTechnique public class EffectTechnique_DX10 : INativeEffectTechnique
{ {
private Effect parentEffect; private readonly Effect parentEffect;
public EffectTechnique_DX10(Effect parentEffect, Dx10.EffectTechnique nativeTechnique) public EffectTechnique_DX10(Effect parentEffect, Dx10.EffectTechnique nativeTechnique)
{ {
@ -51,5 +51,10 @@ namespace ANX.RenderSystem.Windows.DX10
} }
} }
} }
public EffectAnnotationCollection Annotations
{
get { throw new NotImplementedException(); }
}
} }
} }

View File

@ -42,12 +42,11 @@ namespace ANX.RenderSystem.Windows.DX11
{ {
for (int i = 0; i < NativeEffect.Description.GlobalVariableCount; i++) for (int i = 0; i < NativeEffect.Description.GlobalVariableCount; i++)
{ {
EffectParameter_DX11 parDx11 = new EffectParameter_DX11(); var parDx11 = new EffectParameter_DX11
parDx11.NativeParameter = NativeEffect.GetVariableByIndex(i); {
NativeParameter = NativeEffect.GetVariableByIndex(i)
EffectParameter par = new EffectParameter(); };
par.NativeParameter = parDx11; yield return new EffectParameter(parDx11);
yield return par;
} }
} }
} }

View File

@ -48,6 +48,21 @@ namespace ANX.RenderSystem.Windows.DX11
{ {
get { return DxFormatConverter.Translate(NativeParameter.TypeInfo.Description.Type); } get { return DxFormatConverter.Translate(NativeParameter.TypeInfo.Description.Type); }
} }
public EffectAnnotationCollection Annotations
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection Elements
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection StructureMembers
{
get { throw new NotImplementedException(); }
}
#endregion #endregion
#region SetValue (bool) #region SetValue (bool)

View File

@ -16,7 +16,7 @@ namespace ANX.RenderSystem.Windows.DX11
{ {
public class EffectTechnique_DX11 : INativeEffectTechnique public class EffectTechnique_DX11 : INativeEffectTechnique
{ {
private Effect parentEffect; private readonly Effect parentEffect;
public EffectTechnique_DX11(Effect parentEffect, Dx11.EffectTechnique nativeTechnique) public EffectTechnique_DX11(Effect parentEffect, Dx11.EffectTechnique nativeTechnique)
{ {
@ -51,5 +51,10 @@ namespace ANX.RenderSystem.Windows.DX11
} }
} }
} }
}
public EffectAnnotationCollection Annotations
{
get { throw new NotImplementedException(); }
}
}
} }

View File

@ -50,6 +50,21 @@ namespace ANX.RenderSystem.Windows.Metro
} }
public EffectParameterType ParameterType public EffectParameterType ParameterType
{
get { throw new NotImplementedException(); }
}
public EffectAnnotationCollection Annotations
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection Elements
{
get { throw new NotImplementedException(); }
}
public EffectParameterCollection StructureMembers
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }

View File

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using ANX.Framework.Graphics; using ANX.Framework.Graphics;
using ANX.Framework.NonXNA; using ANX.Framework.NonXNA;
@ -41,12 +42,14 @@ namespace ANX.RenderSystem.Windows.Metro
} }
} }
public EffectPass_Metro this[int index] public EffectPass_Metro this[int index]
{
get { return passes[index]; }
}
public EffectAnnotationCollection Annotations
{ {
get get { throw new NotImplementedException(); }
{
return passes[index];
}
} }
#endregion #endregion

View File

@ -101,11 +101,7 @@ namespace ANX.RenderSystem.Windows.Metro
parameters = new List<EffectParameter>(); parameters = new List<EffectParameter>();
foreach (ExtendedShaderParameter parameter in shader.Parameters) foreach (ExtendedShaderParameter parameter in shader.Parameters)
{ parameters.Add(new EffectParameter(new EffectParameter_Metro(this, parameter)));
EffectParameter newParam = new EffectParameter();
newParam.NativeParameter = new EffectParameter_Metro(this, parameter);
parameters.Add(newParam);
}
paramBuffer = new ParameterBuffer(this, NativeDxDevice.Current); paramBuffer = new ParameterBuffer(this, NativeDxDevice.Current);
} }