[GL][ES] Do not break public API
Even if that API is not meant to be used by applications.
This commit is contained in:
parent
bd339523ab
commit
1666eb670c
6 changed files with 27 additions and 21 deletions
|
@ -26,9 +26,9 @@ namespace OpenTK.Graphics.ES11
|
|||
/// </summary>
|
||||
public GL()
|
||||
{
|
||||
EntryPointsInstance = EntryPoints;
|
||||
EntryPointNamesInstance = EntryPointNames;
|
||||
EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
_EntryPointsInstance = EntryPoints;
|
||||
_EntryPointNamesInstance = EntryPointNames;
|
||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -54,9 +54,9 @@ namespace OpenTK.Graphics.ES20
|
|||
/// </summary>
|
||||
public GL()
|
||||
{
|
||||
EntryPointsInstance = EntryPoints;
|
||||
EntryPointNamesInstance = EntryPointNames;
|
||||
EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
_EntryPointsInstance = EntryPoints;
|
||||
_EntryPointNamesInstance = EntryPointNames;
|
||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -54,9 +54,9 @@ namespace OpenTK.Graphics.ES30
|
|||
/// </summary>
|
||||
public GL()
|
||||
{
|
||||
EntryPointsInstance = EntryPoints;
|
||||
EntryPointNamesInstance = EntryPointNames;
|
||||
EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
_EntryPointsInstance = EntryPoints;
|
||||
_EntryPointNamesInstance = EntryPointNames;
|
||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -39,15 +39,21 @@ namespace OpenTK.Graphics
|
|||
/// Contains the list of API entry points (function pointers).
|
||||
/// This field must be set by an inheriting class.
|
||||
/// </summary>
|
||||
[Obsolete("Not used - this field remains for 1.1 API compatibility")]
|
||||
protected IntPtr[] EntryPointsInstance;
|
||||
|
||||
/// <summary>
|
||||
/// with the 1.1 API.
|
||||
/// Contains the list of API entry point names.
|
||||
/// This field must be set by an inheriting class.
|
||||
/// </summary>
|
||||
protected byte[] EntryPointNamesInstance;
|
||||
[Obsolete("Not used - this field remains for 1.1 API compatibility")]
|
||||
protected string[] EntryPointNamesInstance;
|
||||
|
||||
protected int[] EntryPointNameOffsetsInstance;
|
||||
|
||||
internal protected IntPtr[] _EntryPointsInstance;
|
||||
internal protected byte[] _EntryPointNamesInstance;
|
||||
internal protected int[] _EntryPointNameOffsetsInstance;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves an unmanaged function pointer to the specified function.
|
||||
|
@ -85,12 +91,12 @@ namespace OpenTK.Graphics
|
|||
IGraphicsContextInternal context_internal = context as IGraphicsContextInternal;
|
||||
unsafe
|
||||
{
|
||||
fixed (byte* name = EntryPointNamesInstance)
|
||||
fixed (byte* name = _EntryPointNamesInstance)
|
||||
{
|
||||
for (int i = 0; i < EntryPointsInstance.Length; i++)
|
||||
for (int i = 0; i < _EntryPointsInstance.Length; i++)
|
||||
{
|
||||
EntryPointsInstance[i] = context_internal.GetAddress(
|
||||
new IntPtr(name + EntryPointNameOffsetsInstance[i]));
|
||||
_EntryPointsInstance[i] = context_internal.GetAddress(
|
||||
new IntPtr(name + _EntryPointNameOffsetsInstance[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,9 +91,9 @@ namespace OpenTK.Graphics.OpenGL
|
|||
/// </summary>
|
||||
public GL()
|
||||
{
|
||||
EntryPointsInstance = EntryPoints;
|
||||
EntryPointNamesInstance = EntryPointNames;
|
||||
EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
_EntryPointsInstance = EntryPoints;
|
||||
_EntryPointNamesInstance = EntryPointNames;
|
||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -54,9 +54,9 @@ namespace OpenTK.Graphics.OpenGL4
|
|||
/// </summary>
|
||||
public GL()
|
||||
{
|
||||
EntryPointsInstance = EntryPoints;
|
||||
EntryPointNamesInstance = EntryPointNames;
|
||||
EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
_EntryPointsInstance = EntryPoints;
|
||||
_EntryPointNamesInstance = EntryPointNames;
|
||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue