From: Brian P. <bri...@tu...> - 2008-01-15 16:12:06
|
Utkarsh Ayachit wrote: > > Brian Paul wrote: >> Utkarsh Ayachit wrote: >>> Brian Paul wrote: >>> > Utkarsh Ayachit wrote: >>> >> Mesa 7.0.2 says that is supports OpenGL 2.1 however, >>> >> GetAttributeLocation results in the following error message: >>> >> >>> >> Mesa 7.0.2 implementation error: User called no-op dispatch function >>> >> (an unsupported extension function?) >>> >> >>> >> Am I missing something or are vertex attributes not supported at >>> all? >>> > >> [...] >> >> I don't know how you're getting a Mesa error when it appears you're >> using NVIDIA's OpenGL. >> >> -Brian >> > > My bad: I am explicitly linking my application against Mesa, but forgot > to set the LD_LIBRARY_PATH when running glxinfo. Attached is the revised > output: OK, does the problem occur with progs/demos/fslight.c? It calls glGetAttribLocation via the pointer returned by glutGetProcAddress(). You can try calling glGetAttribLocation() directly too with this patch to fslight.c: diff --git a/progs/demos/fslight.c b/progs/demos/fslight.c index e6d83bf..27ad1ea 100644 --- a/progs/demos/fslight.c +++ b/progs/demos/fslight.c @@ -11,7 +11,7 @@ * Brian Paul * 17 April 2003 */ - +#define GL_GLEXT_PROTOTYPES #include <assert.h> #include <string.h> #include <stdio.h> @@ -518,7 +518,7 @@ Init(void) if (CoordAttrib) { int i; glBindAttribLocation_func(program, CoordAttrib, "coord"); - i = glGetAttribLocation_func(program, "coord"); + i = glGetAttribLocation/*_func*/(program, "coord"); assert(i >= 0); if (i != CoordAttrib) { printf("Hmmm, NVIDIA bug?\n"); Either way, it works OK here. -Brian |