OGRE
master
Object-Oriented Graphics Rendering Engine
|
Specialization for connecting with Qt. More...
#include <OgreApplicationContextQt.h>
Public Member Functions | |
ApplicationContextQt (const Ogre::String &appName="Ogre3D") | |
void | addInputListener (NativeWindowType *win, InputListener *lis) override |
attach input listener More... | |
NativeWindowPair | createWindow (const Ogre::String &name, uint32_t w=0, uint32_t h=0, Ogre::NameValuePairList miscParams=Ogre::NameValuePairList()) override |
Create a new render window. More... | |
NativeWindowPair | createWindow (QWindow *window, Ogre::NameValuePairList miscParams=Ogre::NameValuePairList()) |
void | injectMainWindow (QWindow *window) |
allows overriding the main (first) Window with a pre-created QWindow More... | |
void | pollEvents () override |
process all window events since last call More... | |
void | removeInputListener (NativeWindowType *win, InputListener *lis) override |
detatch input listener More... | |
void | setWindowGrab (NativeWindowType *win, bool grab) override |
When input is grabbed the mouse is confined to the window. More... | |
void | shutdown () override |
Cleans up and shuts down the context. More... | |
void | useQtEventLoop (bool enable) |
signal that you want to use the Qt event loop More... | |
Public Member Functions inherited from OgreBites::ApplicationContextBase | |
ApplicationContextBase (const Ogre::String &appName="Ogre3D") | |
virtual | ~ApplicationContextBase () |
void | _fireInputEvent (const Event &event, uint32_t windowID) const |
inspect the event and call one of the corresponding functions on the registered InputListener More... | |
void | addInputListener (InputListener *lis) |
void | closeApp () |
This function closes down the application - saves the configuration then shutdowns. More... | |
void | createDummyScene () |
Creates dummy scene to allow rendering GUI in viewport. More... | |
virtual void | createRoot () |
Creates the OGRE root. More... | |
void | destroyDummyScene () |
Destroys dummy scene. More... | |
void | destroyRTShaderSystem () |
Destroy the RT Shader system. More... | |
void | destroyWindow (const Ogre::String &name) |
destroy and erase an NativeWindowPair by name More... | |
void | enableShaderCache () const |
enables the caching of compiled shaders to file More... | |
bool | frameEnded (const Ogre::FrameEvent &evt) override |
Called just after a frame has been rendered. More... | |
bool | frameRenderingQueued (const Ogre::FrameEvent &evt) override |
Called after all render targets have had their rendering commands issued, but before render windows have been asked to flip their buffers over. More... | |
bool | frameStarted (const Ogre::FrameEvent &evt) override |
Called when a frame is about to begin rendering. More... | |
virtual float | getDisplayDPI () const |
get the vertical DPI of the display More... | |
Ogre::FileSystemLayer & | getFSLayer () const |
get the FileSystemLayer instance pointing to an application specific directory More... | |
InputListener * | getImGuiInputListener () const |
Ogre::OverlaySystem * | getOverlaySystem () const |
Ogre::RenderWindow * | getRenderWindow () const |
get the main RenderWindow owns the context on OpenGL More... | |
Ogre::Root * | getRoot () const |
void | initApp () |
This function initializes the render system and resources. More... | |
Ogre::ImGuiOverlay * | initialiseImGui () |
Set up the overlay system for usage with ImGui. More... | |
bool | initialiseRTShaderSystem () |
Initialize the RT Shader system. More... | |
virtual void | loadResources () |
Loads context-wide resource groups. More... | |
virtual void | locateResources () |
Finds context-wide resource groups. More... | |
virtual bool | oneTimeConfig () |
Configures the startup settings for OGRE. More... | |
void | reconfigure (const Ogre::String &renderer, Ogre::NameValuePairList &options) |
void | removeInputListener (InputListener *lis) |
void | runRenderingSettingsDialog () |
Show the renderer configuration menu. More... | |
void | setRTSSWriteShadersToDisk (bool write) |
make the RTSS write out the generated shaders for caching and debugging More... | |
virtual void | setup () |
Sets up the context after configuration. More... | |
void | setWindowGrab (bool grab=true) |
virtual void | windowClosed (Ogre::RenderWindow *rw) |
virtual bool | windowClosing (Ogre::RenderWindow *rw) |
virtual void | windowFocusChange (Ogre::RenderWindow *rw) |
virtual void | windowMoved (Ogre::RenderWindow *rw) |
virtual void | windowResized (Ogre::RenderWindow *rw) |
Public Member Functions inherited from Ogre::FrameListener | |
virtual | ~FrameListener () |
Additional Inherited Members | |
Static Public Member Functions inherited from OgreBites::ApplicationContextBase | |
static Ogre::String | getDefaultMediaDir () |
the directory where the media files were installed More... | |
Specialization for connecting with Qt.
Assumes that Ogre Main loop is used for compatibility with other implementations.
|
inlineexplicit |
|
overridevirtual |
Create a new render window.
You must use SDL and not an auto-created window as SDL does not get the events otherwise.
By default the values from ogre.cfg are used for w, h and miscParams.
Reimplemented from OgreBites::ApplicationContextBase.
NativeWindowPair OgreBites::ApplicationContextQt::createWindow | ( | QWindow * | window, |
Ogre::NameValuePairList | miscParams = Ogre::NameValuePairList() |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
allows overriding the main (first) Window with a pre-created QWindow
window |
References OgreAssert.
|
inline |
signal that you want to use the Qt event loop
aka QApplication::exec() instead of Root::startRendering. In this case you may want to call startTimer on this QObject which ensures that Root::renderOneFrame is called periodically.
enable |
References OgreBites::ApplicationContextBase::addInputListener(), OgreBites::ApplicationContextBase::removeInputListener(), and OgreBites::ApplicationContextBase::setWindowGrab().
|
overridevirtual |
When input is grabbed the mouse is confined to the window.
Reimplemented from OgreBites::ApplicationContextBase.
|
overridevirtual |
attach input listener
lis | the listener |
win | the window to receive the events for. |
Reimplemented from OgreBites::ApplicationContextBase.
|
overridevirtual |
detatch input listener
lis | the listener |
win | the window to receive the events for. |
Reimplemented from OgreBites::ApplicationContextBase.
|
overridevirtual |
process all window events since last call
Reimplemented from OgreBites::ApplicationContextBase.
|
overridevirtual |
Cleans up and shuts down the context.
Reimplemented from OgreBites::ApplicationContextBase.