Synced 0.3.11 to trunk.
This commit is contained in:
parent
296f83257b
commit
fe0b2c66db
1 changed files with 10 additions and 4 deletions
|
@ -15,10 +15,11 @@ using System.Windows.Forms;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using OpenTK.OpenGL;
|
using OpenTK.OpenGL;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Examples.WinForms
|
namespace Examples.WinForms
|
||||||
{
|
{
|
||||||
public partial class W03_Extensions : Form//, IExample
|
public partial class W03_Extensions : Form, IExample
|
||||||
{
|
{
|
||||||
GLControl glControl = new GLControl();
|
GLControl glControl = new GLControl();
|
||||||
Assembly assembly;
|
Assembly assembly;
|
||||||
|
@ -42,12 +43,13 @@ namespace Examples.WinForms
|
||||||
|
|
||||||
glControl.CreateContext();
|
glControl.CreateContext();
|
||||||
|
|
||||||
listBox1.BeginInvoke(new LoadExtensionsDelegate(LoadExtensions));
|
//listBox1.BeginInvoke(new LoadExtensionsDelegate(LoadExtensions));
|
||||||
|
ThreadPool.QueueUserWorkItem(new WaitCallback(LoadExtensions));
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate void LoadExtensionsDelegate();
|
delegate void LoadExtensionsDelegate(object data);
|
||||||
|
|
||||||
void LoadExtensions()
|
void LoadExtensions(object data)
|
||||||
{
|
{
|
||||||
glControl.MakeCurrent();
|
glControl.MakeCurrent();
|
||||||
|
|
||||||
|
@ -64,6 +66,10 @@ namespace Examples.WinForms
|
||||||
f.SetValue(null, d);
|
f.SetValue(null, d);
|
||||||
listBox1.Items.Add(String.Format("{0}/{1} {2}: {3}",
|
listBox1.Items.Add(String.Format("{0}/{1} {2}: {3}",
|
||||||
(++i).ToString(), v.Length, d != null ? "ok" : "failed", f.Name));
|
(++i).ToString(), v.Length, d != null ? "ok" : "failed", f.Name));
|
||||||
|
|
||||||
|
listBox1.Update();
|
||||||
|
|
||||||
|
//Thread.Sleep(1);
|
||||||
|
|
||||||
if (d != null)
|
if (d != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue