1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#pragma once
4
5#include "BsCorePrerequisites.h"
6#include "Reflection/BsRTTIType.h"
7#include "BsCoreApplication.h"
8#include "RenderAPI/BsRenderTarget.h"
9#include "RenderAPI/BsRenderTexture.h"
10#include "RenderAPI/BsRenderWindow.h"
11#include "CoreThread/BsCoreThread.h"
12
13namespace bs
14{
15 /** @cond RTTI */
16 /** @addtogroup RTTI-Impl-Core
17 * @{
18 */
19
20 class RenderTargetRTTI : public RTTIType<RenderTarget, IReflectable, RenderTargetRTTI>
21 {
22 public:
23 SPtr<IReflectable> newRTTIObject() override
24 {
25 BS_EXCEPT(InvalidStateException, "Unable to instantiate abstract class.");
26 return nullptr;
27 }
28
29 const String& getRTTIName() override
30 {
31 static String name = "RenderTarget";
32 return name;
33 }
34
35 UINT32 getRTTIId() override
36 {
37 return TID_RenderTarget;
38 }
39 };
40
41 class RenderTextureRTTI : public RTTIType<RenderTexture, RenderTarget, RenderTextureRTTI>
42 {
43 public:
44 SPtr<IReflectable> newRTTIObject() override
45 {
46 BS_EXCEPT(InvalidStateException, "This object cannot be instantiated using reflection.");
47 return nullptr;
48 }
49
50 const String& getRTTIName() override
51 {
52 static String name = "RenderTexture";
53 return name;
54 }
55
56 UINT32 getRTTIId() override
57 {
58 return TID_RenderTexture;
59 }
60 };
61
62 class RenderWindowRTTI : public RTTIType<RenderWindow, RenderTarget, RenderWindowRTTI>
63 {
64 public:
65 SPtr<IReflectable> newRTTIObject() override
66 {
67 BS_EXCEPT(InvalidStateException, "This object cannot be instantiated using reflection.");
68 return nullptr;
69 }
70
71 const String& getRTTIName() override
72 {
73 static String name = "RenderWindow";
74 return name;
75 }
76
77 UINT32 getRTTIId() override
78 {
79 return TID_RenderWindow;
80 }
81 };
82
83 /** @} */
84 /** @endcond */
85}
86