[Bind] Added overloads for backwards compatibility

This commit is contained in:
thefiddler 2014-03-13 18:42:37 +01:00
parent a7516dc9b9
commit cf728a631e
4 changed files with 189 additions and 72 deletions

View file

@ -5282,7 +5282,7 @@
<token name="TEXTURE9" value="0x84C9" />
</enum>
</add>
<!-- gles2 replacements for 2.0 and 3.0 -->
<replace name="gles2" version="2.0|3.0">
<!-- Buffer Objects [2.9] -->
@ -5770,7 +5770,42 @@
</function>
</replace>
<!-- gles2 overloads for 2.0 backwards compatibility-->
<!-- gles2 overloads for backwards compatibility (2.0 and 3.0) -->
<overload name="gles2">
<function name="GetObjectLabel" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetObjectPtrLabel" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetTranslatedShaderSource" extension="ANGLE" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetProgramPipelineInfoLog" extension="EXT" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetProgramBinary" extension="OES" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
<param name="binaryFormat"><count>0</count></param>
</function>
<function name="ExtGetBuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numBuffers"><count>0</count></param>
</function>
<function name="ExtGetFramebuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numFramebuffers"><count>0</count></param>
</function>
<function name="ExtGetPrograms" extension="QCOM" obsolete="Use out overload instead">
<param name="numPrograms"><count>0</count></param>
</function>
<function name="ExtGetRenderbuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numRenderbuffers"><count>0</count></param>
</function>
<function name="ExtGetShaders" extension="QCOM" obsolete="Use out overload instead">
<param name="numShaders"><count>0</count></param>
</function>
</overload>
<!-- gles2 overloads for backwards compatibility (2.0 only) -->
<overload name="gles2" version="2.0">
<!-- PrimtiveType <=> BeginMode overloads for backwards compatibility -->
<function name="DrawArrays" obsolete="Use PrimitiveType overload instead">
@ -5859,16 +5894,6 @@
<type>FramebufferSlot</type>
</param>
</function>
<function name="GetObjectLabel" obsolete="Use out overload instead">
<param name="length">
<count>0</count>
</param>
</function>
<function name="GetObjectPtrLabel" obsolete="Use out overload instead">
<param name="length">
<count>0</count>
</param>
</function>
<function name="GetProgram" obsolete="Use GetProgramParameterName overload instead">
<param name="pname">
<type>ProgramParameter</type>
@ -5879,31 +5904,6 @@
<type>GetTextureParameter</type>
</param>
</function>
<function name="GetTranslatedShaderSource" extension="ANGLE" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetProgramPipelineInfoLog" extension="EXT" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetProgramBinary" extension="OES" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
<param name="binaryFormat"><count>0</count></param>
</function>
<function name="ExtGetBuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numBuffers"><count>0</count></param>
</function>
<function name="ExtGetFramebuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numFramebuffers"><count>0</count></param>
</function>
<function name="ExtGetPrograms" extension="QCOM" obsolete="Use out overload instead">
<param name="numPrograms"><count>0</count></param>
</function>
<function name="ExtGetRenderbuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numRenderbuffers"><count>0</count></param>
</function>
<function name="ExtGetShaders" extension="QCOM" obsolete="Use out overload instead">
<param name="numShaders"><count>0</count></param>
</function>
</overload>
<!-- gles2 2.0 enums -->
@ -6693,7 +6693,7 @@
</enum>
</add>
<!-- gles2 3.0 enums -->
<add name="gles2" version="3.0">
<enum name="ActiveAttribType">
@ -7662,38 +7662,4 @@
</add>
<overload name="gles3">
<function name="GetObjectLabel" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetObjectPtrLabel" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetTranslatedShaderSource" extension="ANGLE" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetProgramPipelineInfoLog" extension="EXT" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
</function>
<function name="GetProgramBinary" extension="OES" obsolete="Use out overload instead">
<param name="length"><count>0</count></param>
<param name="binaryFormat"><count>0</count></param>
</function>
<function name="ExtGetBuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numBuffers"><count>0</count></param>
</function>
<function name="ExtGetFramebuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numFramebuffers"><count>0</count></param>
</function>
<function name="ExtGetPrograms" extension="QCOM" obsolete="Use out overload instead">
<param name="numPrograms"><count>0</count></param>
</function>
<function name="ExtGetRenderbuffers" extension="QCOM" obsolete="Use out overload instead">
<param name="numRenderbuffers"><count>0</count></param>
</function>
<function name="ExtGetShaders" extension="QCOM" obsolete="Use out overload instead">
<param name="numShaders"><count>0</count></param>
</function>
</overload>
</signatures>

