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

◆ SetVertexDeclaration() [2/2]

unsafe void Microsoft.Xna.Framework.Graphics.DeclarationManager.SetVertexDeclaration ( VertexDeclaration declaration)
inlinepackage

Definition at line 183 of file DeclarationManager.cs.

184 {
185 int num = (int)stackalloc byte[_003CModule_003E.__CxxQueryExceptionSize()];
186 bool lockTaken = false;
187 try
188 {
189 Monitor.Enter(this, ref lockTaken);
191 {
192 if (declaration._binding == null || declaration.GraphicsDevice != device)
193 {
194 declaration.Bind(device);
195 }
196 currentDeclarations[0] = declaration._binding;
197 for (int i = 1; i < currentDeclarationCount; i++)
198 {
199 currentDeclarations[i] = null;
200 }
203 }
204 }
205 catch when (((Func<bool>)delegate
206 {
207 // Could not convert BlockContainer to single expression
209 return (byte)_003CModule_003E.__CxxExceptionFilter((void*)Marshal.GetExceptionPointers(), null, 0, null) != 0;
210 }).Invoke())
211 {
212 uint num2 = 0u;
213 _003CModule_003E.__CxxRegisterExceptionObject((void*)Marshal.GetExceptionPointers(), (void*)num);
214 try
215 {
216 try
217 {
218 ClearCurrent();
219 _003CModule_003E._CxxThrowException(null, null);
220 return;
221 }
222 catch when (((Func<bool>)delegate
223 {
224 // Could not convert BlockContainer to single expression
225 num2 = (uint)_003CModule_003E.__CxxDetectRethrow((void*)Marshal.GetExceptionPointers());
226 return (byte)num2 != 0;
227 }).Invoke())
228 {
229 }
230 if (num2 != 0)
231 {
232 throw;
233 }
234 }
235 finally
236 {
237 _003CModule_003E.__CxxUnregisterExceptionObject((void*)num, (int)num2);
238 }
239 }
240 finally
241 {
242 if (lockTaken)
243 {
244 Monitor.Exit(this);
245 }
246 }
247 }
static void Exit(object obj)
static void Enter(object obj)

References Microsoft.Xna.Framework.Graphics.DeclarationManager.ClearCurrent(), Microsoft.Xna.Framework.Graphics.DeclarationManager.currentDeclarationCount, Microsoft.Xna.Framework.Graphics.DeclarationManager.currentDeclarations, Microsoft.Xna.Framework.Graphics.DeclarationManager.device, System.Threading.Monitor.Enter(), System.Threading.Monitor.Exit(), System.Runtime.InteropServices.Marshal.GetExceptionCode(), System.Runtime.InteropServices.Marshal.GetExceptionPointers(), and Microsoft.Xna.Framework.Graphics.DeclarationManager.SetNativeDeclaration().