Hi,
when do I have to return with:
return Silk.Cil.Peek();
and when with:
Silk.Cil.Ret();
what are the difference?
You used it in OpenTk for example as:
public static Boolean SwapInterval(int interval)
{
Silk.Cil.Ldarg(0);
Silk.Cil.Load(EntryPoints);
Silk.Cil.Ldc_I4(16);
Silk.Cil.Ldelem_I();
Silk.Cil.Calli(CallingConvention.Winapi, typeof(Boolean), typeof(int));
return Silk.Cil.Peek();
}
public static Boolean ReleaseTexImage(IntPtr hPbuffer, int iBuffer)
{
Silk.Cil.Ldarg(0);
Silk.Cil.Ldarg(1);
Silk.Cil.Load(EntryPoints);
Silk.Cil.Ldc_I4(13);
Silk.Cil.Ldelem_I();
Silk.Cil.Calli(CallingConvention.Winapi, typeof(Boolean), typeof(IntPtr), typeof(int));
Silk.Cil.Ret();
throw new NotImplementedException();
}
both return a bool? Where are the differences?
Do I always have to get the IntPtr of a string with Silk.Cil.Peek() and convert the IntPtr to a string?
In the wiki I added a list with data types used in arguments and the equivalent usage in the function call. For example
public static int[] Func(IntPtr* p)
{
...
Silk.Cil.Calli(CallingConvention.Winapi, typeof(int_), typeof(IntPtr_));
...
}
Is the list correct?
Thank you.