BsCamera.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsIReflectable.h"
  6. #include "BsMatrix4.h"
  7. #include "BsVector3.h"
  8. #include "BsVector2.h"
  9. #include "BsVector2I.h"
  10. #include "BsAABox.h"
  11. #include "BsQuaternion.h"
  12. #include "BsRay.h"
  13. #include "BsCoreObject.h"
  14. #include "BsConvexVolume.h"
  15. #include "BsRenderSettings.h"
  16. namespace bs
  17. {
  18. /** @addtogroup Renderer-Internal
  19. * @{
  20. */
  21. /** Signals which portion of a Camera is dirty. */
  22. enum class CameraDirtyFlag
  23. {
  24. Transform = 1<<0,
  25. Everything = 1<<1,
  26. RenderSettings = 1<<2
  27. };
  28. /** @} */
  29. /** @addtogroup Implementation
  30. * @{
  31. */
  32. /**
  33. * Camera determines how is world geometry projected onto a 2D surface. You may position and orient it in space, set
  34. * options like aspect ratio and field or view and it outputs view and projection matrices required for rendering.
  35. *
  36. * This class contains funcionality common to both core and non-core versions of the camera.
  37. */
  38. class BS_CORE_EXPORT CameraBase
  39. {
  40. public:
  41. virtual ~CameraBase() { }
  42. /**
  43. * Sets the camera horizontal field of view. This determines how wide the camera viewing angle is along the
  44. * horizontal axis. Vertical FOV is calculated from the horizontal FOV and the aspect ratio.
  45. */
  46. virtual void setHorzFOV(const Radian& fovy);
  47. /** Retrieves the camera horizontal field of view. */
  48. virtual const Radian& getHorzFOV() const;
  49. /**
  50. * Sets the distance from the frustum to the near clipping plane. Anything closer than the near clipping plane will
  51. * not be rendered. Decreasing this value decreases depth buffer precision.
  52. */
  53. virtual void setNearClipDistance(float nearDist);
  54. /**
  55. * Retrieves the distance from the frustum to the near clipping plane. Anything closer than the near clipping plane
  56. * will not be rendered. Decreasing this value decreases depth buffer precision.
  57. */
  58. virtual float getNearClipDistance() const;
  59. /**
  60. * Sets the distance from the frustum to the far clipping plane. Anything farther than the far clipping plane will
  61. * not be rendered. Increasing this value decreases depth buffer precision.
  62. */
  63. virtual void setFarClipDistance(float farDist);
  64. /**
  65. * Retrieves the distance from the frustum to the far clipping plane. Anything farther than the far clipping plane
  66. * will not be rendered. Increasing this value decreases depth buffer precision.
  67. */
  68. virtual float getFarClipDistance() const;
  69. /** Sets the current viewport aspect ratio (width / height). */
  70. virtual void setAspectRatio(float ratio);
  71. /** Returns current viewport aspect ratio (width / height). */
  72. virtual float getAspectRatio() const;
  73. /** Sets camera world space position. */
  74. virtual void setPosition(const Vector3& position);
  75. /** Retrieves camera world space position. */
  76. virtual Vector3 getPosition() const { return mPosition; }
  77. /** Sets should the camera be rendered to or not. */
  78. void setIsActive(bool active) { mIsActive = active; _markCoreDirty(); }
  79. /** Gets whether the camera be rendered to or not. */
  80. bool getIsActive() const { return mIsActive; }
  81. /**
  82. * Gets the Z (forward) axis of the object, in world space.
  83. *
  84. * @return Forward axis of the object.
  85. */
  86. Vector3 getForward() const { return getRotation().rotate(-Vector3::UNIT_Z); }
  87. /** Sets camera world space rotation. */
  88. virtual void setRotation(const Quaternion& rotation);
  89. /** Retrieves camera world space rotation. */
  90. virtual Quaternion getRotation() const { return mRotation; }
  91. /** Manually set the extents of the frustum that will be used when calculating the projection matrix. This will
  92. * prevents extents for being automatically calculated from aspect and near plane so it is up to the caller to keep
  93. * these values accurate.
  94. *
  95. * @param[in] left The position where the left clip plane intersect the near clip plane, in view space.
  96. * @param[in] right The position where the right clip plane intersect the near clip plane, in view space.
  97. * @param[in] top The position where the top clip plane intersect the near clip plane, in view space.
  98. * @param[in] bottom The position where the bottom clip plane intersect the near clip plane, in view space.
  99. */
  100. virtual void setFrustumExtents(float left, float right, float top, float bottom);
  101. /**
  102. * Resets frustum extents so they are automatically derived from other values. This is only relevant if you have
  103. * previously set custom extents.
  104. */
  105. virtual void resetFrustumExtents();
  106. /** Returns the extents of the frustum in view space at the near plane. */
  107. virtual void getFrustumExtents(float& outleft, float& outright, float& outtop, float& outbottom) const;
  108. /**
  109. * Returns the standard projection matrix that determines how are 3D points projected to two dimensions. The layout
  110. * of this matrix depends on currently used render system.
  111. *
  112. * @note
  113. * You should use this matrix when sending the matrix to the render system to make sure everything works
  114. * consistently when other render systems are used.
  115. */
  116. virtual const Matrix4& getProjectionMatrixRS() const;
  117. /**
  118. * Returns the inverse of the render-system specific projection matrix.
  119. *
  120. * @see getProjectionMatrixRS
  121. */
  122. virtual const Matrix4& getProjectionMatrixRSInv() const;
  123. /**
  124. * Returns the standard projection matrix that determines how are 3D points projected to two dimensions. Returned
  125. * matrix is standard following right-hand rules and depth range of [-1, 1].
  126. *
  127. * @note
  128. * Different render systems will expect different projection matrix layouts, in which case use
  129. * getProjectionMatrixRS().
  130. */
  131. virtual const Matrix4& getProjectionMatrix() const;
  132. /**
  133. * Returns the inverse of the projection matrix.
  134. *
  135. * @see getProjectionMatrix
  136. */
  137. virtual const Matrix4& getProjectionMatrixInv() const;
  138. /** Gets the camera view matrix. Used for positioning/orienting the camera. */
  139. virtual const Matrix4& getViewMatrix() const;
  140. /**
  141. * Returns the inverse of the view matrix.
  142. *
  143. * @see getViewMatrix
  144. */
  145. virtual const Matrix4& getViewMatrixInv() const;
  146. /**
  147. * Sets whether the camera should use the custom view matrix. When this is enabled camera will no longer calculate
  148. * its view matrix based on position/orientation and caller will be resonsible to keep the view matrix up to date.
  149. */
  150. virtual void setCustomViewMatrix(bool enable, const Matrix4& viewMatrix = Matrix4::IDENTITY);
  151. /** Returns true if a custom view matrix is used. */
  152. virtual bool isCustomViewMatrixEnabled() const { return mCustomViewMatrix; }
  153. /**
  154. * Sets whether the camera should use the custom projection matrix. When this is enabled camera will no longer
  155. * calculate its projection matrix based on field of view, aspect and other parameters and caller will be resonsible
  156. * to keep the projection matrix up to date.
  157. */
  158. virtual void setCustomProjectionMatrix(bool enable, const Matrix4& projectionMatrix = Matrix4::IDENTITY);
  159. /** Returns true if a custom projection matrix is used. */
  160. virtual bool isCustomProjectionMatrixEnabled() const { return mCustomProjMatrix; }
  161. /** Returns a convex volume representing the visible area of the camera, in local space. */
  162. virtual const ConvexVolume& getFrustum() const;
  163. /** Returns a convex volume representing the visible area of the camera, in world space. */
  164. virtual ConvexVolume getWorldFrustum() const;
  165. /** Returns the bounding of the frustum. */
  166. const AABox& getBoundingBox() const;
  167. /**
  168. * Sets the type of projection used by the camera. Projection type controls how is 3D geometry projected onto a
  169. * 2D plane.
  170. */
  171. virtual void setProjectionType(ProjectionType pt);
  172. /**
  173. * Returns the type of projection used by the camera. Projection type controls how is 3D geometry projected onto a
  174. * 2D plane.
  175. */
  176. virtual ProjectionType getProjectionType() const;
  177. /**
  178. * Sets the orthographic window height, for use with orthographic rendering only.
  179. *
  180. * @param[in] w Width of the window in world units.
  181. * @param[in] h Height of the window in world units.
  182. *
  183. * @note
  184. * Calling this method will recalculate the aspect ratio, use setOrthoWindowHeight() or setOrthoWindowWidth() alone
  185. * if you wish to preserve the aspect ratio but just fit one or other dimension to a particular size.
  186. */
  187. virtual void setOrthoWindow(float w, float h);
  188. /**
  189. * Sets the orthographic window height, for use with orthographic rendering only.
  190. *
  191. * @param[in] h Height of the window in world units.
  192. *
  193. * @note The width of the window will be calculated from the aspect ratio.
  194. */
  195. virtual void setOrthoWindowHeight(float h);
  196. /**
  197. * Sets the orthographic window width, for use with orthographic rendering only.
  198. *
  199. * @param[in] w Width of the window in world units.
  200. *
  201. * @note The height of the window will be calculated from the aspect ratio.
  202. */
  203. virtual void setOrthoWindowWidth(float w);
  204. /** Gets the orthographic window width in world units, for use with orthographic rendering only. */
  205. virtual float getOrthoWindowHeight() const;
  206. /**
  207. * Gets the orthographic window width in world units, for use with orthographic rendering only.
  208. *
  209. * @note This is calculated from the orthographic height and the aspect ratio.
  210. */
  211. virtual float getOrthoWindowWidth() const;
  212. /**
  213. * Gets a priority that determines in which orders the cameras are rendered. This only applies to cameras rendering
  214. * to the same render target.
  215. */
  216. INT32 getPriority() const { return mPriority; }
  217. /**
  218. * Sets a priority that determines in which orders the cameras are rendered. This only applies to cameras rendering
  219. * to the same render target.
  220. *
  221. * @param[in] priority The priority. Higher value means the camera will be rendered sooner.
  222. */
  223. void setPriority(INT32 priority) { mPriority = priority; _markCoreDirty(); }
  224. /** Retrieves layer bitfield that is used when determining which object should the camera render. */
  225. UINT64 getLayers() const { return mLayers; }
  226. /** Sets layer bitfield that is used when determining which object should the camera render. */
  227. void setLayers(UINT64 layers) { mLayers = layers; _markCoreDirty(); }
  228. /** Returns number of samples if the camera uses multiple samples per pixel. */
  229. UINT32 getMSAACount() const { return mMSAA; }
  230. /**
  231. * Enables or disables multi-sampled anti-aliasing. Set to zero or one to disable, or to the required number of
  232. * samples to enable.
  233. */
  234. void setMSAACount(UINT32 count) { mMSAA = count; _markCoreDirty(); }
  235. /** @copydoc setRenderSettings() */
  236. const SPtr<RenderSettings>& getRenderSettings() const { return mRenderSettings; }
  237. /**
  238. * Settings that control rendering for this view. They determine how will the renderer process this view, which
  239. * effects will be enabled, and what properties will those effects use.
  240. */
  241. void setRenderSettings(const SPtr<RenderSettings>& settings) { mRenderSettings = settings; _markCoreDirty(CameraDirtyFlag::RenderSettings); }
  242. /**
  243. * Converts a point in world space to screen coordinates (in pixels corresponding to the render target attached to
  244. * the camera).
  245. */
  246. Vector2I worldToScreenPoint(const Vector3& worldPoint) const;
  247. /** Converts a point in world space to normalized device coordinates (in [-1, 1] range). */
  248. Vector2 worldToNdcPoint(const Vector3& worldPoint) const;
  249. /** Converts a point in world space to point relative to camera's coordinate system (view space). */
  250. Vector3 worldToViewPoint(const Vector3& worldPoint) const;
  251. /**
  252. * Converts a point in screen space (pixels corresponding to render target attached to the camera) to a point in
  253. * world space.
  254. *
  255. * @param[in] screenPoint Point to transform.
  256. * @param[in] depth Depth to place the world point at, in world coordinates. The depth is applied to the
  257. * vector going from camera origin to the point on the near plane.
  258. */
  259. Vector3 screenToWorldPoint(const Vector2I& screenPoint, float depth = 0.5f) const;
  260. /**
  261. * Converts a point in screen space (pixels corresponding to render target attached to the camera) to a point in
  262. * world space.
  263. *
  264. * @param[in] screenPoint Point to transform.
  265. * @param[in] deviceDepth Depth to place the world point at, in normalized device coordinates.
  266. */
  267. Vector3 screenToWorldPointDeviceDepth(const Vector2I& screenPoint, float deviceDepth = 0.5f) const;
  268. /**
  269. * Converts a point in screen space (pixels corresponding to render target attached to the camera) to a point
  270. * relative to camera's coordinate system (view space).
  271. *
  272. * @param[in] screenPoint Point to transform.
  273. * @param[in] depth Depth to place the world point at. The depth is applied to the vector going from camera
  274. * origin to the point on the near plane.
  275. */
  276. Vector3 screenToViewPoint(const Vector2I& screenPoint, float depth = 0.5f) const;
  277. /**
  278. * Converts a point in screen space (pixels corresponding to render target attached to the camera) to normalized
  279. * device coordinates (in [-1, 1] range).
  280. */
  281. Vector2 screenToNdcPoint(const Vector2I& screenPoint) const;
  282. /** Converts a point relative to camera's coordinate system (view space) into a point in world space. */
  283. Vector3 viewToWorldPoint(const Vector3& viewPoint) const;
  284. /**
  285. * Converts a point relative to camera's coordinate system (view space) into a point in screen space (pixels
  286. * corresponding to render target attached to the camera).
  287. */
  288. Vector2I viewToScreenPoint(const Vector3& viewPoint) const;
  289. /**
  290. * Converts a point relative to camera's coordinate system (view space) into normalized device coordinates
  291. * (in [-1, 1] range).
  292. */
  293. Vector2 viewToNdcPoint(const Vector3& viewPoint) const;
  294. /**
  295. * Converts a point in normalized device coordinates ([-1, 1] range) to a point in world space.
  296. *
  297. * @param[in] ndcPoint Point to transform.
  298. * @param[in] depth Depth to place the world point at. The depth is applied to the vector going from camera
  299. * origin to the point on the near plane.
  300. */
  301. Vector3 ndcToWorldPoint(const Vector2& ndcPoint, float depth = 0.5f) const;
  302. /**
  303. * Converts a point in normalized device coordinates ([-1, 1] range) to a point relative to camera's coordinate system
  304. * (view space).
  305. *
  306. * @param[in] ndcPoint Point to transform.
  307. * @param[in] depth Depth to place the world point at. The depth is applied to the vector going from camera
  308. * origin to the point on the near plane.
  309. */
  310. Vector3 ndcToViewPoint(const Vector2& ndcPoint, float depth = 0.5f) const;
  311. /**
  312. * Converts a point in normalized device coordinates ([-1, 1] range) to a point in screen space (pixels corresponding
  313. * to render target attached to the camera).
  314. */
  315. Vector2I ndcToScreenPoint(const Vector2& ndcPoint) const;
  316. /**
  317. * Converts a point in screen space (pixels corresponding to render target attached to the camera) to a ray in world
  318. * space originating at the selected point on the camera near plane.
  319. */
  320. Ray screenPointToRay(const Vector2I& screenPoint) const;
  321. /** Projects a point from view to normalized device space. */
  322. Vector3 projectPoint(const Vector3& point) const;
  323. /** Un-projects a point in normalized device space to view space. */
  324. Vector3 unprojectPoint(const Vector3& point) const;
  325. static const float INFINITE_FAR_PLANE_ADJUST; /**< Small constant used to reduce far plane projection to avoid inaccuracies. */
  326. protected:
  327. CameraBase();
  328. /** Calculate projection parameters that are used when constructing the projection matrix. */
  329. virtual void calcProjectionParameters(float& left, float& right, float& bottom, float& top) const;
  330. /** Recalculate frustum if dirty. */
  331. virtual void updateFrustum() const;
  332. /** Recalculate frustum planes if dirty. */
  333. virtual void updateFrustumPlanes() const;
  334. /**
  335. * Update view matrix from parent position/orientation.
  336. *
  337. * @note Does nothing when custom view matrix is set.
  338. */
  339. virtual void updateView() const;
  340. /** Checks if the frustum requires updating. */
  341. virtual bool isFrustumOutOfDate() const;
  342. /** Notify camera that the frustum requires to be updated. */
  343. virtual void invalidateFrustum() const;
  344. /** Returns a rectangle that defines the viewport position and size, in pixels. */
  345. virtual Rect2I getViewportRect() const = 0;
  346. /**
  347. * Marks the simulation thread object as dirty and notifies the system its data should be synced with its core
  348. * thread counterpart.
  349. */
  350. virtual void _markCoreDirty(CameraDirtyFlag flag = CameraDirtyFlag::Everything) { }
  351. protected:
  352. UINT64 mLayers; /**< Bitfield that can be used for filtering what objects the camera sees. */
  353. Vector3 mPosition; /**< World space position. */
  354. Quaternion mRotation; /**< World space rotation. */
  355. bool mIsActive; /**< Is camera being rendered to. */
  356. ProjectionType mProjType; /**< Type of camera projection. */
  357. Radian mHorzFOV; /**< Horizontal field of view represents how wide is the camera angle. */
  358. float mFarDist; /**< Clip any objects further than this. Larger value decreases depth precision at smaller depths. */
  359. float mNearDist; /**< Clip any objects close than this. Smaller value decreases depth precision at larger depths. */
  360. float mAspect; /**< Width/height viewport ratio. */
  361. float mOrthoHeight; /**< Height in world units used for orthographic cameras. */
  362. INT32 mPriority; /**< Determines in what order will the camera be rendered. Higher priority means the camera will be rendered sooner. */
  363. bool mCustomViewMatrix; /**< Is custom view matrix set. */
  364. bool mCustomProjMatrix; /**< Is custom projection matrix set. */
  365. UINT8 mMSAA; /**< Number of samples to render the scene with. */
  366. SPtr<RenderSettings> mRenderSettings; /**< Settings used to control rendering for this camera. */
  367. bool mFrustumExtentsManuallySet; /**< Are frustum extents manually set. */
  368. mutable Matrix4 mProjMatrixRS; /**< Cached render-system specific projection matrix. */
  369. mutable Matrix4 mProjMatrix; /**< Cached projection matrix that determines how are 3D points projected to a 2D viewport. */
  370. mutable Matrix4 mViewMatrix; /**< Cached view matrix that determines camera position/orientation. */
  371. mutable Matrix4 mProjMatrixRSInv;
  372. mutable Matrix4 mProjMatrixInv;
  373. mutable Matrix4 mViewMatrixInv;
  374. mutable ConvexVolume mFrustum; /**< Main clipping planes describing cameras visible area. */
  375. mutable bool mRecalcFrustum : 1; /**< Should frustum be recalculated. */
  376. mutable bool mRecalcFrustumPlanes : 1; /**< Should frustum planes be recalculated. */
  377. mutable bool mRecalcView : 1; /**< Should view matrix be recalculated. */
  378. mutable float mLeft, mRight, mTop, mBottom; /**< Frustum extents. */
  379. mutable AABox mBoundingBox; /**< Frustum bounding box. */
  380. };
  381. /** @} */
  382. /** @addtogroup Renderer-Internal
  383. * @{
  384. */
  385. /** @copydoc CameraBase */
  386. class BS_CORE_EXPORT Camera : public IReflectable, public CoreObject, public CameraBase
  387. {
  388. public:
  389. /** Returns the viewport used by the camera. */
  390. SPtr<Viewport> getViewport() const { return mViewport; }
  391. /**
  392. * Determines whether this is the main application camera. Main camera controls the final render surface that is
  393. * displayed to the user.
  394. */
  395. bool isMain() const { return mMain; }
  396. /**
  397. * Marks or unmarks this camera as the main application camera. Main camera controls the final render surface that
  398. * is displayed to the user.
  399. */
  400. void setMain(bool main) { mMain = main; }
  401. /** Retrieves an implementation of a camera handler usable only from the core thread. */
  402. SPtr<ct::Camera> getCore() const;
  403. /** Creates a new camera that renders to the specified portion of the provided render target. */
  404. static SPtr<Camera> create(SPtr<RenderTarget> target = nullptr,
  405. float left = 0.0f, float top = 0.0f, float width = 1.0f, float height = 1.0f);
  406. /** @name Internal
  407. * @{
  408. */
  409. /** Returns the hash value that can be used to identify if the internal data needs an update. */
  410. UINT32 _getLastModifiedHash() const { return mLastUpdateHash; }
  411. /** Sets the hash value that can be used to identify if the internal data needs an update. */
  412. void _setLastModifiedHash(UINT32 hash) { mLastUpdateHash = hash; }
  413. /** @} */
  414. protected:
  415. Camera(SPtr<RenderTarget> target = nullptr,
  416. float left = 0.0f, float top = 0.0f, float width = 1.0f, float height = 1.0f);
  417. /** @copydoc CameraBase */
  418. Rect2I getViewportRect() const override;
  419. /** @copydoc CoreObject::createCore */
  420. SPtr<ct::CoreObject> createCore() const override;
  421. /** @copydoc CameraBase::_markCoreDirty */
  422. void _markCoreDirty(CameraDirtyFlag flag = CameraDirtyFlag::Everything) override;
  423. /** @copydoc CoreObject::syncToCore */
  424. CoreSyncData syncToCore(FrameAlloc* allocator) override;
  425. /** @copydoc CoreObject::getCoreDependencies */
  426. void getCoreDependencies(Vector<CoreObject*>& dependencies) override;
  427. /** Creates a new camera without initializing it. */
  428. static SPtr<Camera> createEmpty();
  429. SPtr<Viewport> mViewport; /**< Viewport that describes 2D rendering surface. */
  430. bool mMain;
  431. UINT32 mLastUpdateHash;
  432. /************************************************************************/
  433. /* RTTI */
  434. /************************************************************************/
  435. public:
  436. friend class CameraRTTI;
  437. static RTTITypeBase* getRTTIStatic();
  438. RTTITypeBase* getRTTI() const override;
  439. };
  440. namespace ct
  441. {
  442. /** @copydoc CameraBase */
  443. class BS_CORE_EXPORT Camera : public CoreObject, public CameraBase
  444. {
  445. public:
  446. ~Camera();
  447. /** Returns the viewport used by the camera. */
  448. SPtr<Viewport> getViewport() const { return mViewport; }
  449. /** Sets an ID that can be used for uniquely identifying this object by the renderer. */
  450. void setRendererId(UINT32 id) { mRendererId = id; }
  451. /** Retrieves an ID that can be used for uniquely identifying this object by the renderer. */
  452. UINT32 getRendererId() const { return mRendererId; }
  453. protected:
  454. friend class bs::Camera;
  455. Camera(SPtr<RenderTarget> target = nullptr,
  456. float left = 0.0f, float top = 0.0f, float width = 1.0f, float height = 1.0f);
  457. Camera(const SPtr<Viewport>& viewport);
  458. /** @copydoc CoreObject::initialize */
  459. void initialize() override;
  460. /** @copydoc CameraBase */
  461. Rect2I getViewportRect() const override;
  462. /** @copydoc CoreObject::syncToCore */
  463. void syncToCore(const CoreSyncData& data) override;
  464. UINT32 mRendererId;
  465. SPtr<Viewport> mViewport;
  466. };
  467. }
  468. /** @} */
  469. }