mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 16:15:34 +00:00
Small update to LoadAll().
This commit is contained in:
parent
980e7138d2
commit
597cc5c07f
|
@ -243,13 +243,17 @@ namespace OpenTK.OpenGL
|
|||
/// </remarks>
|
||||
public static void LoadAll()
|
||||
{
|
||||
// Using reflection is more than 3 times faster than directly loading delegates on the first
|
||||
// run, probably due to code generation overhead. Subsequent runs are faster with direct loading
|
||||
// than with reflection, but the first time is more significant.
|
||||
|
||||
int supported = 0;
|
||||
if (delegates == null)
|
||||
{
|
||||
delegates = delegatesClass.GetFields(BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
Debug.Print("GL.LoadAll(): Loading all {0} OpenGL functions.", delegates.Length);
|
||||
Trace.Write("GL.LoadAll(): ");
|
||||
|
||||
System.Diagnostics.Stopwatch time = new System.Diagnostics.Stopwatch();
|
||||
time.Reset();
|
||||
|
|
Loading…
Reference in a new issue