Svilen <krustev.svilen@...> writes:
> It is clear that the application crashes on the first call to
> glGenBuffers() after the call to glewInit(). it looks like it is
> dereferencing a pointer to unexisting function.
It should be a null pointer, not just a bad pointer, if the driver does
not support it. Is this the case?
Is glGenBuffers the *first* OpenGL call after glewInit()? Your context
might be invalid if so. Is the application threaded? You might need
to force a glXMakeCurrent when switching threads.
> Running on a Mesa DRI Intel(R) 945GM GEM 20090712 2009Q2 RC3 from Tungsten G
> raphics, Inc
> OpenGL version 1.4 Mesa 7.7-devel is supported
>
> So 1.4 only is supported after all. Then why in the 1.5 list below all
> functions including the glGenBuffers() are reported "OK"?
I'm not keen on what glewinfo is doing to report "version <X.Y> is
supported" or not. However, at the function level, drivers are free
to give back valid function pointers for whatever they want, and that
doesn't necessarily need to correspond with what OpenGL version the
driver supports. Certainly, it seems rather silly that a driver would
support every function in OGL 1.5 && yet report it as implementing OGL
1.4, but it's perfectly legal.
Your user is using a development branch of Mesa. Both 7.6.1 and
7.7 will be out soon; you might consider trying one of the release
candidates.
> To add to the confusion I can see that "GL_ARB_vertex_buffer_object"
> extension is supported as well. Is that OK if the related functions
> are supposed to be included in the mainstream 1.5 and on top of this
> listed as "OK" a bit earlier in the same report?
I feel like I do not understand this question. Are you asking if it's
okay for a function to be listed twice in glewinfo's output?
> So the question is - shall I try to call the ARB functions i.e.
> glGenBuffersARB()? How to distinguish between such platforms?
> for example - is this safe?
>
> if (glewIsSupported("GL_VERSION_1_4 GL_EXT_multi_draw_arrays
> GL_ARB_vertex_buffer_object"))
> glGenBuffersARB( ... )
Well, yes, but it's too conservative. If all you care about is VBOs,
you should only check for VBOs. The above `if' would fail on a driver
that supports VBOs but not multi_draw_arrays, or only reports 1.1
support. Yet your code path inside the `if' will work fine on such a
card.
> or this
>
> if (glewIsSupported("GL_VERSION_1_5 GL_EXT_multi_draw_arrays"))
> glGenBuffers( ... )
Again safe, and again too conservative.
> I presume checking for GL_VERSION_1_5 and GL_ARB_vertex_buffer_object
> at the same time is not quite clever?
Checking for both does seem a little silly.
> What am I missing here?
After you establish that you've got a valid, active context, post
a reproducible test case or a backtrace here. If you know the
card supports what you're asking of it, I would just remove the
glewIsSupported checks temporarily to forego any confusion.
One of the people listening here should be able to identify whether
this is a GLEW bug in that case; you might need to forward this to the
Mesa folks, but it's too soon to tell from this.
-tom
|