From b58c5ad7b0a2c3ed3ecf189f284e23118091fa68 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 10 Jun 2002 15:16:44 +0000 Subject: GGI driver updates (Filip Spacek) --- src/glut/ggi/ggiglut.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/glut/ggi/ggiglut.c') 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); -- cgit v1.2.3