Added a bunch of files synched with 0.8.42
This commit is contained in:
@@ -15,18 +15,19 @@ int GLUTEventAdapter::_s_my = 0;
|
||||
|
||||
GLUTEventAdapter::GLUTEventAdapter()
|
||||
{
|
||||
_eventType = NONE; // adaptor does not encapsulate any events.
|
||||
_key = -1; // set to 'invalid' key value.
|
||||
_button = -1; // set to 'invalid' button value.
|
||||
_mx = -1; // set to 'invalid' position value.
|
||||
_my = -1; // set to 'invalid' position value.
|
||||
_buttonMask = 0; // default to no mouse buttons being pressed.
|
||||
_time = 0.0f; // default to no time has been set.
|
||||
_eventType = NONE; // adaptor does not encapsulate any events.
|
||||
_key = -1; // set to 'invalid' key value.
|
||||
_button = -1; // set to 'invalid' button value.
|
||||
_mx = -1; // set to 'invalid' position value.
|
||||
_my = -1; // set to 'invalid' position value.
|
||||
_buttonMask = 0; // default to no mouse buttons being pressed.
|
||||
_time = 0.0f; // default to no time has been set.
|
||||
|
||||
copyStaticVariables();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GLUTEventAdapter::copyStaticVariables()
|
||||
{
|
||||
_buttonMask = _s_accumulatedButtonMask;
|
||||
@@ -38,6 +39,7 @@ void GLUTEventAdapter::copyStaticVariables()
|
||||
_my = _s_my;
|
||||
}
|
||||
|
||||
|
||||
void GLUTEventAdapter::setWindowSize(int Xmin, int Ymin, int Xmax, int Ymax)
|
||||
{
|
||||
_s_Xmin = Xmin;
|
||||
@@ -46,6 +48,7 @@ void GLUTEventAdapter::setWindowSize(int Xmin, int Ymin, int Xmax, int Ymax)
|
||||
_s_Ymax = Ymax;
|
||||
}
|
||||
|
||||
|
||||
void GLUTEventAdapter::setButtonMask(unsigned int buttonMask)
|
||||
{
|
||||
_s_accumulatedButtonMask = buttonMask;
|
||||
@@ -60,6 +63,7 @@ void GLUTEventAdapter::adaptResize(float time, int Xmin, int Ymin, int Xmax, int
|
||||
copyStaticVariables();
|
||||
}
|
||||
|
||||
|
||||
/** method for adapting mouse motion events whilst mouse buttons are pressed.*/
|
||||
void GLUTEventAdapter::adaptMouseMotion(float time, int x, int y)
|
||||
{
|
||||
@@ -70,6 +74,7 @@ void GLUTEventAdapter::adaptMouseMotion(float time, int x, int y)
|
||||
copyStaticVariables();
|
||||
}
|
||||
|
||||
|
||||
/** method for adapting mouse motion events whilst no mouse button are pressed.*/
|
||||
void GLUTEventAdapter::adaptMousePassiveMotion(float time, int x, int y)
|
||||
{
|
||||
@@ -80,12 +85,12 @@ void GLUTEventAdapter::adaptMousePassiveMotion(float time, int x, int y)
|
||||
copyStaticVariables();
|
||||
}
|
||||
|
||||
|
||||
/** method for adapting mouse button pressed/released events.*/
|
||||
void GLUTEventAdapter::adaptMouse(float time, int button, int state, int x, int y)
|
||||
{
|
||||
_time = time;
|
||||
|
||||
|
||||
if( state == GLUT_DOWN )
|
||||
{
|
||||
|
||||
@@ -94,9 +99,9 @@ void GLUTEventAdapter::adaptMouse(float time, int button, int state, int x, int
|
||||
|
||||
switch(button)
|
||||
{
|
||||
case(GLUT_LEFT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask | LEFT_BUTTON; break;
|
||||
case(GLUT_MIDDLE_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask | MIDDLE_BUTTON; break;
|
||||
case(GLUT_RIGHT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask | RIGHT_BUTTON; break;
|
||||
case(GLUT_LEFT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask | LEFT_BUTTON; break;
|
||||
case(GLUT_MIDDLE_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask | MIDDLE_BUTTON; break;
|
||||
case(GLUT_RIGHT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask | RIGHT_BUTTON; break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -108,19 +113,20 @@ void GLUTEventAdapter::adaptMouse(float time, int button, int state, int x, int
|
||||
|
||||
switch(button)
|
||||
{
|
||||
case(GLUT_LEFT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask & ~LEFT_BUTTON; break;
|
||||
case(GLUT_MIDDLE_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask & ~MIDDLE_BUTTON; break;
|
||||
case(GLUT_RIGHT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask & ~RIGHT_BUTTON; break;
|
||||
case(GLUT_LEFT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask & ~LEFT_BUTTON; break;
|
||||
case(GLUT_MIDDLE_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask & ~MIDDLE_BUTTON; break;
|
||||
case(GLUT_RIGHT_BUTTON): _s_accumulatedButtonMask = _s_accumulatedButtonMask & ~RIGHT_BUTTON; break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
_s_mx = x;
|
||||
_s_my = y;
|
||||
|
||||
copyStaticVariables();
|
||||
}
|
||||
|
||||
|
||||
/** method for adapting keyboard events.*/
|
||||
void GLUTEventAdapter::adaptKeyboard(float time, unsigned char key, int x, int y )
|
||||
{
|
||||
@@ -129,16 +135,16 @@ void GLUTEventAdapter::adaptKeyboard(float time, unsigned char key, int x, int y
|
||||
_key = key;
|
||||
_s_mx = x;
|
||||
_s_my = y;
|
||||
|
||||
|
||||
copyStaticVariables();
|
||||
}
|
||||
|
||||
|
||||
/** method for adapting frame events, i.e. iddle/display callback.*/
|
||||
void GLUTEventAdapter::adaptFrame(float time)
|
||||
{
|
||||
_eventType = FRAME;
|
||||
_time = time;
|
||||
|
||||
|
||||
copyStaticVariables();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ C++FILES = \
|
||||
TARGET_BASENAME = osgGLUT
|
||||
|
||||
|
||||
LIBS = -ldl
|
||||
LIBS = -L../../lib -losgDB -losgUtil -losg $(GLUTLIB) -lGLU -lGL -lm
|
||||
|
||||
LIB = ../../lib/lib$(TARGET_BASENAME).so
|
||||
#LIB = ../../lib/lib$(TARGET_BASENAME).a
|
||||
@@ -17,8 +17,9 @@ LIB = ../../lib/lib$(TARGET_BASENAME).so
|
||||
TARGET_LIB_FILES = lib$(TARGET_BASENAME).so
|
||||
TARGET_INCLUDE_FILES = \
|
||||
osgGLUT/Export\
|
||||
osgGLUT/Viewer\
|
||||
osgGLUT/GLUTEventAdapter\
|
||||
osgGLUT/Version\
|
||||
osgGLUT/Viewer\
|
||||
|
||||
C++FLAGS += -I ../../include
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "osgGLUT/Version"
|
||||
|
||||
|
||||
const char* osgGLUTGetVersion()
|
||||
{
|
||||
return "0.8.34";
|
||||
return "0.8.42";
|
||||
}
|
||||
|
||||
|
||||
const char* osgGLUTGetLibraryName()
|
||||
{
|
||||
return "Open Scene Graph GLUT Library";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user