summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11/glxext.c')
-rw-r--r--src/glx/x11/glxext.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 397b3901893..a827e448bc4 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -1761,10 +1761,19 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
gc->currentDpy = dpy;
gc->currentDrawable = draw;
gc->currentReadable = read;
-#ifdef GLX_DIRECT_RENDERING
- if (gc->isDirect) reply.contextTag = -1;
-#endif
- gc->currentContextTag = reply.contextTag;
+
+ if ( ! gc->isDirect ) {
+ __GLXattribute * state = (__GLXattribute *)(gc->client_state_private);
+
+ gc->currentContextTag = reply.contextTag;
+ if ( state->array_state == NULL ) {
+ (void) glGetString( GL_EXTENSIONS );
+ __glXInitVertexArrayState(gc);
+ }
+ }
+ else {
+ gc->currentContextTag = -1;
+ }
} else {
__glXSetCurrentContext(&dummyContext);
#ifdef GLX_DIRECT_RENDERING