Cleaned-up NativeWindow PR
assiduous
3 years ago
29 | 29 | /// \file |
30 | 30 | /// Diligent API information |
31 | 31 | |
32 | #define DILIGENT_API_VERSION 240052 | |
32 | #define DILIGENT_API_VERSION 240053 | |
33 | 33 | |
34 | 34 | #include "../../../Primitives/interface/BasicTypes.h" |
35 | 35 |
6 | 6 | interface/AndroidFileSystem.hpp |
7 | 7 | interface/AndroidPlatformDefinitions.h |
8 | 8 | interface/AndroidPlatformMisc.hpp |
9 | interface/AndroidNativeWindow.hpp | |
9 | interface/AndroidNativeWindow.h | |
10 | 10 | ) |
11 | 11 | |
12 | 12 | set(SOURCE |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct AndroidNativeWindow | |
34 | { | |
35 | void* pAWindow DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct AndroidNativeWindow | |
34 | { | |
35 | void* pAWindow DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent⏎ |
2 | 2 | project(Diligent-ApplePlatform CXX) |
3 | 3 | |
4 | 4 | if(PLATFORM_MACOS) |
5 | set(APPLE_NATIVE_WINDOW_H interface/MacOSNativeWindow.hpp) | |
5 | set(APPLE_NATIVE_WINDOW_H interface/MacOSNativeWindow.h) | |
6 | 6 | elseif(PLATFORM_IOS) |
7 | set(APPLE_NATIVE_WINDOW_H interface/IOSNativeWindow.hpp) | |
7 | set(APPLE_NATIVE_WINDOW_H interface/IOSNativeWindow.h) | |
8 | 8 | endif() |
9 | 9 | |
10 | 10 | set(INTERFACE |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct IOSNativeWindow | |
34 | { | |
35 | void* pNSView DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct IOSNativeWindow | |
34 | { | |
35 | void* pNSView DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct MacOSNativeWindow | |
34 | { | |
35 | void* pNSWindow DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct MacOSNativeWindow | |
34 | { | |
35 | void* pNSWindow DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent⏎ |
6 | 6 | interface/LinuxFileSystem.hpp |
7 | 7 | interface/LinuxPlatformDefinitions.h |
8 | 8 | interface/LinuxPlatformMisc.hpp |
9 | interface/LinuxNativeWindow.hpp | |
9 | interface/LinuxNativeWindow.h | |
10 | 10 | ) |
11 | 11 | |
12 | 12 | set(SOURCE |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct LinuxNativeWindow | |
34 | { | |
35 | void* pDisplay DEFAULT_INITIALIZER(nullptr); | |
36 | void* pWindow DEFAULT_INITIALIZER(nullptr); | |
37 | }; | |
38 | ||
39 | DILIGENT_END_NAMESPACE // namespace Diligent |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct LinuxNativeWindow | |
34 | { | |
35 | void* pDisplay DEFAULT_INITIALIZER(nullptr); | |
36 | void* pWindow DEFAULT_INITIALIZER(nullptr); | |
37 | }; | |
38 | ||
39 | DILIGENT_END_NAMESPACE // namespace Diligent⏎ |
5 | 5 | interface/UWPDebug.hpp |
6 | 6 | interface/UWPFileSystem.hpp |
7 | 7 | interface/UWPDefinitions.h |
8 | interface/UWPNativeWindow.hpp | |
8 | interface/UWPNativeWindow.h | |
9 | 9 | ../Win32/interface/Win32Atomics.hpp |
10 | 10 | ) |
11 | 11 | |
32 | 32 | ) |
33 | 33 | |
34 | 34 | source_group("src" FILES ${SOURCE}) |
35 | source_group("include" FILES ${INCLUDE}) | |
36 | source_group("interface" FILES ${PLATFORM_INTERFACE_HEADERS}) | |
35 | source_group("interface\\UWP" FILES ${INTERFACE}) | |
36 | source_group("interface\\common" FILES ${PLATFORM_INTERFACE_HEADERS}) | |
37 | 37 | |
38 | 38 | set_target_properties(Diligent-UniversalWindowsPlatform PROPERTIES |
39 | 39 | FOLDER DiligentCore/Platforms |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct UWPNativeWindow | |
34 | { | |
35 | void* pWindow DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct UWPNativeWindow | |
34 | { | |
35 | void* pWindow DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent⏎ |
7 | 7 | interface/Win32FileSystem.hpp |
8 | 8 | interface/Win32PlatformDefinitions.h |
9 | 9 | interface/Win32PlatformMisc.hpp |
10 | interface/Win32NativeWindow.hpp | |
10 | interface/Win32NativeWindow.h | |
11 | 11 | ) |
12 | 12 | |
13 | 13 | set(SOURCE |
34 | 34 | ) |
35 | 35 | |
36 | 36 | source_group("src" FILES ${SOURCE}) |
37 | source_group("include" FILES ${INCLUDE}) | |
38 | source_group("interface" FILES ${PLATFORM_INTERFACE_HEADERS}) | |
37 | source_group("interface\\win32" FILES ${INTERFACE}) | |
38 | source_group("interface\\common" FILES ${PLATFORM_INTERFACE_HEADERS}) | |
39 | 39 | |
40 | 40 | set_target_properties(Diligent-Win32Platform PROPERTIES |
41 | 41 | FOLDER DiligentCore/Platforms |
43 | 43 | |
44 | 44 | if(DILIGENT_INSTALL_CORE) |
45 | 45 | install_core_lib(Diligent-Win32Platform) |
46 | endif()⏎ | |
46 | endif() |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct Win32NativeWindow | |
34 | { | |
35 | void* hWnd DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent |
0 | /* | |
1 | * Copyright 2019-2020 Diligent Graphics LLC | |
2 | * Copyright 2015-2019 Egor Yusov | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * In no event and under no legal theory, whether in tort (including negligence), | |
17 | * contract, or otherwise, unless required by applicable law (such as deliberate | |
18 | * and grossly negligent acts) or agreed to in writing, shall any Contributor be | |
19 | * liable for any damages, including any direct, indirect, special, incidental, | |
20 | * or consequential damages of any character arising as a result of this License or | |
21 | * out of the use or inability to use the software (including but not limited to damages | |
22 | * for loss of goodwill, work stoppage, computer failure or malfunction, or any and | |
23 | * all other commercial damages or losses), even if such Contributor has been advised | |
24 | * of the possibility of such damages. | |
25 | */ | |
26 | ||
27 | #pragma once | |
28 | ||
29 | #include "../../../Primitives/interface/CommonDefinitions.h" | |
30 | ||
31 | DILIGENT_BEGIN_NAMESPACE(Diligent) | |
32 | ||
33 | struct Win32NativeWindow | |
34 | { | |
35 | void* hWnd DEFAULT_INITIALIZER(nullptr); | |
36 | }; | |
37 | ||
38 | DILIGENT_END_NAMESPACE // namespace Diligent⏎ |
30 | 30 | |
31 | 31 | #if PLATFORM_WIN32 |
32 | 32 | |
33 | # include "../Win32/interface/Win32NativeWindow.hpp" | |
33 | # include "../Win32/interface/Win32NativeWindow.h" | |
34 | 34 | |
35 | 35 | #elif PLATFORM_UNIVERSAL_WINDOWS |
36 | 36 | |
37 | # include "../UWP/interface/UWPNativeWindow.hpp" | |
37 | # include "../UWP/interface/UWPNativeWindow.h" | |
38 | 38 | |
39 | 39 | #elif PLATFORM_ANDROID |
40 | 40 | |
41 | # include "../Android/interface/AndroidNativeWindow.hpp" | |
41 | # include "../Android/interface/AndroidNativeWindow.h" | |
42 | 42 | |
43 | 43 | #elif PLATFORM_LINUX |
44 | 44 | |
45 | # include "../Linux/interface/LinuxNativeWindow.hpp" | |
45 | # include "../Linux/interface/LinuxNativeWindow.h" | |
46 | 46 | |
47 | 47 | #elif PLATFORM_MACOS |
48 | 48 | |
49 | # include "../Apple/interface/MacOSNativeWindow.hpp" | |
49 | # include "../Apple/interface/MacOSNativeWindow.h" | |
50 | 50 | |
51 | 51 | #elif PLATFORM_IOS |
52 | 52 | |
53 | # include "../Apple/interface/IOSNativeWindow.hpp" | |
53 | # include "../Apple/interface/IOSNativeWindow.h" | |
54 | 54 | |
55 | 55 | #else |
56 | # error Unknown platform. Please define one of the following macros as 1: PLATFORM_WIN32, PLATFORM_UNIVERSAL_WINDOWS, PLATFORM_ANDROID, PLATFORM_LINUX, PLATFORM_MACOS, PLATFORM_IOS. | |
56 | # error Unknown platform. Please define one of the following macros as 1: PLATFORM_WIN32, PLATFORM_UNIVERSAL_WINDOWS, PLATFORM_ANDROID, PLATFORM_LINUX, PLATFORM_MACOS, PLATFORM_IOS. | |
57 | 57 | #endif |
58 | 58 | |
59 | 59 | DILIGENT_BEGIN_NAMESPACE(Diligent) |
83 | 83 | typedef struct IOSNativeWindow NativeWindow; |
84 | 84 | |
85 | 85 | #else |
86 | # error Unknown platform. Please define one of the following macros as 1: PLATFORM_WIN32, PLATFORM_UNIVERSAL_WINDOWS, PLATFORM_ANDROID, PLATFORM_LINUX, PLATFORM_MACOS, PLATFORM_IOS. | |
86 | # error Unknown platform. Please define one of the following macros as 1: PLATFORM_WIN32, PLATFORM_UNIVERSAL_WINDOWS, PLATFORM_ANDROID, PLATFORM_LINUX, PLATFORM_MACOS, PLATFORM_IOS. | |
87 | 87 | #endif |
88 | 88 | |
89 | DILIGENT_END_NAMESPACE // namespace Diligent⏎ | |
89 | DILIGENT_END_NAMESPACE // namespace Diligent |
216 | 216 | ```cpp |
217 | 217 | auto* pFactoryOpenGL = GetEngineFactoryOpenGL(); |
218 | 218 | EngineGLCreateInfo EngineCI; |
219 | EngineCI.NativeWindow.pAWindow = NativeWindowHandle; | |
219 | EngineCI.Window.pAWindow = NativeWindowHandle; | |
220 | 220 | pFactoryOpenGL->CreateDeviceAndSwapChainGL( |
221 | 221 | EngineCI, &m_pDevice, &m_pContext, SCDesc, &m_pSwapChain); |
222 | 222 | IRenderDeviceGLES *pRenderDeviceOpenGLES; |