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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/*
Copyright (c) 2017 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 _DISPLAY_WINDOW_INL_
#define _DISPLAY_WINDOW_INL_

namespace Divide {

    inline SDL_Window* DisplayWindow::getRawWindow() const {
        return _sdlWindow;
    }

    inline bool DisplayWindow::fullscreen() const {
        return type() == WindowType::FULLSCREEN ||
               type() == WindowType::FULLSCREEN_WINDOWED;
    }

    inline void DisplayWindow::setPosition(I32 positionX, I32 positionY) {
        _windowPosition.set(positionX, positionY);
        setPositionInternal(positionX, positionY);
    }

    inline void DisplayWindow::setPosition(const vec2<I32>& position) {
        setPosition(position.x, position.y);
    }

    inline const vec2<I32>& DisplayWindow::getPosition() const {
        return _windowPosition;
    }

    inline bool DisplayWindow::swapBuffers() const {
        return _swapBuffers;
    }

    inline void DisplayWindow::swapBuffers(const bool state) {
        _swapBuffers = state;
    }

    inline bool DisplayWindow::hasFocus() const {
        return _hasFocus;
    }

    inline void DisplayWindow::hasFocus(const bool state) {
        _hasFocus = state;
    }

    inline U8 DisplayWindow::opacity() const {
        return _opacity;
    }

    inline void DisplayWindow::clearColour(const FColour& colour, bool force) {
        _clearColour.set(colour);
        if (force) {
            _clearColourOriginal.set(colour);
        }
    }

    inline FColour& DisplayWindow::clearColour() {
        return _clearColour;
    }

    inline const FColour& DisplayWindow::clearColour() const {
        return _clearColour;
    }

    inline FColour& DisplayWindow::originalClearColour() {
        return _clearColourOriginal;
    }

    inline const FColour& DisplayWindow::originalClearColour() const {
        return _clearColourOriginal;
    }

    inline bool DisplayWindow::minimized() const {
        return _minimized;
    }

    inline bool DisplayWindow::maximized() const {
        return _maximized;
    }


    inline bool DisplayWindow::hidden() const {
        return _hidden;
    }

    inline WindowType DisplayWindow::type() const {
        return _type;
    }

    inline void DisplayWindow::changeType(WindowType newType) {
        if (newType != _type) {
            _queuedType = newType;
            handleChangeWindowType(_queuedType);
        }
    }

    inline void DisplayWindow::changeToPreviousType() {
        changeType(_previousType);
    }

    inline const stringImpl& DisplayWindow::title() const {
        return _title;
    }

    inline const WindowHandle& DisplayWindow::handle() const { 
        return _handle;
    }

    inline void DisplayWindow::addEventListener(WindowEvent windowEvent, const EventListener& listener) {
        _eventListeners[to_base(windowEvent)].push_back(listener);
    }

    inline Input::InputInterface& DisplayWindow::inputHandler() {
        return *_inputHandler;
    }

    inline void DisplayWindow::destroyCbk(const DELEGATE_CBK<void>& destroyCbk) {
        _destroyCbk = destroyCbk;
    }

    inline bool DisplayWindow::warp() const {
        return _warp;
    }

    inline const Rect<I32>& DisplayWindow::warpRect() const {
        return _warpRect;
    }

    inline const Rect<I32>& DisplayWindow::renderingViewport() const {
        return _renderingViewport;
    }
}; //namespace Divide

#endif //_DISPLAY_WINDOW_INL_

Commits for Divide-Framework/trunk/Source Code/Platform/Headers/DisplayWindow.inl

Diff revisions: vs.
Revision Author Commited Message
1004 Diff Diff IonutCava picture IonutCava Wed 20 Dec, 2017 17:16:32 +0000

[Ionut]
- More GUI cleanup (added multiple GUIButton events)
- Typedef vec4<U8> and vec4<F32> to UColour and FColour respectively for easier to read code.

988 Diff Diff IonutCava picture IonutCava Thu 30 Nov, 2017 23:08:51 +0000

[Ionut]
- Add a Rect class (basic wrapper around a vec4)
- More work on MouseEvent system

985 Diff Diff IonutCava picture IonutCava Tue 28 Nov, 2017 23:54:21 +0000

[Ionut]
- Started adapting mouse input events to handle viewport shifts

976 Diff Diff IonutCava picture IonutCava Sun 19 Nov, 2017 23:10:18 +0000

[Ionut]
- Texture mipmaps are now compute before bind if they need a refresh (to avoid recalculation if they’re not used)
- More work on the editor: cleanup, load/save functionality, etc
- Input scaling: Mouse position is now relative to the scene preview position in editor mode. (the scene preview rect is used to re-map X/Y absolute and relative mouse positions)

970 Diff Diff IonutCava picture IonutCava Mon 13 Nov, 2017 17:16:44 +0000

[Ionut]
- ImWindow <-> DisplayWindow fixes

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

961 Diff Diff IonutCava picture IonutCava Thu 02 Nov, 2017 23:24:10 +0000

[Ionut]
- IMGUI rendering work

952 Diff Diff IonutCava picture IonutCava Wed 25 Oct, 2017 00:35:37 +0000

[Ionut]
- Added the CEGUI rendering project to our solution for easier modification, debugging and integration
- Updated to OIS 1.4
- Some updates to the WindowHandle struct

  • Only compiled in Debug*
951 Diff Diff IonutCava picture IonutCava Mon 23 Oct, 2017 23:25:49 +0000

[Ionut]
- Added a new project to the solution: Divide-Editor
— This project will be a Unity-style tool for the framework built using IMGUI and ImWindow
— Examples:

- Modified DisplayWindow class heavily to support new requirements

950 IonutCava picture IonutCava Sun 22 Oct, 2017 22:25:05 +0000

[Ionut]
- Revamp camera management
- More work on improving the command buffer system:
— Performance tweaks
— Validation
— Debug features
- Some code cleanup for Object3D stuff (preRender/onRender changes)

Still haven’t fixed random flashing issue