Commits

Tobias Bohnen committed 06aadf8

  • Participants
  • Parent commits 999083b

Comments (0)

Files changed (1)

CgNet/Parameter.cs

             return NativeMethods.cgGetArrayDimension(this.Handle);
         }
 
-        public Parameter GetArrayParameter(IntPtr aparam, int index)
+        public Parameter GetArrayParameter(int index)
         {
             var ptr = NativeMethods.cgGetArrayParameter(this.Handle, index);
             return ptr == IntPtr.Zero ? null : new Parameter(ptr)
 
         public void SetMatrix(double[] matrix, Order order)
         {
-            IntPtr param = this.Handle;
             switch (order)
             {
                 case Order.ColumnMajor:
-                    NativeMethods.cgSetMatrixParameterdc(param, matrix);
+                    NativeMethods.cgSetMatrixParameterdc(this.Handle, matrix);
                     break;
                 case Order.RowMajor:
-                    NativeMethods.cgSetMatrixParameterdr(param, matrix);
+                    NativeMethods.cgSetMatrixParameterdr(this.Handle, matrix);
                     break;
                 default:
                     throw new InvalidEnumArgumentException("order");
 
         public void SetMatrix(int[] matrix, Order order)
         {
-            IntPtr param = this.Handle;
             switch (order)
             {
                 case Order.ColumnMajor:
-                    NativeMethods.cgSetMatrixParameteric(param, matrix);
+                    NativeMethods.cgSetMatrixParameteric(this.Handle, matrix);
                     break;
                 case Order.RowMajor:
-                    NativeMethods.cgSetMatrixParameterir(param, matrix);
+                    NativeMethods.cgSetMatrixParameterir(this.Handle, matrix);
                     break;
                 default:
                     throw new InvalidEnumArgumentException("order");
 
         public void SetValue(double[] vals, Order order)
         {
-            IntPtr param = this.Handle;
             switch (order)
             {
                 case Order.ColumnMajor:
-                    NativeMethods.cgSetParameterValuedc(param, vals.Length, vals);
+                    NativeMethods.cgSetParameterValuedc(this.Handle, vals.Length, vals);
                     break;
                 case Order.RowMajor:
-                    NativeMethods.cgSetParameterValuedr(param, vals.Length, vals);
+                    NativeMethods.cgSetParameterValuedr(this.Handle, vals.Length, vals);
                     break;
                 default:
                     throw new InvalidEnumArgumentException("order");
 
         public void SetValue(float[] vals, Order order)
         {
-            IntPtr param = this.Handle;
             switch (order)
             {
                 case Order.ColumnMajor:
-                    NativeMethods.cgSetParameterValuefc(param, vals.Length, vals);
+                    NativeMethods.cgSetParameterValuefc(this.Handle, vals.Length, vals);
                     break;
                 case Order.RowMajor:
-                    NativeMethods.cgSetParameterValuefr(param, vals.Length, vals);
+                    NativeMethods.cgSetParameterValuefr(this.Handle, vals.Length, vals);
                     break;
                 default:
                     throw new InvalidEnumArgumentException("order");
 
         public void SetValue(int[] vals, Order order)
         {
-            IntPtr param = this.Handle;
             switch (order)
             {
                 case Order.ColumnMajor:
-                    NativeMethods.cgSetParameterValueic(param, vals.Length, vals);
+                    NativeMethods.cgSetParameterValueic(this.Handle, vals.Length, vals);
                     break;
                 case Order.RowMajor:
-                    NativeMethods.cgSetParameterValueir(param, vals.Length, vals);
+                    NativeMethods.cgSetParameterValueir(this.Handle, vals.Length, vals);
                     break;
                 default:
                     throw new InvalidEnumArgumentException("order");