Fix a problem that caused the new interface code to not actually be
[mesa.git] / src / glut / beos / glutState.h
1 /***********************************************************
2 * Copyright (C) 1997, Be Inc. All rights reserved.
3 *
4 * FILE: glutState.h
5 *
6 * DESCRIPTION: the global state for GLUT
7 * (takes the place of glutint.h in the C version)
8 ***********************************************************/
9
10 /***********************************************************
11 * Headers
12 ***********************************************************/
13 #include <GL/glut.h>
14 #include <Application.h>
15 #include "glutWindow.h"
16 #include "glutMenu.h"
17
18 /***********************************************************
19 * CLASS: GlutState
20 *
21 * DESCRIPTION: all the global state variables
22 ***********************************************************/
23 struct GlutState {
24 BApplication *display;
25 char *programName; // used in error messages
26 int initX, initY; // initial window position
27 int initWidth, initHeight; // initial window size
28 unsigned int displayMode; // initial display mode
29 char *displayString; // verbose display mode
30
31 GlutWindow *currentWindow; // current window
32 GlutMenu *currentMenu; // current menu
33
34 GlutWindow **windowList; // array of pointers to windows
35 int windowListSize; // size of window list
36
37 GLUTidleCB idle; // idle callback
38 GLUTmenuStatusCB menuStatus; // menu status callback
39 int modifierKeys; // only valid during keyboard callback
40
41 bool debug; // call glGetError
42 bool swapHack;
43
44 GlutState() {
45 display = 0;
46 programName = 0;
47 initX = initY = -1;
48 initWidth = initHeight = 300;
49 displayMode = GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH;
50 displayString = 0;
51 currentWindow = 0;
52 currentMenu = 0;
53 windowList = 0;
54 windowListSize = 0;
55 idle = 0;
56 menuStatus = 0;
57 modifierKeys = ~0;
58 debug = swapHack = false;
59 }
60 };
61
62 /***********************************************************
63 * Global variable (declared in glutInit.cpp)
64 ***********************************************************/
65 extern GlutState gState;