JunkBox_Lib++ (for Windows) 1.10.1
Loading...
Searching...
No Matches
GlutTool.cpp
Go to the documentation of this file.
1
8#include "tools++.h"
9#include "GlutTool.h"
10
11
12using namespace jbxl;
13
14
15
16
17#ifdef ENABLE_OPENGL
18
19
20
21static JBXL_GLUT_MOUSESTATE GlutMouseState;
22
23static long int GlutMouseXPos;
24static long int GlutMouseYPos;
25static long int GlutMouseZPos;
26
27
28
29
30
31void jbxl::JbxlGlutInit(int argc, char** argv)
32{
33 memset(&GlutMouseState, 0, sizeof(JBXL_GLUT_MOUSESTATE));
34
35 GlutMouseXPos = 0;
36 GlutMouseYPos = 0;
37 GlutMouseZPos = 0;
38
39 glutInit(&argc, argv);
40}
41
42
43
44void jbxl::_jbxlGlutMouseProc(int button, int state, int x, int y)
45{
46 switch (button) {
47 case GLUT_LEFT_BUTTON:
48 DEBUG_ERR("LEFT");
49 break;
50 case GLUT_MIDDLE_BUTTON:
51 DEBUG_ERR("MIDDLE");
52 break;
53 case GLUT_RIGHT_BUTTON:
54 DEBUG_ERR("LEFT");
55 break;
56 }
57}
58
59
60
61void jbxl::JbxlGlutInitMouse(void)
62{
63 glutMouseFunc(jbxl::_jbxlGlutMouseProc);
64}
65
66
67
68
69
70#endif // ifdef ENABLE_OPENNI
Definition Brep.h:29
ツールライブラリ ヘッダ for C++