[Piglit] [PATCH v2 03/13] Add glewInit() calls to GLX_ARB_create_context tests.
kenneth at whitecape.org
Tue Mar 20 16:39:58 PDT 2012
On 03/20/2012 04:08 PM, Paul Berry wrote:
> On 13 March 2012 15:08, Kenneth Graunke <kenneth at whitecape.org
> <mailto:kenneth at whitecape.org>> wrote:
> On 03/12/2012 02:41 PM, Paul Berry wrote:
> Previously these tests didn't initialize GLEW, presumably
> because they
> only use GL 1.0 functions, and those functions bypass GLEW. But
> Au contraire, ARB_create_context is part of OpenGL 3!
> In tests/spec/glx_arb_create___context/common.c, you'll find a
> GLX_ARB_create_context_setup function that manually obtains the
> function pointer:
> __piglit___glXCreateContextAttribsARB =
> glXGetProcAddress((const GLubyte *)
> I would just do glewInit() there rather than in each individual test.
> The problem with doing glewInit() in GLX_ARB_create_context_setup() is
> that you can't call glewInit() until after glXMakeContextCurrent()
> (because glewInit() makes GL calls) this is true both before and after
> the piglit-dispatch rework). And after the piglit-dispatch rework, it
> will be necessary for glewInit() to occur before the call to
> glGetString(). So there's really no choice but to put the glewInit()
> call exactly where it is in this patch.
> If it's all right with you I'll just leave the patch as is and update
> the comment.
Yeah, that's fine.
More information about the Piglit