19#ifndef OSGVIEWER_GRAPHICSWINDOWX11
20#define OSGVIEWER_GRAPHICSWINDOWX11 1
62 getState()->setGraphicsContext(
this);
66 getState()->setContextID(
_traits->sharedContext->getState()->getContextID() );
78 virtual const char*
libraryName()
const {
return "osgViewer"; }
79 virtual const char*
className()
const {
return "GraphicsWindowX11"; }
168 void adaptKey(XKeyEvent& keyevent,
int& keySymbol,
int& unmodifiedKeySymbol);
183 EGLDisplay _eglDisplay;
184 EGLSurface _eglSurface;
The osgViewer library provides high level viewer functionality designed to make it easier to write a ...
ref_ptr< Traits > _traits
Definition GraphicsContext:544
static unsigned int createNewContextID()
Create a contextID for a new graphics context, this contextID is used to set up the osg::State associ...
static void incrementContextIDUsageCount(unsigned int contextID)
Increment the usage count associate with a contextID.
void setState(State *state)
Set the State object which tracks the current OpenGL state for this graphics context.
Definition GraphicsContext:331
State * getState()
Get the State object which tracks the current OpenGL state for this graphics context.
Definition GraphicsContext:334
GraphicsContext Traits object provides the specification of what type of graphics context is required...
Definition GraphicsContext:70
Object()
Construct an object.
Definition Object:69
Base class for providing reference counted objects.
Definition Referenced:44
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
Class to encapsulate platform-specific OpenGL context handle variables.
Definition GraphicsHandleX11:45
int _numLockMask
Definition GraphicsWindowX11:200
bool _valid
Definition GraphicsWindowX11:176
virtual bool isRealizedImplementation() const
Return true if the graphics context has been realised and is ready to use.
Definition GraphicsWindowX11:87
void adaptKey(XKeyEvent &keyevent, int &keySymbol, int &unmodifiedKeySymbol)
virtual bool checkEvents()
Check to see if any events have been generated.
virtual bool setWindowRectangleImplementation(int x, int y, int width, int height)
Set the window's position and size.
double _timeOfLastCheckEvents
Definition GraphicsWindowX11:197
bool _ownsWindow
Definition GraphicsWindowX11:195
virtual void requestWarpPointer(float x, float y)
requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer to a specified x,...
Display * getDisplayToUse() const
int getModifierMask() const
bool _initialized
Definition GraphicsWindowX11:193
Display * getEventDisplay() const
Definition GraphicsWindowX11:141
int _lastEventType
Definition GraphicsWindowX11:198
GLXFBConfig _fbConfig
Definition GraphicsWindowX11:186
bool checkAndSendEventFullScreenIfNeeded(Display *display, int x, int y, int width, int height, bool windowDecoration)
void rescanModifierMapping()
char _keyMap[32]
Definition GraphicsWindowX11:202
int _modifierState
Definition GraphicsWindowX11:199
virtual bool releaseContextImplementation()
Release the graphics context.
Window _parent
Definition GraphicsWindowX11:178
virtual void grabFocusIfPointerInWindow()
Get focus on if the pointer is in this window.
Window _window
Definition GraphicsWindowX11:179
GraphicsWindowX11(osg::GraphicsContext::Traits *traits)
Definition GraphicsWindowX11:34
virtual bool realizeImplementation()
Realise the GraphicsContext.
virtual void swapBuffersImplementation()
Swap the front and back buffers.
virtual const char * libraryName() const
return the name of the object's library.
Definition GraphicsWindowX11:78
std::map< MouseCursor, Cursor > _mouseCursorMap
Definition GraphicsWindowX11:203
virtual bool makeCurrentImplementation()
Make this graphics context current.
void forceKey(int key, double time, bool state)
Cursor getOrCreateCursor(MouseCursor mouseShape)
bool _realized
Definition GraphicsWindowX11:194
Cursor _currentCursor
Definition GraphicsWindowX11:189
virtual bool valid() const
Return whether a valid and usable GraphicsContext has been created.
Definition GraphicsWindowX11:81
virtual bool setWindowDecorationImplementation(bool flag)
Set Window decoration.
Atom _deleteWindow
Definition GraphicsWindowX11:191
Window & getWindow()
Definition GraphicsWindowX11:146
Window & getParent()
Definition GraphicsWindowX11:145
Cursor getCurrentCursor()
Definition GraphicsWindowX11:148
void transformMouseXY(float &x, float &y)
void getModifierMap(char *keymap) const
virtual bool isSameKindAs(const Object *object) const
Definition GraphicsWindowX11:77
XVisualInfo * _visualInfo
Definition GraphicsWindowX11:180
virtual void setWindowName(const std::string &name)
Set the name of the window.
bool setWindow(Window window)
virtual void setCursor(MouseCursor cursor)
Set mouse cursor to a specific shape.
virtual void grabFocus()
Get focus.
virtual void closeImplementation()
Close the graphics context.
virtual void raiseWindow()
Raise specified window.
Display * _eventDisplay
Definition GraphicsWindowX11:177
virtual const char * className() const
return the name of the object's class type.
Definition GraphicsWindowX11:79
Window _window
Definition GraphicsWindowX11:134
WindowData(Window window)
Definition GraphicsWindowX11:131
Base class for providing Windowing API agnostic access to creating and managing graphics window and e...
Definition GraphicsWindow:43
MouseCursor
Mouse cursor types, the same ones already present with ancient glut ...
Definition GraphicsWindow:100
#define OSGVIEWER_EXPORT
Definition Export:40