OpenSceneGraph
3.0.1
|
Public Member Functions | |
GraphicsWindowEmbedded (osg::GraphicsContext::Traits *traits=0) | |
GraphicsWindowEmbedded (int x, int y, int width, int height) | |
virtual bool | isSameKindAs (const Object *object) const |
virtual const char * | libraryName () const |
return the name of the object's library. | |
virtual const char * | className () const |
return the name of the object's class type. | |
void | init () |
virtual bool | valid () const |
Return whether a valid and usable GraphicsContext has been created. | |
virtual bool | realizeImplementation () |
Realize the GraphicsContext implementation, Pure virtual - must be implemented by concrete implementations of GraphicsContext. | |
virtual bool | isRealizedImplementation () const |
Return true if the graphics context has been realized, and is ready to use, implementation. | |
virtual void | closeImplementation () |
Close the graphics context implementation. | |
virtual bool | makeCurrentImplementation () |
Make this graphics context current implementation. | |
virtual bool | releaseContextImplementation () |
Release the graphics context. | |
virtual void | swapBuffersImplementation () |
Swap the front and back buffers implementation. | |
virtual void | grabFocus () |
Get focus. | |
virtual void | grabFocusIfPointerInWindow () |
Get focus on if the pointer is in this window. | |
virtual void | raiseWindow () |
Raise the window to the top. | |
![]() | |
GraphicsWindow () | |
void | setEventQueue (osgGA::EventQueue *eventQueue) |
osgGA::EventQueue * | getEventQueue () |
const osgGA::EventQueue * | getEventQueue () const |
virtual void | checkEvents () |
void | setWindowRectangle (int x, int y, int width, int height) |
Set the window's position and size. | |
virtual bool | setWindowRectangleImplementation (int, int, int, int) |
implementation of setWindowRectangle, should be implemented by derived classes | |
virtual void | getWindowRectangle (int &x, int &y, int &width, int &height) |
Get the window's position and size. | |
void | setWindowDecoration (bool flag) |
Set Window decoration. | |
virtual bool | setWindowDecorationImplementation (bool) |
implementation of setWindowDecoration, should be implemented by derived classes | |
virtual bool | getWindowDecoration () const |
Set Window decoration. | |
virtual void | setWindowName (const std::string &) |
Set the name of the window. | |
virtual std::string | getWindowName () |
Return the name of the window. | |
virtual void | useCursor (bool cursorOn) |
Switch on/off the cursor. | |
virtual void | setCursor (MouseCursor) |
Set mouse cursor to a specific shape. | |
virtual void | setSyncToVBlank (bool on) |
Create a new mouse cursor from the usual bitmap data. | |
bool | getSyncToVBlank () const |
virtual void | setSwapGroup (bool on, GLuint group, GLuint barrier) |
Set swap group. | |
void | getSwapGroup (bool &on, GLuint &group, GLuint &barrier) const |
virtual bool | makeContextCurrentImplementation (GraphicsContext *) |
Make this graphics context current with specified read context implementation. | |
virtual void | bindPBufferToTextureImplementation (GLenum) |
Pure virtual, Bind the graphics context to associated texture implementation. | |
void | getViews (Views &views) |
Returns the list of views (osgViewer::View) attached to this GraphicsWindow. | |
virtual void | requestRedraw () |
requestRedraw() requests a single redraw. | |
virtual void | requestContinuousUpdate (bool=true) |
requestContinousUpdate(bool) is for en/disabling a throw or idle callback to be requested by a GUIEventHandler (typically a MatrixManipulator, though other GUIEventHandler's may also provide functionality). | |
virtual void | requestWarpPointer (float, float) |
requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer to a specified x,y location on the window. | |
![]() | |
void | add (Operation *operation) |
Add operation to end of OperationQueue. | |
void | remove (Operation *operation) |
Remove operation from OperationQueue. | |
void | remove (const std::string &name) |
Remove named operation from OperationQueue. | |
void | removeAllOperations () |
Remove all operations from OperationQueue. | |
void | runOperations () |
Run the operations. | |
GraphicsOperationQueue & | getOperationsQueue () |
Get the operations queue, not you must use the OperationsMutex when accessing the queue. | |
OpenThreads::Mutex * | getOperationsMutex () |
Get the operations queue mutex. | |
osg::RefBlock * | getOperationsBlock () |
Get the operations queue block used to mark an empty queue, if you end items into the empty queue you must release this block. | |
Operation * | getCurrentOperation () |
Get the current operations that is being run. | |
const Traits * | getTraits () const |
Get the traits of the GraphicsContext. | |
void | setState (State *state) |
Set the State object which tracks the current OpenGL state for this graphics context. | |
State * | getState () |
Get the State object which tracks the current OpenGL state for this graphics context. | |
const State * | getState () const |
Get the const State object which tracks the current OpenGL state for this graphics context. | |
void | setClearColor (const Vec4 &color) |
Sets the clear color. | |
const Vec4 & | getClearColor () const |
Returns the clear color. | |
void | setClearMask (GLbitfield mask) |
Set the clear mask used in glClear(..). | |
GLbitfield | getClearMask () const |
Get the clear mask. | |
virtual void | clear () |
Do an OpenGL clear of the full graphics context/window. | |
double | getTimeSinceLastClear () const |
bool | realize () |
Realize the GraphicsContext. | |
void | close (bool callCloseImplementation=true) |
close the graphics context. | |
void | swapBuffers () |
swap the front and back buffers. | |
bool | isRealized () const |
Return true if the graphics context has been realized and is ready to use. | |
bool | makeCurrent () |
Make this graphics context current. | |
bool | makeContextCurrent (GraphicsContext *readContext) |
Make this graphics context current with specified read context. | |
bool | releaseContext () |
Release the graphics context. | |
bool | isCurrent () const |
Return true if the current thread has this OpenGL graphics context. | |
void | bindPBufferToTexture (GLenum buffer) |
Bind the graphics context to associated texture. | |
void | createGraphicsThread () |
Create a graphics thread to the graphics context, so that the thread handles all OpenGL operations. | |
void | setGraphicsThread (GraphicsThread *gt) |
Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations. | |
GraphicsThread * | getGraphicsThread () |
Get the graphics thread assigned the graphics context. | |
const GraphicsThread * | getGraphicsThread () const |
Get the const graphics thread assigned the graphics context. | |
virtual bool | makeContextCurrentImplementation (GraphicsContext *readContext)=0 |
Make this graphics context current with specified read context implementation. | |
void | setSwapCallback (SwapCallback *rc) |
Set the swap callback which overrides the GraphicsContext::swapBuffersImplementation(), allowing developers to provide custom behavior for swap. | |
SwapCallback * | getSwapCallback () |
Get the swap callback which overrides the GraphicsContext::swapBuffersImplementation(). | |
const SwapCallback * | getSwapCallback () const |
Get the const swap callback which overrides the GraphicsContext::swapBuffersImplementation(). | |
void | swapBuffersCallbackOrImplemenation () |
convinience method for handling whether to call swapbuffers callback or the standard context swapBuffersImplementation. | |
void | resized (int x, int y, int width, int height) |
resized method should be called when the underlying window has been resized and the GraphicsWindow and associated Cameras must be updated to keep in sync with the new size. | |
void | setResizedCallback (ResizedCallback *rc) |
Set the resized callback which overrides the GraphicsConext::realizedImplementation(), allow developers to provide custom behavior in response to a window being resized. | |
ResizedCallback * | getResizedCallback () |
Get the resized callback which overrides the GraphicsConext::realizedImplementation(). | |
const ResizedCallback * | getResizedCallback () const |
Get the const resized callback which overrides the GraphicsConext::realizedImplementation(). | |
virtual void | resizedImplementation (int x, int y, int width, int height) |
resized implementation, by default resizes the viewports and aspect ratios the cameras associated with the graphics Window. | |
Cameras & | getCameras () |
Get the the list of cameras associated with this graphics context. | |
const Cameras & | getCameras () const |
Get the the const list of cameras associated with this graphics context. | |
void | setDefaultFboId (GLuint i) |
set the default FBO-id, this id will be used when the rendering-backend is finished with RTT FBOs | |
GLuint | getDefaultFboId () const |
virtual bool | isSameKindAs (const Object *object) const |
![]() | |
Object () | |
Construct an object. | |
Object (bool threadSafeRefUnref) | |
Object (const Object &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor, optional CopyOp object can be used to control shallow vs deep copying of dynamic data. | |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
Set whether to use a mutex to ensure ref() and unref() are thread safe. | |
virtual void | setName (const std::string &name) |
Set the name of object using C++ style string. | |
void | setName (const char *name) |
Set the name of object using a C style string. | |
const std::string & | getName () const |
Get the name of object. | |
void | setDataVariance (DataVariance dv) |
Set the data variance of this object. | |
DataVariance | getDataVariance () const |
Get the data variance of this object. | |
virtual void | computeDataVariance () |
Compute the DataVariance based on an assessment of callback etc. | |
void | setUserDataContainer (osg::UserDataContainer *udc) |
set the UserDataContainer object. | |
osg::UserDataContainer * | getUserDataContainer () |
get the UserDataContainer attached to this object. | |
const osg::UserDataContainer * | getUserDataContainer () const |
get the const UserDataContainer attached to this object. | |
osg::UserDataContainer * | getOrCreateUserDataContainer () |
Convinience method that returns the UserDataContainer, and if one doesn't already exist creates and assigns a DefaultUserDataContainer to the Object and then return this new UserDataContainer. | |
virtual void | setUserData (Referenced *obj) |
Set user data, data must be subclassed from Referenced to allow automatic memory handling. | |
virtual Referenced * | getUserData () |
Get user data. | |
virtual const Referenced * | getUserData () const |
Get const user data. | |
template<typename T > | |
bool | getUserValue (const std::string &name, T &value) const |
Convinience method that casts the named UserObject to osg::TemplateValueObject<T> and gets the value. | |
template<typename T > | |
void | setUserValue (const std::string &name, const T &value) |
Convinience method that creates the osg::TemplateValueObject<T> to store the specified value and adds it as a named UserObject. | |
virtual void | resizeGLObjectBuffers (unsigned int) |
Resize any per context GLObject buffers to specified size. | |
virtual void | releaseGLObjects (osg::State *=0) const |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. | |
![]() | |
Referenced () | |
Referenced (bool threadSafeRefUnref) | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
bool | getThreadSafeRefUnref () const |
Get whether a mutex is used to ensure ref() and unref() are thread safe. | |
OpenThreads::Mutex * | getRefMutex () const |
Get the mutex used to ensure thread safety of ref()/unref(). | |
int | ref () const |
Increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
int | unref () const |
Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
int | unref_nodelete () const |
Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
int | referenceCount () const |
Return the number of pointers currently referencing this object. | |
ObserverSet * | getObserverSet () const |
Get the ObserverSet if one is attached, otherwise return NULL. | |
ObserverSet * | getOrCreateObserverSet () const |
Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet. | |
void | addObserver (Observer *observer) const |
Add a Observer that is observing this object, notify the Observer when this object gets deleted. | |
void | removeObserver (Observer *observer) const |
Remove Observer that is observing this object. | |
![]() | |
virtual | ~GUIActionAdapter () |
virtual osg::View * | asView () |
Provide a mechanism for getting the osg::View associated with this GUIActionAdapter. |
|
inline |
References osg::GraphicsContext::_traits, and init().
|
inline |
|
inlinevirtual |
return the name of the object's class type.
Must be defined by derived classes.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Close the graphics context implementation.
Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Get focus.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Get focus on if the pointer is in this window.
Reimplemented from osgViewer::GraphicsWindow.
|
inline |
References osg::GraphicsContext::_traits, osg::GraphicsContext::createNewContextID(), osg::State::getContextID(), osg::GraphicsContext::getState(), osg::GraphicsContext::incrementContextIDUsageCount(), osg::State::setContextID(), osg::State::setGraphicsContext(), osg::GraphicsContext::setState(), osg::GraphicsContext::Traits::sharedContext, osg::ref_ptr< T >::valid(), and valid().
Referenced by GraphicsWindowEmbedded().
|
inlinevirtual |
Return true if the graphics context has been realized, and is ready to use, implementation.
Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
return the name of the object's library.
Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Make this graphics context current implementation.
Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Raise the window to the top.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Realize the GraphicsContext implementation, Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Release the graphics context.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Swap the front and back buffers implementation.
Pure virtual - must be implemented by concrete implementations of GraphicsContext.
Reimplemented from osgViewer::GraphicsWindow.
|
inlinevirtual |
Return whether a valid and usable GraphicsContext has been created.
Reimplemented from osgViewer::GraphicsWindow.
Referenced by init().
![]() | Generated at Fri Nov 2 2012 21:40:00 for the OpenSceneGraph by doxygen 1.8.1.1. |