summaryrefslogtreecommitdiff
path: root/src/glut/fbdev/fbdev.c
diff options
context:
space:
mode:
authorSean D'Epagnier <geckosenator@freedesktop.org>2006-08-18 10:38:15 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-07-11 20:03:34 +0100
commitcf8cb1c55fc3924f2dacb09988523145c405004a (patch)
treec2e65e1b00298ecef981d23779706ac2ae3b1fac /src/glut/fbdev/fbdev.c
parent25365be75946b93c2e987bf1d46fa3d473d4c1f6 (diff)
downloadglut-cf8cb1c55fc3924f2dacb09988523145c405004a.tar.gz
The driver now compiles correctly without any x headers or libraries installed The bitmap and stroke code can't be shared with glx anymore because of this.
The model for the mini teapot is restored and I have tested it to work with linux-fbdev and linux-solo The driver recognizes 32bpp where there is no alpha (my radeon 7500) It also sets the correct number of cmap entrees (instead of 256 which can be an error)
Diffstat (limited to 'src/glut/fbdev/fbdev.c')
-rw-r--r--src/glut/fbdev/fbdev.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/glut/fbdev/fbdev.c b/src/glut/fbdev/fbdev.c
index ce7d187..10bc6ea 100644
--- a/src/glut/fbdev/fbdev.c
+++ b/src/glut/fbdev/fbdev.c
@@ -112,11 +112,8 @@ static void Cleanup(void)
/* close mouse */
CloseMouse();
- glFBDevMakeCurrent( NULL, NULL, NULL);
-
- glFBDevDestroyContext(Context);
- glFBDevDestroyBuffer(Buffer);
- glFBDevDestroyVisual(Visual);
+ if(Visual)
+ glutDestroyWindow(1);
/* restore original variable screen info */
if(FrameBufferFD != -1) {
@@ -735,6 +732,11 @@ int glutGetWindow(void)
void glutDestroyWindow(int win)
{
+ glFBDevMakeCurrent( NULL, NULL, NULL);
+ glFBDevDestroyContext(Context);
+ glFBDevDestroyBuffer(Buffer);
+ glFBDevDestroyVisual(Visual);
+ Visual = NULL;
}
void glutPostRedisplay(void)
@@ -762,6 +764,7 @@ void glutSwapBuffers(void)
Swapping = 0;
}
+ /* if there was a vt switch while swapping, switch now */
if(VTSwitch) {
if(ioctl(ConsoleFD, VT_ACTIVATE, VTSwitch) < 0)
sprintf(exiterror, "Error switching console\n");