Commit Graph

32 Commits

Author SHA1 Message Date
urhobot
f861a10a61 GH Actions: Bump copyright to 2021. 2021-07-17 16:43:46 +00:00
urho3d-travis-ci
1151b8a2d6 Travis CI: bump copyright to 2020. 2020-01-05 06:21:40 +00:00
urho3d-travis-ci
a476f0c401 Travis CI: bump copyright to 2019. 2019-01-12 01:00:16 +00:00
urho3d-travis-ci
70049ba582 Travis CI: bump copyright to 2018.
[cache clear]
2018-01-01 05:35:37 +00:00
Yao Wei Tjong 姚伟忠
ca97fd9b9b Clang-Tidy - modernize-use-auto. 2017-12-31 12:46:26 +08:00
Lasse Öörni
df669fbe1b Restore earlier HelloGUI sample, instead create separate Hello3DUI which demonstrates 3D UI render to texture. Move getting viewport related to scene from Scene to Renderer, so that Scene doesn't have to know about Renderer unnecessarily. Refactor the internal UI render calls related to rendertarget use. 2017-08-23 21:15:56 +03:00
Rokas Kupstys
6fc2c19baa More code cleanups.
* Moved `UIComponent::GetViewport()` to `Scene` class.
* Simplified resource initialization of `UIComponent` and removed need of overriding `IsEnabled()`.
* Renamed `UIComponent::GetElement()` to `GetRoot()` to be more consistent with UI subsystem.
* Removed ability to set root UI element to `UIComponent`, instead to add UI elements should be added as children to element renturned by `UIComponent::GetRoot()`.
* Cleaned up debug rendering in HelloGUI sample. Debug data is now rendered after pressing F2.
2017-08-20 10:55:58 +03:00
Rokas Kupstys
16ee7e1121 * Changed UIComponent::IsValid() to overriden UIComponent::IsEnabled()
* Separated batches and vertex buffers of normal UI and UI rendered to texture.
* Cleaned up `Render()` method adding additional `surface` parameter to render into. Passing null renders on to screen.
Support for rendering UI to texture.

This change adds support for rendering GUI into a texture. This is achieved by adding `UIComponent` component to `Node`. `UIComponent` overrides material of `Node`'s `StaticModel`. UI subsystem is changed so that batches belonging to UI elements owned by `UIComponent` are rendered into a texture that is also contained in `UIComponent`. Input is handled by UI subsystem, so anything that worked on normal UI will work on UI rendered on to 3D object. This required a minor change for input handling. Previously "screen" was considered surface of entire window. Now screen is considered area of root_element_position + root_element_size. This is fully backwards-compatible.

There is one issue i am unable to solve: since on OpenGL texture coordinates start from bottom-left corner a workaround is needed. Texture is flipped by projection matrix, however it breaks scissor test. I do not know how to properly fix it therefore scissor test is disabled when rendering into texture on OpenGL. Issue is clearly visible when scrolling a `ListView` in `HelloGUI` sample when UI is rendered on to a cube.

