From ba11d024dad4549790b8d4c4f183c7b0b4113747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Sun, 30 Nov 2014 13:17:02 +0200 Subject: [PATCH 01/16] Added semantic key handling to InputAggretator that fires event on keydown, commented Window.cpp line where semantic event was handled even if it did nothing, documented the InputAggregator injectKeyDown as returning always true --- cegui/include/CEGUI/InputAggregator.h | 13 +++++ cegui/src/InputAggregator.cpp | 71 +++++++++++++++++++++++++++ cegui/src/Window.cpp | 2 +- 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/cegui/include/CEGUI/InputAggregator.h b/cegui/include/CEGUI/InputAggregator.h index 7b9c66884..d3bd2e0a0 100644 --- a/cegui/include/CEGUI/InputAggregator.h +++ b/cegui/include/CEGUI/InputAggregator.h @@ -156,6 +156,15 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, void setMouseMoveScalingFactor(float factor); float getMouseMoveScalingFactor() const; + /*! + \brief + Passes input immediately if it is some predefined action + \return + True when the input was consumed + */ + bool injectRawKeyDown(Key::Scan scan_code, bool shift_down, bool alt_down, + bool ctrl_down) const; + /************************************************************************/ /* InjectedInputReceiver interface implementation */ /************************************************************************/ @@ -165,6 +174,10 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, virtual bool injectMouseButtonDown(MouseButton button); virtual bool injectMouseButtonUp(MouseButton button); + /*! + \return + Always true + */ virtual bool injectKeyDown(Key::Scan scan_code); virtual bool injectKeyUp(Key::Scan scan_code); diff --git a/cegui/src/InputAggregator.cpp b/cegui/src/InputAggregator.cpp index 3081cb984..e6a42ffe2 100644 --- a/cegui/src/InputAggregator.cpp +++ b/cegui/src/InputAggregator.cpp @@ -190,6 +190,77 @@ void InputAggregator::onMouseButtonMultiClickToleranceChanged(InputAggregatorEve fireEvent(EventMouseButtonMultiClickToleranceChanged, args); } +//----------------------------------------------------------------------------// +bool InputAggregator::injectRawKeyDown(Key::Scan scan_code, bool shift_down, + bool alt_down, bool ctrl_down) const +{ + if (d_inputReceiver == 0) + return false; + + int value = d_keyValuesMappings[scan_code]; + + // copied from injectKeyUp + // handle combined keys + if (ctrl_down && shift_down) + { + if (scan_code == Key::ArrowLeft) + value = SV_SelectPreviousWord; + else if (scan_code == Key::ArrowRight) + value = SV_SelectNextWord; + else if (scan_code == Key::End) + value = SV_SelectToEndOfDocument; + else if (scan_code == Key::Home) + value = SV_SelectToStartOfDocument; + } + else if (ctrl_down) + { + if (scan_code == Key::ArrowLeft) + value = SV_GoToPreviousWord; + else if (scan_code == Key::ArrowRight) + value = SV_GoToNextWord; + else if (scan_code == Key::End) + value = SV_GoToEndOfDocument; + else if (scan_code == Key::Home) + value = SV_GoToStartOfDocument; + else if (scan_code == Key::A) + value = SV_SelectAll; + else if (scan_code == Key::C) + value = SV_Copy; + else if (scan_code == Key::V) + value = SV_Paste; + else if (scan_code == Key::X) + value = SV_Cut; + else if (scan_code == Key::Tab) + value = SV_NavigateToPrevious; + } + else if (shift_down) + { + if (scan_code == Key::ArrowLeft) + value = SV_SelectPreviousCharacter; + else if (scan_code == Key::ArrowRight) + value = SV_SelectNextCharacter; + else if (scan_code == Key::ArrowUp) + value = SV_SelectUp; + else if (scan_code == Key::ArrowDown) + value = SV_SelectDown; + else if (scan_code == Key::End) + value = SV_SelectToEndOfLine; + else if (scan_code == Key::Home) + value = SV_SelectToStartOfLine; + else if (scan_code == Key::PageUp) + value = SV_SelectPreviousPage; + else if (scan_code == Key::PageDown) + value = SV_SelectNextPage; + } + + if (value != SV_NoValue) + { + SemanticInputEvent semantic_event(value); + return d_inputReceiver->injectInputEvent(semantic_event); + } + + return false; +} //----------------------------------------------------------------------------// void InputAggregator::onMouseMoveScalingFactorChanged(InputAggregatorEventArgs& args) { diff --git a/cegui/src/Window.cpp b/cegui/src/Window.cpp index fbcf300b9..e06f85cc7 100644 --- a/cegui/src/Window.cpp +++ b/cegui/src/Window.cpp @@ -2660,7 +2660,7 @@ void Window::onSemanticInputEvent(SemanticEventArgs& e) return; } - ++e.handled; + //++e.handled; } //----------------------------------------------------------------------------// From b678929038f37d46275c84a72fdd0e674acf993d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Sun, 30 Nov 2014 13:27:03 +0200 Subject: [PATCH 02/16] Ogre sample now doesn't capture the mouse on Windows or Linux making debugging with release possible --- .../browser/src/CEGuiOgreBaseApplication.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/samples/browser/src/CEGuiOgreBaseApplication.cpp b/samples/browser/src/CEGuiOgreBaseApplication.cpp index 284e49e4b..744c3927f 100644 --- a/samples/browser/src/CEGuiOgreBaseApplication.cpp +++ b/samples/browser/src/CEGuiOgreBaseApplication.cpp @@ -430,6 +430,29 @@ CEGuiDemoFrameListener::CEGuiDemoFrameListener(CEGuiOgreBaseApplication* baseApp windowHndStr << (unsigned int)windowHnd; paramList.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str())); + // Prevent the window from capturing mouse making debugging impossible + // (on Windows and Linux) +#if defined OIS_WIN32_PLATFORM + paramList.insert(std::make_pair(std::string("w32_mouse"), + std::string("DISCL_FOREGROUND" ))); + paramList.insert(std::make_pair(std::string("w32_mouse"), + std::string("DISCL_NONEXCLUSIVE"))); + paramList.insert(std::make_pair(std::string("w32_keyboard"), + std::string("DISCL_FOREGROUND"))); + paramList.insert(std::make_pair(std::string("w32_keyboard"), + std::string("DISCL_NONEXCLUSIVE"))); +#elif defined OIS_LINUX_PLATFORM + paramList.insert(std::make_pair(std::string("x11_mouse_grab"), + std::string("false"))); + paramList.insert(std::make_pair(std::string("x11_mouse_hide"), + std::string("false"))); + paramList.insert(std::make_pair(std::string("x11_keyboard_grab"), + std::string("false"))); + paramList.insert(std::make_pair(std::string("XAutoRepeatOn"), + std::string("true"))); +#endif + + #if OGRE_PLATFORM != OGRE_PLATFORM_ANDROID && OGRE_PLATFORM != OGRE_PLATFORM_WINRT && OGRE_PLATFORM != OGRE_PLATFORM_LINUX && defined (DEBUG) paramList.insert(std::make_pair("x11_keyboard_grab", "false")); paramList.insert(std::make_pair("x11_mouse_grab", "false")); From 0c26cf59c9f0e5f5a6b452a85de56dfb385f5690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Sun, 30 Nov 2014 13:43:57 +0200 Subject: [PATCH 03/16] Added checks to OgreRenderer to erase nullptrs from hardware buffer pool, GeometryBuffer should now only return its buffer to the pool if it has one --- cegui/src/RendererModules/Ogre/GeometryBuffer.cpp | 4 +++- cegui/src/RendererModules/Ogre/Renderer.cpp | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cegui/src/RendererModules/Ogre/GeometryBuffer.cpp b/cegui/src/RendererModules/Ogre/GeometryBuffer.cpp index 8a31f4306..e8e4edd3a 100644 --- a/cegui/src/RendererModules/Ogre/GeometryBuffer.cpp +++ b/cegui/src/RendererModules/Ogre/GeometryBuffer.cpp @@ -296,7 +296,9 @@ void OgreGeometryBuffer::cleanUpVertexAttributes() d_renderOp.vertexData = 0; // Store the hardware buffer so that other instances can use it later - d_owner.returnVertexBuffer(d_hwBuffer); + // This check should also help prevent there being nullptrs in the pool + if (d_hwBuffer.get()) + d_owner.returnVertexBuffer(d_hwBuffer); d_hwBuffer.setNull(); } diff --git a/cegui/src/RendererModules/Ogre/Renderer.cpp b/cegui/src/RendererModules/Ogre/Renderer.cpp index e95ce7329..41e4420cb 100644 --- a/cegui/src/RendererModules/Ogre/Renderer.cpp +++ b/cegui/src/RendererModules/Ogre/Renderer.cpp @@ -1222,7 +1222,16 @@ Ogre::HardwareVertexBufferSharedPtr OgreRenderer::getVertexBuffer(size_t for (size_t i = d_pimpl->d_vbPool.size(); --i > 0;) { - size_t current_over = d_pimpl->d_vbPool[i]->getNumVertices()-min_size; + // It seems that there can be nullptrs in the pool + Ogre::HardwareVertexBufferSharedPtr current = d_pimpl->d_vbPool[i]; + + if (!current.get()){ + + d_pimpl->d_vbPool.erase(d_pimpl->d_vbPool.begin()+i); + continue; + } + + size_t current_over = current->getNumVertices()-min_size; // Perfect match stops searching instantly if (current_over == 0) From af662eb4599be5733a637e7ff75001bc6c1a2eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Sun, 30 Nov 2014 17:49:56 +0200 Subject: [PATCH 04/16] Merged the two semantic event if constructs into a new function --- cegui/include/CEGUI/InputAggregator.h | 7 +++ cegui/src/InputAggregator.cpp | 73 +++++---------------------- 2 files changed, 21 insertions(+), 59 deletions(-) diff --git a/cegui/include/CEGUI/InputAggregator.h b/cegui/include/CEGUI/InputAggregator.h index d3bd2e0a0..f8d62f08a 100644 --- a/cegui/include/CEGUI/InputAggregator.h +++ b/cegui/include/CEGUI/InputAggregator.h @@ -156,6 +156,13 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, void setMouseMoveScalingFactor(float factor); float getMouseMoveScalingFactor() const; + /*! + \brief + Returns a semantic action matching the scan_code + */ + int getSemanticAction(Key::Scan scan_code, bool shift_down, bool alt_down, + bool ctrl_down) const; + /*! \brief Passes input immediately if it is some predefined action diff --git a/cegui/src/InputAggregator.cpp b/cegui/src/InputAggregator.cpp index e6a42ffe2..eef5d7bd9 100644 --- a/cegui/src/InputAggregator.cpp +++ b/cegui/src/InputAggregator.cpp @@ -191,15 +191,11 @@ void InputAggregator::onMouseButtonMultiClickToleranceChanged(InputAggregatorEve } //----------------------------------------------------------------------------// -bool InputAggregator::injectRawKeyDown(Key::Scan scan_code, bool shift_down, +int InputAggregator::getSemanticAction(Key::Scan scan_code, bool shift_down, bool alt_down, bool ctrl_down) const { - if (d_inputReceiver == 0) - return false; - int value = d_keyValuesMappings[scan_code]; - // copied from injectKeyUp // handle combined keys if (ctrl_down && shift_down) { @@ -253,6 +249,17 @@ bool InputAggregator::injectRawKeyDown(Key::Scan scan_code, bool shift_down, value = SV_SelectNextPage; } + return value; +} +//----------------------------------------------------------------------------// +bool InputAggregator::injectRawKeyDown(Key::Scan scan_code, bool shift_down, + bool alt_down, bool ctrl_down) const +{ + if (d_inputReceiver == 0) + return false; + + int value = getSemanticAction(scan_code, shift_down, alt_down, ctrl_down); + if (value != SV_NoValue) { SemanticInputEvent semantic_event(value); @@ -375,60 +382,8 @@ bool InputAggregator::injectKeyUp(Key::Scan scan_code) if (d_inputReceiver == 0) return false; - int value = d_keyValuesMappings[scan_code]; - - // handle combined keys - if (isControlPressed() && isShiftPressed()) - { - if (scan_code == Key::ArrowLeft) - value = SV_SelectPreviousWord; - else if (scan_code == Key::ArrowRight) - value = SV_SelectNextWord; - else if (scan_code == Key::End) - value = SV_SelectToEndOfDocument; - else if (scan_code == Key::Home) - value = SV_SelectToStartOfDocument; - } - else if (isControlPressed()) - { - if (scan_code == Key::ArrowLeft) - value = SV_GoToPreviousWord; - else if (scan_code == Key::ArrowRight) - value = SV_GoToNextWord; - else if (scan_code == Key::End) - value = SV_GoToEndOfDocument; - else if (scan_code == Key::Home) - value = SV_GoToStartOfDocument; - else if (scan_code == Key::A) - value = SV_SelectAll; - else if (scan_code == Key::C) - value = SV_Copy; - else if (scan_code == Key::V) - value = SV_Paste; - else if (scan_code == Key::X) - value = SV_Cut; - else if (scan_code == Key::Tab) - value = SV_NavigateToPrevious; - } - else if (isShiftPressed()) - { - if (scan_code == Key::ArrowLeft) - value = SV_SelectPreviousCharacter; - else if (scan_code == Key::ArrowRight) - value = SV_SelectNextCharacter; - else if (scan_code == Key::ArrowUp) - value = SV_SelectUp; - else if (scan_code == Key::ArrowDown) - value = SV_SelectDown; - else if (scan_code == Key::End) - value = SV_SelectToEndOfLine; - else if (scan_code == Key::Home) - value = SV_SelectToStartOfLine; - else if (scan_code == Key::PageUp) - value = SV_SelectPreviousPage; - else if (scan_code == Key::PageDown) - value = SV_SelectNextPage; - } + int value = getSemanticAction(scan_code, isShiftPressed(), isAltPressed(), + isControlPressed()); d_keysPressed[scan_code] = false; From 5bc099470cbbc1431a1b07c10fff56fbf0538475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Mon, 1 Dec 2014 16:23:00 +0200 Subject: [PATCH 05/16] Removed the commented line, added note about possiblity of always setting mouse actions as handled --- cegui/src/Window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cegui/src/Window.cpp b/cegui/src/Window.cpp index e06f85cc7..75fde6a73 100644 --- a/cegui/src/Window.cpp +++ b/cegui/src/Window.cpp @@ -2660,7 +2660,7 @@ void Window::onSemanticInputEvent(SemanticEventArgs& e) return; } - //++e.handled; + // Mouse actions could be marked as handled here... } //----------------------------------------------------------------------------// From 3085fd5d1534407c84d5d8c08e3b350c97b84be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Tue, 2 Dec 2014 21:06:47 +0200 Subject: [PATCH 06/16] Removed the raw input function, added a flag to control when keys are handled --- cegui/include/CEGUI/InputAggregator.h | 34 ++++++++++----- cegui/src/InputAggregator.cpp | 61 +++++++++++++++++---------- 2 files changed, 63 insertions(+), 32 deletions(-) diff --git a/cegui/include/CEGUI/InputAggregator.h b/cegui/include/CEGUI/InputAggregator.h index f8d62f08a..5b55e69e5 100644 --- a/cegui/include/CEGUI/InputAggregator.h +++ b/cegui/include/CEGUI/InputAggregator.h @@ -95,8 +95,13 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, /*! \brief Initialises this InputAggregator with some default simple-key mappings + \param handle_on_keyup + When set to true semantic actions will be registered in injectKeyUp + otherwise semantic actions are handled in injectKeyDown. If false + it is recommended to call setModifierKeys before any injectKeyDown + calls to make sure that modifiers are properly set. */ - virtual void initialise(); + virtual void initialise(bool handle_on_keyup = true); /*! \brief @@ -162,15 +167,15 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, */ int getSemanticAction(Key::Scan scan_code, bool shift_down, bool alt_down, bool ctrl_down) const; - + /*! \brief - Passes input immediately if it is some predefined action - \return - True when the input was consumed - */ - bool injectRawKeyDown(Key::Scan scan_code, bool shift_down, bool alt_down, - bool ctrl_down) const; + Sets the status of modifier keys to the specified values. + + Call this before injectKeyDown if InputAggregator is set to handle + actions on keydown. + */ + void setModifierKeys(bool shift_down, bool alt_down, bool ctrl_down); /************************************************************************/ /* InjectedInputReceiver interface implementation */ @@ -182,10 +187,16 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, virtual bool injectMouseButtonUp(MouseButton button); /*! - \return - Always true + \return + True if set to handle keys on key down and the input was consumed. + When not to set handle actions on key down will always return true. */ virtual bool injectKeyDown(Key::Scan scan_code); + /*! + \return + True if set to handle keys on key up and the input was consumed. + When not to set handle actions on key up will always return true. + */ virtual bool injectKeyUp(Key::Scan scan_code); virtual bool injectChar(String::value_type code_point); @@ -229,6 +240,9 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, bool d_generateMouseClickEvents; MouseClickTracker* d_mouseClickTrackers; + //! When set to true will handle semantic actions in injectKeyUp + bool d_handleInKeyUp; + //! Scaling factor applied to injected cursor move deltas. float d_mouseMovementScalingFactor; diff --git a/cegui/src/InputAggregator.cpp b/cegui/src/InputAggregator.cpp index eef5d7bd9..5b1e7f501 100644 --- a/cegui/src/InputAggregator.cpp +++ b/cegui/src/InputAggregator.cpp @@ -84,7 +84,8 @@ InputAggregator::InputAggregator(InputEventReceiver* input_receiver) : d_displaySizeChangedConnection( System::getSingletonPtr()->subscribeEvent(System::EventDisplaySizeChanged, Event::Subscriber(&InputAggregator::onDisplaySizeChanged, this))), - d_keysPressed() + d_keysPressed(), + d_handleInKeyUp(true) { // Initialize the array memset(d_keyValuesMappings, SV_NoValue, sizeof(SemanticValue) * 0xFF); @@ -252,23 +253,6 @@ int InputAggregator::getSemanticAction(Key::Scan scan_code, bool shift_down, return value; } //----------------------------------------------------------------------------// -bool InputAggregator::injectRawKeyDown(Key::Scan scan_code, bool shift_down, - bool alt_down, bool ctrl_down) const -{ - if (d_inputReceiver == 0) - return false; - - int value = getSemanticAction(scan_code, shift_down, alt_down, ctrl_down); - - if (value != SV_NoValue) - { - SemanticInputEvent semantic_event(value); - return d_inputReceiver->injectInputEvent(semantic_event); - } - - return false; -} -//----------------------------------------------------------------------------// void InputAggregator::onMouseMoveScalingFactorChanged(InputAggregatorEventArgs& args) { fireEvent(EventMouseMoveScalingFactorChanged, args); @@ -373,20 +357,39 @@ bool InputAggregator::injectMouseButtonUp(MouseButton button) bool InputAggregator::injectKeyDown(Key::Scan scan_code) { + if (d_inputReceiver == 0) + return false; + d_keysPressed[scan_code] = true; - return true; + + if (d_handleInKeyUp) + return true; + + int value = getSemanticAction(scan_code, isShiftPressed(), isAltPressed(), + isControlPressed()); + + if (value != SV_NoValue) + { + SemanticInputEvent semantic_event(value); + return d_inputReceiver->injectInputEvent(semantic_event); + } + + return false; } bool InputAggregator::injectKeyUp(Key::Scan scan_code) { if (d_inputReceiver == 0) return false; + + d_keysPressed[scan_code] = false; + + if (!d_handleInKeyUp) + return true; int value = getSemanticAction(scan_code, isShiftPressed(), isAltPressed(), isControlPressed()); - d_keysPressed[scan_code] = false; - if (value != SV_NoValue) { SemanticInputEvent semantic_event(value); @@ -485,8 +488,10 @@ bool InputAggregator::injectPasteRequest() return d_inputReceiver->injectInputEvent(semantic_event); } -void InputAggregator::initialise() +void InputAggregator::initialise(bool handle_on_keyup /*= true*/) { + d_handleInKeyUp = handle_on_keyup; + d_keyValuesMappings[Key::Backspace] = SV_DeletePreviousCharacter; d_keyValuesMappings[Key::Delete] = SV_DeleteNextCharacter; @@ -520,7 +525,19 @@ bool InputAggregator::isControlPressed() { return d_keysPressed[Key::LeftControl] || d_keysPressed[Key::RightControl]; } +//----------------------------------------------------------------------------// +void InputAggregator::setModifierKeys(bool shift_down, bool alt_down, + bool ctrl_down) +{ + d_keysPressed[Key::LeftShift] = shift_down; + d_keysPressed[Key::RightShift] = shift_down; + d_keysPressed[Key::LeftAlt] = alt_down; + d_keysPressed[Key::RightAlt] = alt_down; + + d_keysPressed[Key::LeftControl] = ctrl_down; + d_keysPressed[Key::RightControl] = ctrl_down; +} //----------------------------------------------------------------------------// void InputAggregator::recomputeMultiClickAbsoluteTolerance() { From c59a37164dc25c74b96d655cdc099c1d5b7bb832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Thu, 4 Dec 2014 18:43:39 +0200 Subject: [PATCH 07/16] Made all references to the KeyUp function be on key up, added a function for handling a scan code --- cegui/include/CEGUI/InputAggregator.h | 15 ++++++++--- cegui/src/InputAggregator.cpp | 38 +++++++++++++-------------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/cegui/include/CEGUI/InputAggregator.h b/cegui/include/CEGUI/InputAggregator.h index 5b55e69e5..6af45e9e7 100644 --- a/cegui/include/CEGUI/InputAggregator.h +++ b/cegui/include/CEGUI/InputAggregator.h @@ -96,8 +96,8 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, \brief Initialises this InputAggregator with some default simple-key mappings \param handle_on_keyup - When set to true semantic actions will be registered in injectKeyUp - otherwise semantic actions are handled in injectKeyDown. If false + When set to true semantic actions will be registered on key up + otherwise semantic actions are handled on key down. If false it is recommended to call setModifierKeys before any injectKeyDown calls to make sure that modifiers are properly set. */ @@ -168,6 +168,15 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, int getSemanticAction(Key::Scan scan_code, bool shift_down, bool alt_down, bool ctrl_down) const; + /*! + \brief + Gets semantic action for scan_code and sends the event + \return + True if the semantic action was handled + */ + bool handleScanCode(Key::Scan scan_code, bool shift_down, bool alt_down, + bool ctrl_down); + /*! \brief Sets the status of modifier keys to the specified values. @@ -240,7 +249,7 @@ class CEGUIEXPORT InputAggregator : public InjectedInputReceiver, bool d_generateMouseClickEvents; MouseClickTracker* d_mouseClickTrackers; - //! When set to true will handle semantic actions in injectKeyUp + //! When set to true will handle semantic actions on key up bool d_handleInKeyUp; //! Scaling factor applied to injected cursor move deltas. diff --git a/cegui/src/InputAggregator.cpp b/cegui/src/InputAggregator.cpp index 5b1e7f501..296fb5135 100644 --- a/cegui/src/InputAggregator.cpp +++ b/cegui/src/InputAggregator.cpp @@ -252,6 +252,22 @@ int InputAggregator::getSemanticAction(Key::Scan scan_code, bool shift_down, return value; } + +bool InputAggregator::handleScanCode(Key::Scan scan_code, bool shift_down, + bool alt_down, bool ctrl_down) +{ + + int value = getSemanticAction(scan_code, shift_down, alt_down, + ctrl_down); + + if (value != SV_NoValue) + { + SemanticInputEvent semantic_event(value); + return d_inputReceiver->injectInputEvent(semantic_event); + } + + return false; +} //----------------------------------------------------------------------------// void InputAggregator::onMouseMoveScalingFactorChanged(InputAggregatorEventArgs& args) { @@ -365,16 +381,8 @@ bool InputAggregator::injectKeyDown(Key::Scan scan_code) if (d_handleInKeyUp) return true; - int value = getSemanticAction(scan_code, isShiftPressed(), isAltPressed(), + return handleScanCode(scan_code, isShiftPressed(), isAltPressed(), isControlPressed()); - - if (value != SV_NoValue) - { - SemanticInputEvent semantic_event(value); - return d_inputReceiver->injectInputEvent(semantic_event); - } - - return false; } bool InputAggregator::injectKeyUp(Key::Scan scan_code) @@ -386,17 +394,9 @@ bool InputAggregator::injectKeyUp(Key::Scan scan_code) if (!d_handleInKeyUp) return true; - - int value = getSemanticAction(scan_code, isShiftPressed(), isAltPressed(), + + return handleScanCode(scan_code, isShiftPressed(), isAltPressed(), isControlPressed()); - - if (value != SV_NoValue) - { - SemanticInputEvent semantic_event(value); - return d_inputReceiver->injectInputEvent(semantic_event); - } - - return false; } bool InputAggregator::injectChar(String::value_type code_point) From 7642f28d14e177677b953b2565ce820f17e090a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Fri, 5 Dec 2014 19:01:10 +0200 Subject: [PATCH 08/16] Removed the commend about mouse actions --- cegui/src/Window.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/cegui/src/Window.cpp b/cegui/src/Window.cpp index 75fde6a73..aae8b2ff6 100644 --- a/cegui/src/Window.cpp +++ b/cegui/src/Window.cpp @@ -2659,8 +2659,6 @@ void Window::onSemanticInputEvent(SemanticEventArgs& e) return; } - - // Mouse actions could be marked as handled here... } //----------------------------------------------------------------------------// From 61f232aa755b82370b200cb59df5755a47110818 Mon Sep 17 00:00:00 2001 From: Timotei Dolean Date: Fri, 5 Dec 2014 21:36:04 +0200 Subject: [PATCH 09/16] Add missing event handled increments --- cegui/src/widgets/MultiLineEditbox.cpp | 2 ++ cegui/src/widgets/PushButton.cpp | 4 ++++ cegui/src/widgets/ToggleButton.cpp | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/cegui/src/widgets/MultiLineEditbox.cpp b/cegui/src/widgets/MultiLineEditbox.cpp index 926def828..9edce607c 100644 --- a/cegui/src/widgets/MultiLineEditbox.cpp +++ b/cegui/src/widgets/MultiLineEditbox.cpp @@ -1653,6 +1653,8 @@ void MultiLineEditbox::onSemanticInputEvent(SemanticEventArgs& e) if (e.d_semanticValue == SV_SelectAll && e.d_payload.source == CIS_Left) { handleSelectAllText(e); + + ++e.handled; } else if (e.d_semanticValue == SV_SelectWord && e.d_payload.source == CIS_Left) { diff --git a/cegui/src/widgets/PushButton.cpp b/cegui/src/widgets/PushButton.cpp index c1d7aa1f5..0fb8cfc35 100644 --- a/cegui/src/widgets/PushButton.cpp +++ b/cegui/src/widgets/PushButton.cpp @@ -101,7 +101,11 @@ void PushButton::onSemanticInputEvent(SemanticEventArgs& e) return; if (e.d_semanticValue == SV_Confirm) + { onClicked(e); + + ++e.handled; + } } } // End of CEGUI namespace section diff --git a/cegui/src/widgets/ToggleButton.cpp b/cegui/src/widgets/ToggleButton.cpp index 20f1df97b..9fcff26c7 100644 --- a/cegui/src/widgets/ToggleButton.cpp +++ b/cegui/src/widgets/ToggleButton.cpp @@ -108,7 +108,11 @@ void ToggleButton::onSemanticInputEvent(SemanticEventArgs& e) return; if (e.d_semanticValue == SV_Confirm) + { setSelected(getPostClickSelectState()); + + ++e.handled; + } } //----------------------------------------------------------------------------// From 346b7fd86ad4ba27d62338762b23fc8169899863 Mon Sep 17 00:00:00 2001 From: Timotei Dolean Date: Fri, 5 Dec 2014 22:26:04 +0200 Subject: [PATCH 10/16] Exclude GLES2StateChangeWrapper.cpp from non-GLES builds --- cegui/src/RendererModules/OpenGL/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cegui/src/RendererModules/OpenGL/CMakeLists.txt b/cegui/src/RendererModules/OpenGL/CMakeLists.txt index 7de2e8a4a..b4edee85f 100644 --- a/cegui/src/RendererModules/OpenGL/CMakeLists.txt +++ b/cegui/src/RendererModules/OpenGL/CMakeLists.txt @@ -67,7 +67,8 @@ if (NOT CEGUI_BUILD_RENDERER_OPENGLES2) list (REMOVE_ITEM CORE_SOURCE_FILES GLES2Renderer.cpp GLES2Texture.cpp GLES2GeometryBuffer.cpp - GLES2FBOTextureTarget.cpp) + GLES2FBOTextureTarget.cpp + GLES2StateChangeWrapper.cpp) list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2Renderer.h ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2Texture.h ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2GeometryBuffer.h From fc491f954d2a32aef10e715a88f4fb4bee3702ee Mon Sep 17 00:00:00 2001 From: Timotei Dolean Date: Fri, 5 Dec 2014 22:26:38 +0200 Subject: [PATCH 11/16] Fix DevIL find package call Add the headers path so it matches the expected called macros. This is also in line with how every such call is done. --- cmake/FindDevIL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindDevIL.cmake b/cmake/FindDevIL.cmake index 45f2f2eb0..e767a32e4 100644 --- a/cmake/FindDevIL.cmake +++ b/cmake/FindDevIL.cmake @@ -24,7 +24,7 @@ if (WIN32 OR APPLE) endif() cegui_find_package_handle_standard_args(IL IL_LIB IL_H_PATH) -cegui_find_package_handle_standard_args(ILU ILU_LIB) +cegui_find_package_handle_standard_args(ILU ILU_LIB IL_H_PATH) # set up output vars if (IL_FOUND AND ILU_FOUND) From 7715c5716f372e8404f43f7d2c7a84337fde56f9 Mon Sep 17 00:00:00 2001 From: Lukas Meindl Date: Sun, 11 Jan 2015 12:24:06 +0100 Subject: [PATCH 12/16] MOD: Fix encoding of the file (to UTF-8 without BOM) --- samples/GameMenu/GameMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/GameMenu/GameMenu.cpp b/samples/GameMenu/GameMenu.cpp index 1c384773e..d7587ec87 100644 --- a/samples/GameMenu/GameMenu.cpp +++ b/samples/GameMenu/GameMenu.cpp @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** created: 31/7/2012 author: Lukas E Meindl *************************************************************************/ From fcbdd89e4efc7ab5d5ad521e3a49c6d9ede73a0e Mon Sep 17 00:00:00 2001 From: Lukas Meindl Date: Sun, 11 Jan 2015 12:37:54 +0100 Subject: [PATCH 13/16] REM: Removing the unused LayoutCell class. Thanks to "Luben" for the hint. --- cegui/include/CEGUI/widgets/All.h | 1 - cegui/include/CEGUI/widgets/LayoutCell.h | 155 ------------------- cegui/src/System.cpp | 1 - cegui/src/widgets/LayoutCell.cpp | 181 ----------------------- 4 files changed, 338 deletions(-) delete mode 100644 cegui/include/CEGUI/widgets/LayoutCell.h delete mode 100644 cegui/src/widgets/LayoutCell.cpp diff --git a/cegui/include/CEGUI/widgets/All.h b/cegui/include/CEGUI/widgets/All.h index 71bf51c22..aa39e84d2 100644 --- a/cegui/include/CEGUI/widgets/All.h +++ b/cegui/include/CEGUI/widgets/All.h @@ -37,7 +37,6 @@ #include "./GroupBox.h" #include "./HorizontalLayoutContainer.h" #include "./ItemEntry.h" -#include "./LayoutCell.h" #include "./ListboxItem.h" #include "./ListboxTextItem.h" #include "./ListHeader.h" diff --git a/cegui/include/CEGUI/widgets/LayoutCell.h b/cegui/include/CEGUI/widgets/LayoutCell.h deleted file mode 100644 index 14a0ff8ef..000000000 --- a/cegui/include/CEGUI/widgets/LayoutCell.h +++ /dev/null @@ -1,155 +0,0 @@ -/*********************************************************************** - created: 22/2/2011 - author: Martin Preisler - - purpose: Defines base (and default) layout cell class -*************************************************************************/ -/*************************************************************************** - * Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - ***************************************************************************/ -#ifndef _CEGUILayoutCell_h_ -#define _CEGUILayoutCell_h_ - -#include "../Window.h" - -#include - -#if defined(_MSC_VER) -# pragma warning(push) -# pragma warning(disable : 4251) -#endif - -// Start of CEGUI namespace section -namespace CEGUI -{ - -/*! -\brief - Represents a cell in a layout container - -\par - Layout cell's role is to encapsulate widgets inside a layout container. - It also contains a "Margin" property to set contained widget's margin on - all 4 edges. - - Unless you want to set the margin, you should never encounter this class. - Everything is encapsulated automatically when adding widgets into layout - containers. You will however see instances of this class inside XML layout - files. -*/ -class CEGUIEXPORT LayoutCell : public Window -{ -public: - /************************************************************************* - Event name constants - *************************************************************************/ - //! Namespace for events - static const String EventNamespace; - //! Window factory name - static const String WidgetTypeName; - - /*! - \brief - Constructor for LayoutCell class - - \param type - String object holding Window type (usually provided by WindowFactory). - - \param name - String object holding unique name for the Window. - */ - LayoutCell(const String& type, const String& name); - - /*! - \brief - Destructor - */ - virtual ~LayoutCell(void); - - virtual const CachedRectf& getClientChildContentArea() const; - - virtual void notifyScreenAreaChanged(bool recursive); - -protected: - /// @copydoc Window::getUnclippedInnerRect_impl - virtual Rectf getUnclippedInnerRect_impl(bool skipAllPixelAlignment) const; - - Rectf getClientChildContentArea_impl(bool skipAllPixelAlignment) const; - - /// @copydoc Window::addChild_impl - virtual void addChild_impl(Element* element); - /// @copydoc Window::removeChild_impl - virtual void removeChild_impl(Element* element); - - /************************************************************************* - Event trigger methods - *************************************************************************/ - /*! - \brief - Handler called when child window gets sized - - \param e - WindowEventArgs object whose 'window' pointer field is set to the - window that triggered the event. For this event the trigger window is - the one that was sized. - */ - virtual bool handleChildSized(const EventArgs& e); - - /*! - \brief - Handler called when child window gets added - - \param e - WindowEventArgs object whose 'window' pointer field is set to the - window that triggered the event. For this event the trigger window is - the one that was added. - */ - virtual bool handleChildAdded(const EventArgs& e); - - /*! - \brief - Handler called when child window gets removed - - \param e - WindowEventArgs object whose 'window' pointer field is set to the - window that triggered the event. For this event the trigger window is - the one that was removed. - */ - virtual bool handleChildRemoved(const EventArgs& e); - - /************************************************************************* - Implementation Data - *************************************************************************/ - typedef std::multimap ConnectionTracker; - //! Tracks event connections we make. - ConnectionTracker d_eventConnections; - - CachedRectf d_clientChildContentArea; -}; - -} // End of CEGUI namespace section - -#if defined(_MSC_VER) -# pragma warning(pop) -#endif - -#endif // end of guard _CEGUILayoutCell_h_ diff --git a/cegui/src/System.cpp b/cegui/src/System.cpp index 37cd96475..272c43f69 100644 --- a/cegui/src/System.cpp +++ b/cegui/src/System.cpp @@ -691,7 +691,6 @@ void System::addStandardWindowFactories() WindowFactoryManager::addWindowType(); WindowFactoryManager::addWindowType(); WindowFactoryManager::addWindowType(); - WindowFactoryManager::addWindowType(); WindowFactoryManager::addWindowType(); WindowFactoryManager::addWindowType(); WindowFactoryManager::addWindowType(); diff --git a/cegui/src/widgets/LayoutCell.cpp b/cegui/src/widgets/LayoutCell.cpp deleted file mode 100644 index 7d7204548..000000000 --- a/cegui/src/widgets/LayoutCell.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/*********************************************************************** - created: 22/2/2011 - author: Martin Preisler - - purpose: Implements the LayoutCell class -*************************************************************************/ -/*************************************************************************** - * Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - ***************************************************************************/ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "CEGUI/widgets/LayoutCell.h" - -#if defined(_MSC_VER) -# pragma warning(push) -# pragma warning(disable : 4355) -#endif - -// Start of CEGUI namespace section -namespace CEGUI -{ - -const String LayoutCell::EventNamespace("LayoutCell"); -const String LayoutCell::WidgetTypeName("LayoutCell"); - -//----------------------------------------------------------------------------// -LayoutCell::LayoutCell(const String& type, const String& name): - Window(type, name), - - d_clientChildContentArea(this, static_cast(&LayoutCell::getClientChildContentArea_impl)) -{ - // cell should take the whole window by default I think - setSize(USize(cegui_reldim(1), cegui_reldim(1))); - - subscribeEvent(Window::EventChildAdded, - Event::Subscriber(&LayoutCell::handleChildAdded, this)); - subscribeEvent(Window::EventChildRemoved, - Event::Subscriber(&LayoutCell::handleChildRemoved, this)); -} - -//----------------------------------------------------------------------------// -LayoutCell::~LayoutCell(void) -{} - -const Element::CachedRectf& LayoutCell::getClientChildContentArea() const -{ - if (!d_parent) - { - return Window::getClientChildContentArea(); - } - else - { - return d_clientChildContentArea; - } -} - -//----------------------------------------------------------------------------// -void LayoutCell::notifyScreenAreaChanged(bool recursive) -{ - d_clientChildContentArea.invalidateCache(); - - Window::notifyScreenAreaChanged(recursive); -} - -//----------------------------------------------------------------------------// -Rectf LayoutCell::getUnclippedInnerRect_impl(bool skipAllPixelAlignment) const -{ - return d_parent ? - (skipAllPixelAlignment ? d_parent->getUnclippedInnerRect().getFresh(true) : d_parent->getUnclippedInnerRect().get()) : - Window::getUnclippedInnerRect_impl(skipAllPixelAlignment); -} - -//----------------------------------------------------------------------------// -Rectf LayoutCell::getClientChildContentArea_impl(bool skipAllPixelAlignment) const -{ - if (!d_parent) - { - return skipAllPixelAlignment ? Window::getClientChildContentArea().getFresh(true) : Window::getClientChildContentArea().get(); - } - else - { - return skipAllPixelAlignment ? - Rectf(getUnclippedOuterRect().getFresh(true).getPosition(), d_parent->getUnclippedInnerRect().getFresh(true).getSize()) : - Rectf(getUnclippedOuterRect().get().getPosition(), d_parent->getUnclippedInnerRect().get().getSize()); - } -} - -//----------------------------------------------------------------------------// -void LayoutCell::addChild_impl(Element* element) -{ - Window* wnd = dynamic_cast(element); - - if (!wnd) - CEGUI_THROW(InvalidRequestException( - "LayoutCell can only have Elements of type Window added as children " - "(Window path: " + getNamePath() + ").")); - - Window::addChild_impl(wnd); - - // we have to subscribe to the EventSized for layout updates - d_eventConnections.insert(std::make_pair(wnd, - wnd->subscribeEvent(Window::EventSized, - Event::Subscriber(&LayoutCell::handleChildSized, this)))); -} - -//----------------------------------------------------------------------------// -void LayoutCell::removeChild_impl(Element* element) -{ - Window* wnd = static_cast(element); - - // we want to get rid of the subscription, because the child window could - // get removed and added somewhere else, we would be wastefully updating - // layouts if it was sized inside other Window - ConnectionTracker::iterator conn; - - while ((conn = d_eventConnections.find(wnd)) != d_eventConnections.end()) - { - conn->second->disconnect(); - d_eventConnections.erase(conn); - } - - Window::removeChild_impl(wnd); -} - -//----------------------------------------------------------------------------// -bool LayoutCell::handleChildSized(const EventArgs&) -{ - //markNeedsLayouting(); - - return true; -} - -//----------------------------------------------------------------------------// -bool LayoutCell::handleChildAdded(const EventArgs&) -{ - if (getChildCount() > 0) - { - CEGUI_THROW(InvalidRequestException( - "You can't add more than one widget to a layout cell!")); - } - - //markNeedsLayouting(); - - return true; -} - -//----------------------------------------------------------------------------// -bool LayoutCell::handleChildRemoved(const EventArgs&) -{ - //markNeedsLayouting(); - - return true; -} - -#if defined(_MSC_VER) -# pragma warning(pop) -#endif - - -} // End of CEGUI namespace section From e9642850bfedff010805c937b0814bbb0ad53236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Fri, 30 Jan 2015 19:49:29 +0200 Subject: [PATCH 14/16] Removed unnecessary include --- cegui/include/CEGUI/RendererModules/Ogre/GeometryBuffer.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/cegui/include/CEGUI/RendererModules/Ogre/GeometryBuffer.h b/cegui/include/CEGUI/RendererModules/Ogre/GeometryBuffer.h index 98cc7d2a2..c71edbb5c 100644 --- a/cegui/include/CEGUI/RendererModules/Ogre/GeometryBuffer.h +++ b/cegui/include/CEGUI/RendererModules/Ogre/GeometryBuffer.h @@ -37,8 +37,6 @@ #include #include -#include - #include #include From 215ff39edee5380586a1fa4bc3aae0aca71e041f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Tue, 3 Feb 2015 18:39:19 +0200 Subject: [PATCH 15/16] Added an experimental function to allow multiple Ogre windows --- cegui/include/CEGUI/RendererModules/Ogre/Renderer.h | 7 +++++++ cegui/src/RendererModules/Ogre/Renderer.cpp | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/cegui/include/CEGUI/RendererModules/Ogre/Renderer.h b/cegui/include/CEGUI/RendererModules/Ogre/Renderer.h index 8609e8b52..23707331e 100644 --- a/cegui/include/CEGUI/RendererModules/Ogre/Renderer.h +++ b/cegui/include/CEGUI/RendererModules/Ogre/Renderer.h @@ -178,6 +178,13 @@ class OGRE_GUIRENDERER_API OgreRenderer : public Renderer static OgreRenderer& create(Ogre::RenderTarget& target, const int abi = CEGUI_VERSION_ABI); + /*! + \brief + Creates a new renderer that can be used to create a context on a new Ogre window + */ + static OgreRenderer& registerWindow(OgreRenderer& main_window, + Ogre::RenderTarget &new_window); + //! destroy an OgreRenderer object. static void destroy(OgreRenderer& renderer); diff --git a/cegui/src/RendererModules/Ogre/Renderer.cpp b/cegui/src/RendererModules/Ogre/Renderer.cpp index 41e4420cb..4810206ea 100644 --- a/cegui/src/RendererModules/Ogre/Renderer.cpp +++ b/cegui/src/RendererModules/Ogre/Renderer.cpp @@ -315,6 +315,15 @@ OgreResourceProvider& OgreRenderer::createOgreResourceProvider() return *new OgreResourceProvider(); } +//----------------------------------------------------------------------------// +OgreRenderer& OgreRenderer::registerWindow(OgreRenderer& main_window, + Ogre::RenderTarget &new_window) +{ + // Link the second renderer to the first for them to share some resources + + return *new OgreRenderer(new_window); +} + //----------------------------------------------------------------------------// #ifdef CEGUI_USE_OGRE_COMPOSITOR2 void OgreRenderer::createOgreCompositorResources() From 6f00952d31f318f9482766d1ad2206cb540a78b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Tue, 3 Feb 2015 18:45:24 +0200 Subject: [PATCH 16/16] Fixed compiling samples with newer Ogre 2.0, Compositor won't be tried to initialize --- samples/browser/src/CEGuiOgreBaseApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/browser/src/CEGuiOgreBaseApplication.cpp b/samples/browser/src/CEGuiOgreBaseApplication.cpp index 744c3927f..b85908ade 100644 --- a/samples/browser/src/CEGuiOgreBaseApplication.cpp +++ b/samples/browser/src/CEGuiOgreBaseApplication.cpp @@ -121,7 +121,7 @@ CEGuiOgreBaseApplication::CEGuiOgreBaseApplication() : // The compositor has to be initialized if (!manager) { - d_ogreRoot->initialiseCompositor(); + assert(false && "No function to initialize Ogre::CompositorManager2..."); manager = d_ogreRoot->getCompositorManager2(); }