Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
Copyright (c) 2018 DIVIDE-Studio
Copyright (c) 2009 Ionut Cava

This file is part of DIVIDE Framework.

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 OR COPYRIGHT HOLDERS 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 _CORE_WINDOW_MANAGER_INL_
#define _CORE_WINDOW_MANAGER_INL_

namespace Divide {

inline I32 WindowManager::targetDisplay() const {
    return _displayIndex;
}

inline void WindowManager::targetDisplay(I32 displayIndex) {
    _displayIndex = displayIndex;
}

inline U32 WindowManager::getWindowCount() const {
    return to_U32(_windows.size());
}

inline DisplayWindow& WindowManager::getWindow(I64 guid) {
    for (DisplayWindow* win : _windows) {
        if (win->getGUID() == guid) {
            return *win;
        }
    }

    return *_windows.front();
}

inline const DisplayWindow& WindowManager::getWindow(I64 guid) const {
    for (const DisplayWindow* win : _windows) {
        if (win->getGUID() == guid) {
            return *win;
        }
    }

    return *_windows.front();
}

inline DisplayWindow& WindowManager::getActiveWindow() {
    return getWindow(_activeWindowGUID);
}

inline const DisplayWindow& WindowManager::getActiveWindow() const {
    return getWindow(_activeWindowGUID);
}

inline DisplayWindow& WindowManager::getWindow(U32 index) {
    assert(index < to_U32(_windows.size()));
    return *_windows[index];
}

inline const DisplayWindow& WindowManager::getWindow(U32 index) const {
    assert(index < to_U32(_windows.size()));
    return *_windows[index];
}

}; //namespace Divide

#endif //_CORE_WINDOW_MANAGER_INL_

Commits for Divide-Framework/trunk/Source Code/Core/Headers/WindowManager.inl

Diff revisions: vs.
Revision Author Commited Message
1029 Diff Diff IonutCava picture IonutCava Tue 30 Jan, 2018 17:28:39 +0000

[Ionut]
- Update copyright notices

969 Diff Diff IonutCava picture IonutCava Mon 13 Nov, 2017 00:15:57 +0000

[Ionut]
- Further improve DisplayWindow <-> Input relationship
- Add Flip-Y 2D camera (D3D style projection)
- Fix IMGUI rendering
- Add IMGUI sample and IMWINDOW sample rendering at the same time
- Improve IMWINDOW multi-window support
— Bug: nothing rendering in child platform windows
- Add draw command to move render context from one window to another

962 Diff Diff IonutCava picture IonutCava Fri 03 Nov, 2017 17:17:55 +0000

[Ionut]
- Fix creation/destruction of multiple DisplayWindows
- Add an InputInterface per DisplayWindow
- More work on the ImWindow based Editor

836 Diff Diff IonutCava picture IonutCava Fri 27 Jan, 2017 14:59:56 +0000

[IonutCava]
- Update copyright notice

818 Diff Diff IonutCava picture IonutCava Mon 16 Jan, 2017 17:23:20 +0000

[IonutCava]
- Units get their bound node setup by the SGN UnitComponent and not during creation
- Profile guided optimizations

654 Diff Diff IonutCava picture IonutCava Tue 01 Mar, 2016 17:22:09 +0000

[Ionut]
- Moved window related code from rendering API code into proper classes:
— DisplayWindow handles SDL based window management
— WindowManager handles multiple DisplayWindow instances
— Code still needs proper extensive testing
- Small performance optimizations

648 Diff Diff IonutCava picture IonutCava Sun 21 Feb, 2016 16:32:52 +0000

[IonutCava]
- Update copyright notice
- Move BoundingBox and BoundingSphere to a new BoundsComponent
— Add a temp hack in SceneGraphNode to update these

628 Diff Diff IonutCava picture IonutCava Wed 20 Jan, 2016 17:17:53 +0000

[IonutCava]
- Reworked GenericVertexData ring-buffering system and changed vertex attributes to the vertex format system
— Might be buggy
- Disabled bump-mapping for low-LoD level entities
- Removed a forgotten test line in BRDF shader that prevented lighting calculations to occur properly (an early return)
- Updated auto-reflection system for high shininess materials
- Converted a lot of ‘to_xyz’ calls to ‘to_const_xyz’ calls where appropriate to reduce runtime cost (‘to_const_xyz’ is evaluated at compile time)

565 Diff Diff IonutCava picture IonutCava Fri 13 Nov, 2015 16:39:03 +0000

[IonutCava]
- Implemented SSE functionality to the float specializations of vec4 and mat4 (some scalar operations are still used for now)
- Cleaned up some redundant static casts

513 IonutCava picture IonutCava Mon 21 Sep, 2015 16:04:28 +0000

[IonutCava]
- Some code cleanup