Manually check OpenGL version.

This commit is contained in:
the_fiddler 2009-08-17 09:56:16 +00:00
parent 5e80a061b8
commit 7f7662cfb8

View file

@ -50,7 +50,10 @@ namespace Examples.Tutorial
{
base.OnLoad(e);
if (!GL.SupportsExtension("VERSION_1_5"))
string version = GL.GetString(StringName.Version);
int major = (int)version[0];
int minor = (int)version[2];
if (major <= 1 && minor < 5)
{
System.Windows.Forms.MessageBox.Show("You need at least OpenGL 1.5 to run this example. Aborting.", "VBOs not supported",
System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);