From cadeadc74ba1ce5c9d81bb72f29504a007b28cae Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Mon, 2 Apr 2012 22:43:23 +0000 Subject: [PATCH] fg_gl2: Fix typo git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1234 7f0cb862-5218-0410-a997-914c9d46530a --- src/fg_gl2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fg_gl2.c b/src/fg_gl2.c index 641a813..9e31502 100644 --- a/src/fg_gl2.c +++ b/src/fg_gl2.c @@ -39,6 +39,8 @@ void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib) { void fgInitGL2() { fgState.HasOpenGL20 = 0; + // TODO: Mesa returns a valid stub function, rather than NULL, + // when we request a non-existent function #define CHECK(func, a) if ((a) == NULL) { fgWarning("fgInitGL2: " func " is NULL"); return; } CHECK("fghGenBuffers", fghGenBuffers = (FGH_PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers")); CHECK("fghDeleteBuffers", fghDeleteBuffers = (FGH_PFNGLDELETEBUFFERSPROC) glutGetProcAddress ("glDeleteBuffers")); @@ -46,7 +48,7 @@ void fgInitGL2() { CHECK("fghBufferData", fghBufferData = (FGH_PFNGLBUFFERDATAPROC) glutGetProcAddress ("glBufferData")); CHECK("fghVertexAttribPointer", fghVertexAttribPointer = (FGH_PFNGLVERTEXATTRIBPOINTERPROC) glutGetProcAddress ("glVertexAttribPointer")); CHECK("fghEnableVertexAttribArray", fghEnableVertexAttribArray = (FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glEnableVertexAttribArray")); - CHECK("fghDisableVertexAttribArray", fghDisableVertexAttribArray = (FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glDisnableVertexAttribArray")); + CHECK("fghDisableVertexAttribArray", fghDisableVertexAttribArray = (FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glDisableVertexAttribArray")); #undef CHECK fgState.HasOpenGL20 = 1; } -- 1.7.10.4