mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 04:45:38 +00:00
Fixed EfxExtension.DeleteEffects bindings.
This commit is contained in:
parent
624497098e
commit
3aadd5d36a
|
@ -200,11 +200,11 @@ namespace OpenTK.Audio
|
|||
/// <param name="n">Number of Effects to be deleted.</param>
|
||||
/// <param name="effects">Pointer to n Effect object identifiers.</param>
|
||||
[CLSCompliant(false)]
|
||||
public void DeleteEffects(int n, ref uint[] effects)
|
||||
public void DeleteEffects(int n, ref uint effects)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (uint* ptr = effects)
|
||||
fixed (uint* ptr = &effects)
|
||||
{
|
||||
Imported_alDeleteEffects(n, ptr);
|
||||
}
|
||||
|
@ -214,61 +214,44 @@ namespace OpenTK.Audio
|
|||
/// <summary>The DeleteEffects function is used to delete and free resources for Effect objects previously created with GenEffects.</summary>
|
||||
/// <param name="n">Number of Effects to be deleted.</param>
|
||||
/// <param name="effects">Pointer to n Effect object identifiers.</param>
|
||||
|
||||
public void DeleteEffects(int n, ref int[] effects)
|
||||
public void DeleteEffects(int n, ref int effects)
|
||||
{
|
||||
uint[] temp = new uint[n];
|
||||
for (int i = 0; i < n; i++)
|
||||
unsafe
|
||||
{
|
||||
temp[i] = (uint)effects[i];
|
||||
fixed (int* ptr = &effects)
|
||||
{
|
||||
Imported_alDeleteEffects(n, (uint*)ptr);
|
||||
}
|
||||
}
|
||||
DeleteEffects(n, ref temp);
|
||||
}
|
||||
|
||||
/// <summary>The DeleteEffects function is used to delete and free resources for Effect objects previously created with GenEffects.</summary>
|
||||
/// <param name="effects">Pointer to n Effect object identifiers.</param>
|
||||
|
||||
public void DeleteEffects(int[] effects)
|
||||
{
|
||||
uint[] temp = new uint[effects.Length];
|
||||
for (int i = 0; i < temp.Length; i++)
|
||||
if (effects == null) throw new ArgumentNullException("effects");
|
||||
DeleteEffects(effects.Length, ref effects[0]);
|
||||
}
|
||||
|
||||
/// <summary>The DeleteEffects function is used to delete and free resources for Effect objects previously created with GenEffects.</summary>
|
||||
/// <param name="effects">Pointer to n Effect object identifiers.</param>
|
||||
[CLSCompliant(false)]
|
||||
public void DeleteEffects(uint[] effects)
|
||||
{
|
||||
temp[i] = (uint)effects[i];
|
||||
}
|
||||
DeleteEffects(temp.Length, ref temp);
|
||||
if (effects == null) throw new ArgumentNullException("effects");
|
||||
DeleteEffects(effects.Length, ref effects[0]);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>This function deletes one Effect only.</summary>
|
||||
/// <param name="effect">Pointer to an effect name/handle identifying the Effect Object to be deleted.</param>
|
||||
[CLSCompliant(false)]
|
||||
public void DeleteEffects(ref uint effect)
|
||||
public void DeleteEffect(int effect)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (uint* ptr = &effect)
|
||||
{
|
||||
Imported_alDeleteEffects(1, ptr);
|
||||
Imported_alDeleteEffects(1, (uint*)&effect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>This function deletes one Effect only.</summary>
|
||||
/// <param name="effect">Pointer to an effect name/handle identifying the Effect Object to be deleted.</param>
|
||||
|
||||
public void DeleteEffects(ref int effect)
|
||||
{
|
||||
uint temp = (uint)effect;
|
||||
DeleteEffects(ref temp);
|
||||
}
|
||||
|
||||
/// <summary>This function deletes one Effect only.</summary>
|
||||
/// <param name="effect">Pointer to an effect name/handle identifying the Effect Object to be deleted.</param>
|
||||
|
||||
public void DeleteEffects(int effect)
|
||||
{
|
||||
uint temp = (uint)effect;
|
||||
DeleteEffects(ref temp);
|
||||
}
|
||||
|
||||
#endregion alDeleteEffects
|
||||
|
||||
|
|
Loading…
Reference in a new issue