From 424553d208b5e694edf0f435369e3c6afa88eaaf Mon Sep 17 00:00:00 2001 From: ikits Date: Tue, 21 Nov 2006 05:01:18 +0000 Subject: [PATCH] bug fix git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@453 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/src/glew_init_gl.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index cfc9a45..baf61f9 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -45,61 +45,65 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) } else { + GLEW_VERSION_1_1 = GL_TRUE; if (s[major] >= '2') { - GLEW_VERSION_1_1 = GL_TRUE; - GLEW_VERSION_1_2 = GL_TRUE; + GLEW_VERSION_1_2 = GL_TRUE; GLEW_VERSION_1_3 = GL_TRUE; GLEW_VERSION_1_4 = GL_TRUE; GLEW_VERSION_1_5 = GL_TRUE; GLEW_VERSION_2_0 = GL_TRUE; + if (s[minor] >= '1') + { + GLEW_VERSION_2_1 = GL_TRUE; + } } else { if (s[minor] >= '5') { - GLEW_VERSION_1_1 = GL_TRUE; GLEW_VERSION_1_2 = GL_TRUE; GLEW_VERSION_1_3 = GL_TRUE; GLEW_VERSION_1_4 = GL_TRUE; GLEW_VERSION_1_5 = GL_TRUE; GLEW_VERSION_2_0 = GL_FALSE; + GLEW_VERSION_2_1 = GL_FALSE; } if (s[minor] == '4') { - GLEW_VERSION_1_1 = GL_TRUE; GLEW_VERSION_1_2 = GL_TRUE; GLEW_VERSION_1_3 = GL_TRUE; GLEW_VERSION_1_4 = GL_TRUE; GLEW_VERSION_1_5 = GL_FALSE; GLEW_VERSION_2_0 = GL_FALSE; + GLEW_VERSION_2_1 = GL_FALSE; } if (s[minor] == '3') { - GLEW_VERSION_1_1 = GL_TRUE; GLEW_VERSION_1_2 = GL_TRUE; GLEW_VERSION_1_3 = GL_TRUE; GLEW_VERSION_1_4 = GL_FALSE; GLEW_VERSION_1_5 = GL_FALSE; GLEW_VERSION_2_0 = GL_FALSE; + GLEW_VERSION_2_1 = GL_FALSE; } if (s[minor] == '2') { - GLEW_VERSION_1_1 = GL_TRUE; GLEW_VERSION_1_2 = GL_TRUE; GLEW_VERSION_1_3 = GL_FALSE; GLEW_VERSION_1_4 = GL_FALSE; GLEW_VERSION_1_5 = GL_FALSE; GLEW_VERSION_2_0 = GL_FALSE; + GLEW_VERSION_2_1 = GL_FALSE; } if (s[minor] < '2') { - GLEW_VERSION_1_1 = GL_TRUE; GLEW_VERSION_1_2 = GL_FALSE; GLEW_VERSION_1_3 = GL_FALSE; GLEW_VERSION_1_4 = GL_FALSE; GLEW_VERSION_1_5 = GL_FALSE; GLEW_VERSION_2_0 = GL_FALSE; + GLEW_VERSION_2_1 = GL_FALSE; } } }