diff options
Diffstat (limited to 'src/glut/ggi/ggiglut.c')
-rw-r--r-- | src/glut/ggi/ggiglut.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/glut/ggi/ggiglut.c b/src/glut/ggi/ggiglut.c index d66a9d706b8..140f576002a 100644 --- a/src/glut/ggi/ggiglut.c +++ b/src/glut/ggi/ggiglut.c @@ -238,11 +238,6 @@ int glutCreateWindow(const char *title) gt = (rgb) ? __glut_gt_rgb : __glut_gt_index; - __glut_ctx = GGIMesaCreateContext(); - - if (__glut_ctx == NULL) - ggiPanic("Can't create mesa-context\n"); - __glut_vis = ggiOpen(NULL); if (__glut_vis == NULL) { @@ -261,20 +256,27 @@ int glutCreateWindow(const char *title) /* return GL_FALSE; */ } - ggiGetMode(__glut_vis, &mode); - - if (GGIMesaSetVisual(__glut_ctx, __glut_vis, rgb, frames > 1) < 0) + if (ggiMesaExtendVisual(__glut_vis, GL_FALSE, GL_FALSE, + 16, 0, 0, 0, 0, 0, 1) < 0) { ggiPanic("GGIMesaSetVisual failed!\n"); } + __glut_ctx = ggiMesaCreateContext(__glut_vis); + + if (__glut_ctx == NULL) + ggiPanic("Can't create mesa-context\n"); + + ggiGetMode(__glut_vis, &mode); + + __glut_width = mode.visible.x; __glut_height = mode.visible.y; mousex = mode.visible.x / 2; mousey = mode.visible.y / 2; - GGIMesaMakeCurrent(__glut_ctx); + ggiMesaMakeCurrent(__glut_ctx, __glut_vis); if (__glut_reshape) __glut_reshape(__glut_width, __glut_height); |