[Win] Wgl no longer inherits GraphicsBindingsBase

This is a necessary step for the next commit.
This commit is contained in:
thefiddler 2014-04-25 17:23:06 +02:00
parent e433aad4b4
commit c1f284f101

View file

@ -15,7 +15,7 @@ using OpenTK.Graphics;
namespace OpenTK.Platform.Windows namespace OpenTK.Platform.Windows
{ {
internal partial class Wgl : GraphicsBindingsBase internal partial class Wgl
{ {
static IntPtr[] EntryPoints; static IntPtr[] EntryPoints;
static string[] EntryPointNames; static string[] EntryPointNames;
@ -29,8 +29,6 @@ namespace OpenTK.Platform.Windows
public Wgl() public Wgl()
{ {
EntryPointsInstance = EntryPoints;
EntryPointNamesInstance = EntryPointNames;
} }
#region Public Members #region Public Members
@ -102,12 +100,12 @@ namespace OpenTK.Platform.Windows
#region Protected Members #region Protected Members
protected override object SyncRoot protected object SyncRoot
{ {
get { return sync; } get { return sync; }
} }
protected override IntPtr GetAddress(string function_string) IntPtr GetAddress(string function_string)
{ {
IntPtr address = Wgl.GetProcAddress(function_string); IntPtr address = Wgl.GetProcAddress(function_string);
if (!IsValid(address)) if (!IsValid(address))
@ -133,15 +131,15 @@ namespace OpenTK.Platform.Windows
#region Internal Members #region Internal Members
internal override void LoadEntryPoints() internal void LoadEntryPoints()
{ {
lock (SyncRoot) lock (SyncRoot)
{ {
if (Wgl.GetCurrentContext() != IntPtr.Zero) if (Wgl.GetCurrentContext() != IntPtr.Zero)
{ {
for (int i = 0; i < EntryPointsInstance.Length; i++) for (int i = 0; i < EntryPointNames.Length; i++)
{ {
EntryPointsInstance[i] = GetAddress(EntryPointNamesInstance[i]); EntryPoints[i] = GetAddress(EntryPointNames[i]);
} }
extensions.Clear(); extensions.Clear();
} }