/* * Mesa 3-D graphics library * Version: 6.5 * Copyright (C) 1995-2006 Brian Paul * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Library for glut using mesa fbdev driver * * Written by Sean D'Epagnier (c) 2006 */ #include #include #include #define MULTIHEAD /* enable multihead hacks, it allows the program to continue drawing without reading input when a second fbdev has keyboard focus it can cause screen corruption that requires C-l to fix */ #define HAVE_GPM #define MAX_VSYNC 200 /* this causes these symbols to not be exported */ #pragma GCC visibility push(hidden) /* --------- fbdev ------------ */ extern int Redisplay; extern int Visible; extern int VisibleSwitch; extern int Active; extern int VisiblePoll; extern int Swapping, VTSwitch; void TestVisible(void); int ParseFBModes(int, int, int, int, int, int); void SetVideoMode(void); void CreateBuffer(void); void CreateVisual(void); extern int FrameBufferFD; extern unsigned char *FrameBuffer; extern unsigned char *BackBuffer; extern int DisplayMode; extern char exiterror[256]; extern struct fb_fix_screeninfo FixedInfo; extern struct fb_var_screeninfo VarInfo; extern GLFBDevContextPtr Context; extern GLFBDevBufferPtr Buffer; extern GLFBDevVisualPtr Visual; /* --- colormap --- */ #define REVERSECMAPSIZELOG 3 #define REVERSECMAPSIZE (1<