1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
--- src/ftstring.h.orig
+++ src/ftstring.h
@@ -13,7 +13,7 @@
#include <string>
#include <memory>
#include <map>
-#include <GL/freeglut.h>
+#include <GL/glut.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
--- src/ftsymbol.h.orig
+++ src/ftsymbol.h
@@ -8,7 +8,7 @@
#ifndef FTSYMBOL_H
#define FTSYMBOL_H
-#include <GL/freeglut.h>
+#include <GL/glut.h>
class CFTSymbol {
public:
--- src/quad.h.orig
+++ src/quad.h
@@ -9,7 +9,7 @@
#define QUAD_H
#include "rect.h"
-#include <GL/freeglut.h>
+#include <GL/glut.h>
class CQuad {
public:
--- src/window.cpp.orig
+++ src/window.cpp
@@ -56,7 +56,7 @@
//glutEntryFunc();
glutMotionFunc(callbackMouse);
glutPassiveMotionFunc(callbackMouse);
- glutMouseWheelFunc(callbackMouseWheel);
+// glutMouseWheelFunc(callbackMouseWheel);
// glutWMCloseFunc(closeWindow);
glEnable(GL_BLEND);
@@ -222,6 +222,7 @@
}
}
+#if 0
void CWindow::fnMouseWheel(int wheel, int direction, int x, int y) {
if(direction > 0) {
updateScale(true);
@@ -230,11 +231,18 @@
updateScale(false);
}
}
+#endif
+
+#define GLUT_SCROLL_UP 3
+#define GLUT_SCROLL_DOWN 4
void CWindow::fnMouseButtons(int button, int state, int x, int y) {
if(button == GLUT_LEFT_BUTTON) {
m_mouseLB = (state == GLUT_DOWN);
- }
+ } else if (button == GLUT_SCROLL_UP)
+ updateScale(true);
+ else if (button == GLUT_SCROLL_DOWN)
+ updateScale(false);
}
void CWindow::fnKeyboard(unsigned char key, int x, int y) {
@@ -246,7 +254,7 @@
switch(key) {
case 27: // ESC
// exit(0);
- glutLeaveMainLoop();
+ //glutLeaveMainLoop();
break;
case 127: // Delete
if(mod == GLUT_ACTIVE_CTRL) {
@@ -639,9 +647,11 @@
g_window->fnMouseButtons(button, state, x, y);
}
+#if 0
void CWindow::callbackMouseWheel(int wheel, int direction, int x, int y) {
g_window->fnMouseWheel(wheel, direction, x, y);
}
+#endif
void CWindow::callbackKeyboardSpecial(int key, int x, int y) {
g_window->fnKeyboardSpecial(key, x, y);
|