Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ VertexDeclaration() [1/2]

Microsoft.Xna.Framework.Graphics.VertexDeclaration.VertexDeclaration ( int vertexStride,
params VertexElement[] elements )
inline

Definition at line 18 of file VertexDeclaration.cs.

19 {
20 try
21 {
22 if (elements != null && elements.Length != 0)
23 {
24 VertexElement[] elements2 = (_elements = (VertexElement[])elements.Clone());
25 _vertexStride = vertexStride;
26 VertexElementValidator.Validate(vertexStride, elements2);
27 goto IL_005a;
28 }
29 }
30 catch
31 {
32 //try-fault
33 base.Dispose(true);
34 throw;
35 }
36 try
37 {
38 throw new ArgumentNullException("elements", FrameworkResources.NullNotAllowed);
39 }
40 catch
41 {
42 //try-fault
43 base.Dispose(true);
44 throw;
45 }
46 IL_005a:
47 try
48 {
49 return;
50 }
51 catch
52 {
53 //try-fault
54 base.Dispose(true);
55 throw;
56 }
57 }

References Microsoft.Xna.Framework.Graphics.VertexDeclaration._elements, Microsoft.Xna.Framework.Graphics.VertexDeclaration._vertexStride, Microsoft.Xna.Framework.FrameworkResources.NullNotAllowed, and Microsoft.Xna.Framework.Graphics.VertexElementValidator.Validate().