Other changes: lua and angelscript bindings, HelloGUI sample can toggle between rendering on screen or rendering on cube, added a ListView to HelloGUI sample window. `UI::DebugDraw()` support.
2017-08-19 20:33:00 +03:00
urho3d-travis-ci
ee054a1507 Travis CI: bump copyright to 2017.
[ccache clear]
2017-01-01 13:01:31 +00:00
Yao Wei Tjong 姚伟忠
fd9db884b4 Add template version of UIElement::GetChild() methods. 2016-07-11 19:17:52 +08:00
hdunderscore
467c4bd4e8 - Updated sample mouse mode setup.
- (Web) Removed some of the exit engine logic.
2016-03-27 20:01:22 +11:00
urho3d-travis-ci
c4f6f315ff Travis CI: bump copyright to 2016.
[ccache clear]
2016-01-26 13:55:03 +00:00
Lasse Öörni
94a7f4ef63 Make UI element layouting not modify the user assigned minSize. Instead keep record of the min.size required by layout separately. Fix HelloGUI sample to the new behavior. Closes #955. 2015-10-29 17:22:53 +02:00
Ivan K
31f3c9ab65 DEFINE_APPLICATION_MAIN -> URHO3D_DEFINE_APPLICATION_MAIN 2015-10-21 23:08:28 +04:00
Ivan K
4bcbae61fe HANDLER -> URHO3D_HANDLER 2015-10-21 21:49:02 +04:00
Yao Wei Tjong 姚伟忠
c2471a240a Reorganize includes for Samples and Extras.
Since the URHO3D_PCH build option is made available to support non-PCH build, our build system does not rely on precompiled header to include the Urho3D.h export header anymore. The export header is auto-included by one of Urho3D headers when it is required using the right format with the help of URHO3D_IS_BUILDING compiler define. As such, there is no need to explicitly include Urho3D.h in external project too. Sorry for the flip-flop.
2015-08-27 18:07:20 +08:00
aster2013
349a3ee981 Sort include file in samples. 2015-08-27 13:54:54 +08:00
Lasse Öörni
bb2ebf7568 Bump copyright to 2015. 2015-01-31 21:03:53 +02:00
Yao Wei Tjong 姚伟忠
ed214bbeb3 Avoid the include dirs hack for finding the Urho3D.h header.
It is now a library user own's responsibility to include the Urho3D.h in their source code. Or to include it as part of their own precompiled header similar to what Urho3D project has done.
2015-01-20 18:15:29 +08:00
Yao Wei Tjong 姚伟忠
359efb2d37 Move the DebugNew.h from Urho3D/Container subdir to Urho3D subdir. 2015-01-05 22:31:32 +08:00
Yao Wei Tjong 姚伟忠
b51e419c88 Change impl. file to include the header file from corresponding subdir.
Change header file to use relative pathspec when including other files.
2015-01-04 22:40:40 +08:00
Yao Wei Tjong 姚伟忠
4feb135281 Clean up SDK include dirs. Refactor FindUrho3D CMake module.
For Travis CI - add new steps to install the Urho3D SDK and to reference Urho3D library from the installed SDK.
2015-01-04 22:32:41 +08:00
Yao Wei Tjong 姚伟忠
b5f9b52717 Minor fixes on C++ ConsoleInput sample class. 2014-03-04 11:39:36 +08:00
Lasse Öörni
076b333124 Simplify pointer usage in HelloGUI example. 2014-02-21 10:25:33 +02:00
Lasse Öörni
fd140ddb32 Minor code reorganization of the HelloGUI example. Removed SubscribeToEvents() as it was only used for 1 event and events were also subscribed to elsewhere. 2014-02-11 21:41:57 +02:00
Mike3D
a0f42bee35 Added drag and tooltip to sample#2 HelloGUI 2014-02-11 09:49:53 +01:00
Lasse Öörni
6d5ddc23e0 Bump the copyright for 2014. 2014-02-01 14:37:21 +02:00
Lasse Öörni
10abc4414b Ported HelloGUI sample to script. 2013-08-29 15:53:55 +00:00
Lasse Öörni
04b00263b0 Moved CharacterDemo to the samples.
Use forward declarations in the samples.
2013-08-27 21:45:43 +00:00
Lasse Öörni
056acfcc68 Added sound effects example. 2013-08-25 09:20:56 +00:00
Lasse Öörni
1ef35d353c Added skeletal animation sample.
Fixed build of samples.
Removed line to disable MinSizeRel build type in CMake script as it seems to have no effect any longer.
Removed unused function to get AnimationState by C string of animation name.
2013-08-17 18:38:07 +00:00
Wei Tjong Yao
02512cecf9 In order to move the out-of-source 'build' directory back to Urho3D project root directory, all the source codes sub-directories are now moved down one level to a new directory under project root called 'Source'. 2013-08-09 10:29:22 +00:00