View file

@ -0,0 +1,63 @@
#region License
//
// ES11Obsolete.cs
//
// Author:
// Stefanos A. <stapostol@gmail.com>
//
// Copyright (c) 2006-2014 Stefanos Apostolopoulos
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#endregion
using System;
namespace OpenTK.Graphics.ES11
{
partial class GL
{
/// <summary>[requires: v1.0]
/// Return the coefficients of the specified clipping plane
/// </summary>
/// <param name="plane">
/// <para>
/// Specifies a clipping plane. The number of clipping planes depends on the implementation, but at least six clipping planes are supported. They are identified by symbolic names of the form GL_CLIP_PLANE where i ranges from 0 to the value of GL_MAX_CLIP_PLANES - 1.
/// </para>
/// </param>
[AutoGenerated(Category = "VERSION_ES_CM_1_0", Version = "1.0", EntryPoint = "glGetClipPlanef")]
[CLSCompliant(false)]
[Obsolete("Use GetClipPlane(..., float[]) instead. This method will return incorrect results.")]
public static Single GetClipPlane(OpenTK.Graphics.ES11.All plane) { throw new NotImplementedException(); }
/// <summary>[requires: v1.0]
/// Return the coefficients of the specified clipping plane
/// </summary>
/// <param name="plane">
/// <para>
/// Specifies a clipping plane. The number of clipping planes depends on the implementation, but at least six clipping planes are supported. They are identified by symbolic names of the form GL_CLIP_PLANE where i ranges from 0 to the value of GL_MAX_CLIP_PLANES - 1.
/// </para>
/// </param>
[AutoGenerated(Category = "VERSION_ES_CM_1_0", Version = "1.0", EntryPoint = "glGetClipPlanex")]
[CLSCompliant(false)]
[Obsolete("Use GetClipPlane(..., int[]) instead. This method will return incorrect results.")]
public static int GetClipPlanex(OpenTK.Graphics.ES11.All plane) { throw new NotImplementedException(); }
}
}

View file

@ -1243,6 +1243,93 @@ namespace OpenTK.Graphics.OpenGL
public static partial class Ext
{
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
public static void ClearNamedBufferSubData(Int32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, IntPtr data)
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(Int32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] T6[] data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(Int32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] T6[,] data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(Int32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] T6[,,] data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(Int32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] ref T6 data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, ref data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData(UInt32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, IntPtr data)
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(UInt32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] T6[] data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(UInt32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] T6[,] data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(UInt32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] T6[,,] data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
}
/// <summary>[requires: EXT_direct_state_access]</summary>
[Obsolete("Use ClearNamedBufferSubData(..., format, type, data) instead.")]
[CLSCompliant(false)]
public static void ClearNamedBufferSubData<T6>(UInt32 buffer, OpenTK.Graphics.OpenGL.ExtDirectStateAccess internalformat, OpenTK.Graphics.OpenGL.PixelFormat format, OpenTK.Graphics.OpenGL.PixelType type, IntPtr offset, IntPtr size, [InAttribute, OutAttribute] ref T6 data)
where T6 : struct
{
ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, ref data);
}
[Obsolete("Use ProgramParameter(..., AssemblyProgramParameterArb, ...) instead.")]
public static void ProgramParameter(Int32 program, ExtGeometryShader4 pname, Int32 value)
{

View file

@ -782,6 +782,7 @@
<Compile Include="Graphics\ES20\ES20Enums.cs" />
<Compile Include="Graphics\ES11\ES11.cs" />
<Compile Include="Graphics\ES11\ES11Enums.cs" />
<Compile Include="Graphics\ES11\ES11Obsolete.cs" />
<Compile Include="SlotAttribute.cs" />
<Compile Include="RewrittenAttribute.cs" />
<Compile Include="Graphics\OpenGL\GLObsolete.cs" />