This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fe9cd9
commit 638c03e
Showing
7 changed files
with
130 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 44 additions & 44 deletions
88
MonoGame/MonoGame.Framework/Graphics/Effect/EffectAnnotation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
using System; | ||
|
||
namespace Microsoft.Xna.Framework.Graphics | ||
{ | ||
// TODO: This class needs to be finished! | ||
|
||
public class EffectAnnotation | ||
{ | ||
internal EffectAnnotation ( | ||
EffectParameterClass class_, | ||
EffectParameterType type, | ||
string name, | ||
int rowCount, | ||
int columnCount, | ||
string semantic, | ||
object data) | ||
{ | ||
ParameterClass = class_; | ||
ParameterType = type; | ||
Name = name; | ||
RowCount = rowCount; | ||
ColumnCount = columnCount; | ||
Semantic = semantic; | ||
} | ||
|
||
internal EffectAnnotation (EffectParameter parameter) | ||
{ | ||
ParameterClass = parameter.ParameterClass; | ||
ParameterType = parameter.ParameterType; | ||
Name = parameter.Name; | ||
RowCount = parameter.RowCount; | ||
ColumnCount = parameter.ColumnCount; | ||
Semantic = parameter.Semantic; | ||
} | ||
|
||
public EffectParameterClass ParameterClass {get; private set;} | ||
public EffectParameterType ParameterType {get; private set;} | ||
public string Name {get; private set;} | ||
public int RowCount {get; private set;} | ||
public int ColumnCount {get; private set;} | ||
public string Semantic {get; private set;} | ||
} | ||
} | ||
|
||
// using System; | ||
// | ||
// namespace Microsoft.Xna.Framework.Graphics | ||
// { | ||
// // TODO: This class needs to be finished! | ||
// | ||
// public class EffectAnnotation | ||
// { | ||
// // internal EffectAnnotation ( | ||
// // EffectParameterClass class_, | ||
// // EffectParameterType type, | ||
// // string name, | ||
// // int rowCount, | ||
// // int columnCount, | ||
// // string semantic, | ||
// // object data) | ||
// // { | ||
// // ParameterClass = class_; | ||
// // ParameterType = type; | ||
// // Name = name; | ||
// // RowCount = rowCount; | ||
// // ColumnCount = columnCount; | ||
// // Semantic = semantic; | ||
// // } | ||
// // | ||
// // internal EffectAnnotation (EffectParameter parameter) | ||
// // { | ||
// // ParameterClass = parameter.ParameterClass; | ||
// // ParameterType = parameter.ParameterType; | ||
// // Name = parameter.Name; | ||
// // RowCount = parameter.RowCount; | ||
// // ColumnCount = parameter.ColumnCount; | ||
// // Semantic = parameter.Semantic; | ||
// // } | ||
// | ||
// // public EffectParameterClass ParameterClass {get; private set;} | ||
// // public EffectParameterType ParameterType {get; private set;} | ||
// public string Name {get; private set;} | ||
// // public int RowCount {get; private set;} | ||
// // public int ColumnCount {get; private set;} | ||
// // public string Semantic {get; private set;} | ||
// } | ||
// } | ||
// |
100 changes: 50 additions & 50 deletions
100
MonoGame/MonoGame.Framework/Graphics/Effect/EffectAnnotationCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.Xna.Framework.Graphics | ||
{ | ||
public class EffectAnnotationCollection : IEnumerable<EffectAnnotation> | ||
{ | ||
internal static readonly EffectAnnotationCollection Empty = new EffectAnnotationCollection(new EffectAnnotation[0]); | ||
|
||
private readonly EffectAnnotation[] _annotations; | ||
|
||
internal EffectAnnotationCollection(EffectAnnotation[] annotations) | ||
{ | ||
_annotations = annotations; | ||
} | ||
|
||
public int Count | ||
{ | ||
get { return _annotations.Length; } | ||
} | ||
public EffectAnnotation this[int index] | ||
{ | ||
get { return _annotations[index]; } | ||
} | ||
public EffectAnnotation this[string name] | ||
{ | ||
get | ||
{ | ||
foreach (var annotation in _annotations) | ||
{ | ||
if (annotation.Name == name) | ||
return annotation; | ||
} | ||
return null; | ||
} | ||
} | ||
|
||
public IEnumerator<EffectAnnotation> GetEnumerator() | ||
{ | ||
return ((IEnumerable<EffectAnnotation>)_annotations).GetEnumerator(); | ||
} | ||
|
||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() | ||
{ | ||
return _annotations.GetEnumerator(); | ||
} | ||
} | ||
} | ||
|
||
// using System.Collections.Generic; | ||
// | ||
// namespace Microsoft.Xna.Framework.Graphics | ||
// { | ||
// public class EffectAnnotationCollection : IEnumerable<EffectAnnotation> | ||
// { | ||
// internal static readonly EffectAnnotationCollection Empty = new EffectAnnotationCollection(new EffectAnnotation[0]); | ||
// | ||
// private readonly EffectAnnotation[] _annotations; | ||
// | ||
// internal EffectAnnotationCollection(EffectAnnotation[] annotations) | ||
// { | ||
// _annotations = annotations; | ||
// } | ||
// | ||
// // public int Count | ||
// // { | ||
// // get { return _annotations.Length; } | ||
// // } | ||
// // | ||
// // public EffectAnnotation this[int index] | ||
// // { | ||
// // get { return _annotations[index]; } | ||
// // } | ||
// // | ||
// // public EffectAnnotation this[string name] | ||
// // { | ||
// // get | ||
// // { | ||
// // foreach (var annotation in _annotations) | ||
// // { | ||
// // if (annotation.Name == name) | ||
// // return annotation; | ||
// // } | ||
// // return null; | ||
// // } | ||
// // } | ||
// | ||
// public IEnumerator<EffectAnnotation> GetEnumerator() | ||
// { | ||
// return ((IEnumerable<EffectAnnotation>)_annotations).GetEnumerator(); | ||
// } | ||
// | ||
// System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() | ||
// { | ||
// return _annotations.GetEnumerator(); | ||
// } | ||
// } | ||
// } | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.