summaryrefslogtreecommitdiff
path: root/src/glut/ggi
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-06-10 15:16:44 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-06-10 15:16:44 +0000
commitb58c5ad7b0a2c3ed3ecf189f284e23118091fa68 (patch)
tree65f0df21580a254758afe61094c51d436118ec54 /src/glut/ggi
parentdd41748f63b819c36c4234a525e5609660ceb395 (diff)
GGI driver updates (Filip Spacek)
Diffstat (limited to 'src/glut/ggi')
-rw-r--r--src/glut/ggi/ggiglut.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/glut/ggi/ggiglut.c b/src/glut/ggi/ggiglut.c
index d66a9d706b..140f576002 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);