find . -type f -exec dos2unix {} + -exec mac2unix {} +
Robert Cranston authored on 27/02/2024 02:27:28... | ... |
@@ -103,10 +103,10 @@ void glutReshapeWindow(int width, int height); |
103 | 103 |
#define GLUT_KEY_RETURN 13 |
104 | 104 |
#define GLUT_KEY_SPACE ' ' |
105 | 105 |
|
106 |
-// Modifiers, only supported for glutKeyIsDown |
|
107 |
-#define GLUT_KEY_SHIFT 19 |
|
108 |
-#define GLUT_KEY_CTRL 20 |
|
109 |
-#define GLUT_KEY_ALT 21 |
|
106 |
+// Modifiers, only supported for glutKeyIsDown |
|
107 |
+#define GLUT_KEY_SHIFT 19 |
|
108 |
+#define GLUT_KEY_CTRL 20 |
|
109 |
+#define GLUT_KEY_ALT 21 |
|
110 | 110 |
|
111 | 111 |
|
112 | 112 |
#ifdef __cplusplus |
find . -type f -exec chmod -x {} +
Robert Cranston authored on 27/02/2024 02:27:271 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,117 @@ |
1 |
+#ifndef _MICROGLUT_ |
|
2 |
+#define _MICROGLUT_ |
|
3 |
+ |
|
4 |
+#ifdef __cplusplus |
|
5 |
+extern "C" { |
|
6 |
+#endif |
|
7 |
+ |
|
8 |
+// Same or similar to old GLUT calls |
|
9 |
+void glutMainLoop(); |
|
10 |
+void glutCheckLoop(); |
|
11 |
+void glutInit(int *argcp, char **argv); |
|
12 |
+void glutPostRedisplay(); |
|
13 |
+ |
|
14 |
+void glutReshapeFunc(void (*func)(int width, int height)); |
|
15 |
+void glutDisplayFunc(void (*func)(void)); |
|
16 |
+void glutKeyboardFunc(void (*func)(unsigned char key, int x, int y)); |
|
17 |
+void glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y)); |
|
18 |
+void glutSpecialFunc(void (*func)(unsigned char key, int x, int y)); |
|
19 |
+void glutSpecialUpFunc(void (*func)(unsigned char key, int x, int y)); |
|
20 |
+ |
|
21 |
+void glutMouseFunc(void (*func)(int button, int state, int x, int y)); |
|
22 |
+void glutPassiveMotionFunc(void (*func)(int x, int y)); |
|
23 |
+void glutMotionFunc(void (*func)(int x, int y)); |
|
24 |
+ |
|
25 |
+void glutInitWindowPosition (int x, int y); |
|
26 |
+void glutInitWindowSize (int width, int height); |
|
27 |
+void glutCreateWindow (const char *windowTitle); |
|
28 |
+ |
|
29 |
+void glutSwapBuffers(); |
|
30 |
+ |
|
31 |
+#define GLUT_ELAPSED_TIME (700) |
|
32 |
+#define GLUT_WINDOW_WIDTH (102) |
|
33 |
+#define GLUT_WINDOW_HEIGHT (103) |
|
34 |
+#define GLUT_MOUSE_POSITION_X (802) |
|
35 |
+#define GLUT_MOUSE_POSITION_Y (803) |
|
36 |
+#define GLUT_QUIT_FLAG (801) |
|
37 |
+int glutGet(int type); |
|
38 |
+ |
|
39 |
+void glutInitDisplayMode(unsigned int mode); |
|
40 |
+void glutIdleFunc(void (*func)(void)); |
|
41 |
+char glutKeyIsDown(unsigned char c); |
|
42 |
+char glutMouseIsDown(unsigned int c); |
|
43 |
+ |
|
44 |
+// Standard GLUT timer |
|
45 |
+void glutTimerFunc(int millis, void (*func)(int arg), int arg); |
|
46 |
+// Ingemar's version |
|
47 |
+void glutRepeatingTimer(int millis); |
|
48 |
+ |
|
49 |
+void glutInitContextVersion(int major, int minor); |
|
50 |
+ |
|
51 |
+void glutHideCursor(); |
|
52 |
+void glutShowCursor(); |
|
53 |
+void glutWarpPointer(int x, int y); |
|
54 |
+void glutFullScreen(); |
|
55 |
+void glutExitFullScreen(); |
|
56 |
+void glutToggleFullScreen(); |
|
57 |
+void glutPositionWindow(int x, int y); |
|
58 |
+void glutReshapeWindow(int width, int height); |
|
59 |
+ |
|
60 |
+/* Mouse buttons. */ |
|
61 |
+#define GLUT_LEFT_BUTTON 0 |
|
62 |
+// No support for middle yet |
|
63 |
+//#define GLUT_MIDDLE_BUTTON 1 |
|
64 |
+#define GLUT_RIGHT_BUTTON 2 |
|
65 |
+ |
|
66 |
+/* Mouse button state. */ |
|
67 |
+#define GLUT_DOWN 0 |
|
68 |
+#define GLUT_UP 1 |
|
69 |
+ |
|
70 |
+// Only some modes supported |
|
71 |
+#define GLUT_STENCIL 32 |
|
72 |
+//#define GLUT_MULTISAMPLE 128 |
|
73 |
+//#define GLUT_STEREO 256 |
|
74 |
+#define GLUT_RGB 0 |
|
75 |
+#define GLUT_RGBA GLUT_RGB |
|
76 |
+#define GLUT_SINGLE 0 |
|
77 |
+#define GLUT_DOUBLE 2 |
|
78 |
+#define GLUT_DEPTH 16 |
|
79 |
+ |
|
80 |
+ |
|
81 |
+ |
|
82 |
+// Special keys. |
|
83 |
+#define GLUT_KEY_F1 1 |
|
84 |
+#define GLUT_KEY_F2 2 |
|
85 |
+#define GLUT_KEY_F3 3 |
|
86 |
+#define GLUT_KEY_F4 4 |
|
87 |
+#define GLUT_KEY_F5 5 |
|
88 |
+#define GLUT_KEY_F6 6 |
|
89 |
+#define GLUT_KEY_F7 7 |
|
90 |
+// F8 and up ignored since they are not possible on some keyboards - like mine |
|
91 |
+#define GLUT_KEY_LEFT 28 |
|
92 |
+#define GLUT_KEY_UP 29 |
|
93 |
+#define GLUT_KEY_RIGHT 30 |
|
94 |
+#define GLUT_KEY_DOWN 31 |
|
95 |
+#define GLUT_KEY_PAGE_UP 22 |
|
96 |
+#define GLUT_KEY_PAGE_DOWN 23 |
|
97 |
+#define GLUT_KEY_HOME 24 |
|
98 |
+#define GLUT_KEY_END 25 |
|
99 |
+#define GLUT_KEY_INSERT 26 |
|
100 |
+ |
|
101 |
+#define GLUT_KEY_ESC 27 |
|
102 |
+#define GLUT_KEY_TAB 9 |
|
103 |
+#define GLUT_KEY_RETURN 13 |
|
104 |
+#define GLUT_KEY_SPACE ' ' |
|
105 |
+ |
|
106 |
+// Modifiers, only supported for glutKeyIsDown |
|
107 |
+#define GLUT_KEY_SHIFT 19 |
|
108 |
+#define GLUT_KEY_CTRL 20 |
|
109 |
+#define GLUT_KEY_ALT 21 |
|
110 |
+ |
|
111 |
+ |
|
112 |
+#ifdef __cplusplus |
|
113 |
+} |
|
114 |
+#endif |
|
115 |
+ |
|
116 |
+ |
|
117 |
+#endif |