Exemplo n.º 1
0
 public static void Init(IntPtr hmodule)
 {
     ourSetFilterState = Marshal.GetDelegateForFunctionPointer <TriBool>(GetProcAddress(hmodule, nameof(SetFilteringState)));
     ourSetTess        = Marshal.GetDelegateForFunctionPointer <OneFloat>(GetProcAddress(hmodule, nameof(SetMaxTesselationPower)));
     ourSetLoops       = Marshal.GetDelegateForFunctionPointer <OneInt>(GetProcAddress(hmodule, nameof(SetLoopLimit)));
     ourSetGeom        = Marshal.GetDelegateForFunctionPointer <OneInt>(GetProcAddress(hmodule, nameof(SetGeometryLimit)));
 }
Exemplo n.º 2
0
        // Class with primitive data
        // You can provide arguments to this function. For example
        // You can provide a bool called allowBadData to adjust if this function will return bad data or not.
        // Ideally you should create a generic function that takes in any Collection or a Class and returns
        // A new array populated with bad values like null and default
        public static OneInt[] OneIntValues()
        {
            OneInt[] oneInts = new OneInt[5];
            for (int i = 0; i < 5; i++)
            {
                oneInts[i] = new OneInt(IntValues[i]);
            }

            return(oneInts);
        }
Exemplo n.º 3
0
 public ClassWithReferenceToOneIntAndOneInt(OneInt oneInt, int x)
 {
     this.oneInt = oneInt;
     this.x      = x;
 }
Exemplo n.º 4
0
 public void TestOneInt(OneInt oneInt, Predicate <OneInt> validator)
 {
     Assert.IsTrue(validator(oneInt));
 }
Exemplo n.º 5
0
 public static int ChangeInt(OneInt MyC, int x)
 {
     return(MyC(x));
 }