BsMaterial.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. #include "BsResource.h"
  4. #include "BsGpuParam.h"
  5. #include "BsMaterialProxy.h"
  6. #include "BsVector2.h"
  7. #include "BsVector3.h"
  8. #include "BsVector4.h"
  9. #include "BsMatrix3.h"
  10. #include "BsMatrix4.h"
  11. namespace BansheeEngine
  12. {
  13. /**
  14. * @brief Type of material dirty flags
  15. */
  16. enum class MaterialDirtyFlag
  17. {
  18. Material = 0x01, /**< Internal material data is dirty. */
  19. Proxy = 0x02, /**< Active proxy needs to be updated. */
  20. Params = 0x04 /**< Parameters are dirty. */
  21. };
  22. /**
  23. * @brief Helper class containing parameters for all types
  24. * of GPU programs used in a pass.
  25. */
  26. class BS_CORE_EXPORT PassParameters
  27. {
  28. public:
  29. GpuParamsPtr mVertParams;
  30. GpuParamsPtr mFragParams;
  31. GpuParamsPtr mGeomParams;
  32. GpuParamsPtr mHullParams;
  33. GpuParamsPtr mDomainParams;
  34. GpuParamsPtr mComputeParams;
  35. /**
  36. * @brief Returns a set of GPU parameters based on an index.
  37. *
  38. * @note Useful when needing to iterate over all sets of GPU parameters.
  39. */
  40. GpuParamsPtr& getParamByIdx(UINT32 idx)
  41. {
  42. GpuParamsPtr* paramArray[] = {&mVertParams, &mFragParams, &mGeomParams, &mHullParams, &mDomainParams, &mComputeParams};
  43. return *paramArray[idx];
  44. }
  45. /**
  46. * @brief Sets GPU parameters based on an index.
  47. *
  48. * @note Useful when needing to iterate over all sets of GPU parameters.
  49. */
  50. void setParamByIdx(UINT32 idx, const GpuParamsPtr& params)
  51. {
  52. GpuParamsPtr* paramArray[] = {&mVertParams, &mFragParams, &mGeomParams, &mHullParams, &mDomainParams, &mComputeParams};
  53. (*paramArray[idx]) = params;
  54. }
  55. /**
  56. * @brief Returns the total number of stored sets of
  57. * GPU parameters in this object.
  58. */
  59. UINT32 getNumParams() const { return 6; }
  60. };
  61. /**
  62. * @brief Material represents a shader and parameters used to set up
  63. * that shader. It provides a simple interface for manipulating the
  64. * parameters.
  65. */
  66. class BS_CORE_EXPORT Material : public Resource
  67. {
  68. public:
  69. /**
  70. * @brief Data used to described a structure defined within a shader.
  71. */
  72. struct StructData
  73. {
  74. StructData()
  75. :size(0), data(nullptr)
  76. { }
  77. StructData(UINT32 _size)
  78. :size(_size)
  79. {
  80. data = std::shared_ptr<void>(bs_alloc<ScratchAlloc>(_size), &bs_free<ScratchAlloc>);
  81. }
  82. /**
  83. * @brief Writes the specified data to the internal buffer. Caller
  84. * must ensure size of the provided buffer is correct.
  85. */
  86. void write(void* _data)
  87. {
  88. memcpy(data.get(), _data, size);
  89. }
  90. std::shared_ptr<void> data;
  91. UINT32 size;
  92. };
  93. ~Material();
  94. /**
  95. * @brief Sets a shader that will be used by the material. Best technique within the
  96. * provided shader will be used for the material.
  97. *
  98. * @note Shader must be set before doing any other operations with the material.
  99. *
  100. * After setting the shader if change any systems that a shader technique is
  101. * dependent upon (render system, renderer, etc), you will need to call this
  102. * method again on all your Materials to make sure technique used is updated.
  103. */
  104. void setShader(ShaderPtr shader);
  105. /**
  106. * @brief Returns the currently active shader.
  107. */
  108. ShaderPtr getShader() const { return mShader; }
  109. /** @brief Assigns a texture to the shader parameter with the specified name. */
  110. void setTexture(const String& name, const HTexture& value) { return getParamTexture(name).set(value); }
  111. /**
  112. * @brief Assigns a texture to be used for random load/store operations to the
  113. * shader parameter with the specified name.
  114. */
  115. void setLoadStoreTexture(const String& name, const HTexture& value, const TextureSurface& surface)
  116. {
  117. return getParamLoadStoreTexture(name).set(value, surface);
  118. }
  119. /** @brief Assigns a sampler state to the shader parameter with the specified name. */
  120. void setSamplerState(const String& name, const HSamplerState& value) { return getParamSamplerState(name).set(value); }
  121. /**
  122. * @brief Assigns a float value to the shader parameter with the specified name.
  123. *
  124. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  125. */
  126. void setFloat(const String& name, float value, UINT32 arrayIdx = 0) { return getParamFloat(name).set(value, arrayIdx); }
  127. /**
  128. * @brief Assigns a color to the shader parameter with the specified name.
  129. *
  130. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  131. */
  132. void setColor(const String& name, const Color& value, UINT32 arrayIdx = 0);
  133. /**
  134. * @brief Assigns a 2D vector to the shader parameter with the specified name.
  135. *
  136. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  137. */
  138. void setVec2(const String& name, const Vector2& value, UINT32 arrayIdx = 0) { return getParamVec2(name).set(value, arrayIdx); }
  139. /**
  140. * @brief Assigns a 3D vector to the shader parameter with the specified name.
  141. *
  142. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  143. */
  144. void setVec3(const String& name, const Vector3& value, UINT32 arrayIdx = 0) { return getParamVec3(name).set(value, arrayIdx); }
  145. /**
  146. * @brief Assigns a 4D vector to the shader parameter with the specified name.
  147. *
  148. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  149. */
  150. void setVec4(const String& name, const Vector4& value, UINT32 arrayIdx = 0) { return getParamVec4(name).set(value, arrayIdx); }
  151. /**
  152. * @brief Assigns a 3x3 matrix to the shader parameter with the specified name.
  153. *
  154. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  155. */
  156. void setMat3(const String& name, const Matrix3& value, UINT32 arrayIdx = 0) { return getParamMat3(name).set(value, arrayIdx); }
  157. /**
  158. * @brief Assigns a 4x4 matrix to the shader parameter with the specified name.
  159. *
  160. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  161. */
  162. void setMat4(const String& name, const Matrix4& value, UINT32 arrayIdx = 0) { return getParamMat4(name).set(value, arrayIdx); }
  163. /**
  164. * @brief Assigns a structure to the shader parameter with the specified name.
  165. *
  166. * Structure is provided as a raw buffer and caller must ensure structure in buffer
  167. * matches what the shader expects.
  168. *
  169. * Optionally if the parameter is an array you may provide an array index to assign the value to.
  170. */
  171. void setStructData(const String& name, void* value, UINT32 size, UINT32 arrayIdx = 0) { return getParamStruct(name).set(value, size, arrayIdx); }
  172. /**
  173. * @brief Assign a parameter block buffer with the specified name.
  174. *
  175. * @note Parameter block buffers can be used as quick way of setting multiple parameters on a material at once, or
  176. * potentially sharing parameters between multiple materials. This reduces driver overhead as the parameters
  177. * in the buffers need only be set once and then reused multiple times.
  178. */
  179. void setParamBlockBuffer(const String& name, const GpuParamBlockBufferPtr& paramBlock);
  180. /** @brief Returns a texture assigned with the parameter with the specified name. */
  181. HTexture getTexture(const String& name) const { return getParamTexture(name).get(); }
  182. /** @brief Returns a sampler state assigned with the parameter with the specified name. */
  183. HSamplerState getSamplerState(const String& name) const { return getParamSamplerState(name).get(); }
  184. /**
  185. * @brief Returns a float value assigned with the parameter with the specified name.
  186. *
  187. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  188. */
  189. float getFloat(const String& name, UINT32 arrayIdx = 0) const { return getParamFloat(name).get(arrayIdx); }
  190. /**
  191. * @brief Returns a color assigned with the parameter with the specified name.
  192. *
  193. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  194. */
  195. Color getColor(const String& name, UINT32 arrayIdx = 0) const { return getParamColor(name).get(arrayIdx); }
  196. /**
  197. * @brief Returns a 2D vector assigned with the parameter with the specified name.
  198. *
  199. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  200. */
  201. Vector2 getVec2(const String& name, UINT32 arrayIdx = 0) const { return getParamVec2(name).get(arrayIdx); }
  202. /**
  203. * @brief Returns a 3D vector assigned with the parameter with the specified name.
  204. *
  205. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  206. */
  207. Vector3 getVec3(const String& name, UINT32 arrayIdx = 0) const { return getParamVec3(name).get(arrayIdx); }
  208. /**
  209. * @brief Returns a 4D vector assigned with the parameter with the specified name.
  210. *
  211. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  212. */
  213. Vector4 getVec4(const String& name, UINT32 arrayIdx = 0) const { return getParamVec4(name).get(arrayIdx); }
  214. /**
  215. * @brief Returns a 3x3 matrix assigned with the parameter with the specified name.
  216. *
  217. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  218. */
  219. Matrix3 getMat3(const String& name, UINT32 arrayIdx = 0) const { return getParamMat3(name).get(arrayIdx); }
  220. /**
  221. * @brief Returns a 4x4 matrix assigned with the parameter with the specified name.
  222. *
  223. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  224. */
  225. Matrix4 getMat4(const String& name, UINT32 arrayIdx = 0) const { return getParamMat4(name).get(arrayIdx); }
  226. /**
  227. * @brief Returns a buffer representing a structure assigned to the parameter with the specified name.
  228. *
  229. * Optionally if the parameter is an array you may provide an array index you which to retrieve.
  230. */
  231. StructData getStructData(const String& name, UINT32 arrayIdx = 0) const;
  232. /**
  233. * @brief Returns a float GPU parameter. This parameter may be used for
  234. * more efficiently getting/setting GPU parameter values than calling
  235. * Material::get* / Material::set* methods.
  236. *
  237. * @note Expected behavior is that you would retrieve this parameter when
  238. * initially constructing the material, and then use it throughout material
  239. * lifetime to assign and retrieve parameter values.
  240. *
  241. * If material shader changes this handle will be invalidated.
  242. */
  243. GpuParamFloat getParamFloat(const String& name) const;
  244. /**
  245. * @brief Returns a color GPU parameter. This parameter may be used for
  246. * more efficiently getting/setting GPU parameter values than calling
  247. * Material::get* / Material::set* methods.
  248. *
  249. * @note Expected behavior is that you would retrieve this parameter when
  250. * initially constructing the material, and then use it throughout material
  251. * lifetime to assign and retrieve parameter values.
  252. *
  253. * If material shader changes this handle will be invalidated.
  254. */
  255. GpuParamColor getParamColor(const String& name) const;
  256. /**
  257. * @brief Returns a 2D vector GPU parameter. This parameter may be used for
  258. * more efficiently getting/setting GPU parameter values than calling
  259. * Material::get* / Material::set* methods.
  260. *
  261. * @note Expected behavior is that you would retrieve this parameter when
  262. * initially constructing the material, and then use it throughout material
  263. * lifetime to assign and retrieve parameter values.
  264. *
  265. * If material shader changes this handle will be invalidated.
  266. */
  267. GpuParamVec2 getParamVec2(const String& name) const;
  268. /**
  269. * @brief Returns a 3D vector GPU parameter. This parameter may be used for
  270. * more efficiently getting/setting GPU parameter values than calling
  271. * Material::get* / Material::set* methods.
  272. *
  273. * @note Expected behavior is that you would retrieve this parameter when
  274. * initially constructing the material, and then use it throughout material
  275. * lifetime to assign and retrieve parameter values.
  276. *
  277. * If material shader changes this handle will be invalidated.
  278. */
  279. GpuParamVec3 getParamVec3(const String& name) const;
  280. /**
  281. * @brief Returns a 4D vector GPU parameter. This parameter may be used for
  282. * more efficiently getting/setting GPU parameter values than calling
  283. * Material::get* / Material::set* methods.
  284. *
  285. * @note Expected behavior is that you would retrieve this parameter when
  286. * initially constructing the material, and then use it throughout material
  287. * lifetime to assign and retrieve parameter values.
  288. *
  289. * If material shader changes this handle will be invalidated.
  290. */
  291. GpuParamVec4 getParamVec4(const String& name) const;
  292. /**
  293. * @brief Returns a 3x3 matrix GPU parameter. This parameter may be used for
  294. * more efficiently getting/setting GPU parameter values than calling
  295. * Material::get* / Material::set* methods.
  296. *
  297. * @note Expected behavior is that you would retrieve this parameter when
  298. * initially constructing the material, and then use it throughout material
  299. * lifetime to assign and retrieve parameter values.
  300. *
  301. * If material shader changes this handle will be invalidated.
  302. */
  303. GpuParamMat3 getParamMat3(const String& name) const;
  304. /**
  305. * @brief Returns a 4x4 matrix GPU parameter. This parameter may be used for
  306. * more efficiently getting/setting GPU parameter values than calling
  307. * Material::get* / Material::set* methods.
  308. *
  309. * @note Expected behavior is that you would retrieve this parameter when
  310. * initially constructing the material, and then use it throughout material
  311. * lifetime to assign and retrieve parameter values.
  312. *
  313. * If material shader changes this handle will be invalidated.
  314. */
  315. GpuParamMat4 getParamMat4(const String& name) const;
  316. /**
  317. * @brief Returns a structure GPU parameter. This parameter may be used for
  318. * more efficiently getting/setting GPU parameter values than calling
  319. * Material::get* / Material::set* methods.
  320. *
  321. * @note Expected behavior is that you would retrieve this parameter when
  322. * initially constructing the material, and then use it throughout material
  323. * lifetime to assign and retrieve parameter values.
  324. *
  325. * If material shader changes this handle will be invalidated.
  326. */
  327. GpuParamStruct getParamStruct(const String& name) const;
  328. /**
  329. * @brief Returns a texture GPU parameter. This parameter may be used for
  330. * more efficiently getting/setting GPU parameter values than calling
  331. * Material::get* / Material::set* methods.
  332. *
  333. * @note Expected behavior is that you would retrieve this parameter when
  334. * initially constructing the material, and then use it throughout material
  335. * lifetime to assign and retrieve parameter values.
  336. *
  337. * If material shader changes this handle will be invalidated.
  338. */
  339. GpuParamTexture getParamTexture(const String& name) const;
  340. /**
  341. * @brief Returns a GPU parameter for binding a load/store texture. This parameter
  342. * may be used for more efficiently getting/setting GPU parameter values
  343. * than calling Material::get* / Material::set* methods.
  344. *
  345. * @note Expected behavior is that you would retrieve this parameter when
  346. * initially constructing the material, and then use it throughout material
  347. * lifetime to assign and retrieve parameter values.
  348. *
  349. * If material shader changes this handle will be invalidated.
  350. */
  351. GpuParamLoadStoreTexture getParamLoadStoreTexture(const String& name) const;
  352. /**
  353. * @brief Returns a sampler state GPU parameter. This parameter may be used for
  354. * more efficiently getting/setting GPU parameter values than calling
  355. * Material::get* / Material::set* methods.
  356. *
  357. * @note Expected behavior is that you would retrieve this parameter when
  358. * initially constructing the material, and then use it throughout material
  359. * lifetime to assign and retrieve parameter values.
  360. *
  361. * If material shader changes this handle will be invalidated.
  362. */
  363. GpuParamSampState getParamSamplerState(const String& name) const;
  364. /**
  365. * @brief Returns the number of passes that are used
  366. * by the shader contained in the material.
  367. */
  368. UINT32 getNumPasses() const;
  369. /**
  370. * @brief Retrieves a specific shader pass.
  371. */
  372. PassPtr getPass(UINT32 passIdx) const;
  373. /**
  374. * @brief Returns a set of parameters for all GPU programs
  375. * in the specified shader pass.
  376. */
  377. PassParametersPtr getPassParameters(UINT32 passIdx) const;
  378. /**
  379. * @brief Creates a new empty material.
  380. *
  381. * @note Make sure you call Material::setShader before using it.
  382. */
  383. static HMaterial create();
  384. /**
  385. * @brief Creates a new material with the specified shader.
  386. */
  387. static HMaterial create(ShaderPtr shader);
  388. /************************************************************************/
  389. /* CORE PROXY */
  390. /************************************************************************/
  391. /**
  392. * @brief Checks is the core dirty flag set. This is used by external systems
  393. * to know when internal data has changed and core thread potentially needs to be notified.
  394. *
  395. * @note Sim thread only.
  396. */
  397. bool _isCoreDirty(MaterialDirtyFlag flag) const;
  398. /**
  399. * @brief Marks the core dirty flag as clean.
  400. *
  401. * @note Sim thread only.
  402. */
  403. void _markCoreClean(MaterialDirtyFlag flag);
  404. /**
  405. * @brief Gets the currently active proxy of this material.
  406. */
  407. MaterialProxyPtr _getActiveProxy() const { return mActiveProxy; }
  408. /**
  409. * @brief Sets an active proxy for this material.
  410. */
  411. void _setActiveProxy(const MaterialProxyPtr& proxy) { mActiveProxy = proxy; }
  412. /**
  413. * @brief Returns updated GPU parameters since the last time the parameters were marked clean.
  414. *
  415. * @note Returned data will be allocated with a frame allocator and must be released during the
  416. * same frame it was allocated.
  417. */
  418. MaterialProxy::DirtyParamsInfo* _getDirtyProxyParams(FrameAlloc* frameAlloc);
  419. /**
  420. * @brief Creates a new core proxy from the currently set material data. Core proxies ensure
  421. * that the core thread has all the necessary material data, while avoiding the need
  422. * to manage Material itself on the core thread.
  423. *
  424. * @note Sim thread only.
  425. * You generally need to update the core thread with a new proxy whenever core
  426. * dirty flag is set.
  427. */
  428. MaterialProxyPtr _createProxy();
  429. protected:
  430. /**
  431. * @copydoc Resource::destroy_internal
  432. */
  433. void destroy_internal();
  434. /**
  435. * @brief Allows you to retrieve a handle to a parameter that you can then use for quickly
  436. * setting and retrieving parameter data. This allows you to set/get parameter data
  437. * without all the cost of extra lookups otherwise required.
  438. *
  439. * @note All of these handles will be invalidated if material shader ever changes. It is up to the
  440. * caller to keep track of that.
  441. */
  442. template <typename T>
  443. void getParam(const String& name, TGpuDataParam<T>& output) const
  444. {
  445. throwIfNotInitialized();
  446. auto iterFind = mValidParams.find(name);
  447. if(iterFind == mValidParams.end())
  448. {
  449. LOGWRN("Material doesn't have a parameter named " + name);
  450. return;
  451. }
  452. const String& gpuVarName = iterFind->second;
  453. GpuParamsPtr params = findParamsWithName(gpuVarName);
  454. params->getParam<T>(gpuVarName, output);
  455. }
  456. private:
  457. friend class MaterialManager;
  458. ShaderPtr mShader;
  459. TechniquePtr mBestTechnique;
  460. INT32 mCoreDirtyFlags;
  461. Set<String> mValidShareableParamBlocks;
  462. Map<String, String> mValidParams; // Also maps Shader param name -> gpu variable name
  463. Vector<PassParametersPtr> mParametersPerPass;
  464. Vector<GpuParamBlockBufferPtr> mParamBuffers;
  465. MaterialProxyPtr mActiveProxy;
  466. Material();
  467. /**
  468. * @brief Throw an exception if no shader is set, or no acceptable
  469. * technique was found.
  470. */
  471. void throwIfNotInitialized() const;
  472. /**
  473. * @brief Marks the core data as dirty.
  474. */
  475. void markCoreDirty() { mCoreDirtyFlags = 0xFFFFFFFF; }
  476. /**
  477. * @brief Retrieves a list of all shader GPU parameters, and the GPU program variable names they map to.
  478. */
  479. const Map<String, String>& getValidParamNames() const { return mValidParams; }
  480. /**
  481. * @brief Initializes the material by using the best technique from the currently set shader. Shader
  482. * must contain the technique that matches the current renderer and render system.
  483. */
  484. void initBestTechnique();
  485. /**
  486. * @brief Constructs a map containing all data parameters (e.g. float, vector3, color).
  487. * Map contains parameter names and descriptions.
  488. */
  489. Map<String, const GpuParamDataDesc*> determineValidDataParameters(const Vector<GpuParamDescPtr>& paramDescs) const;
  490. /**
  491. * @brief Constructs a list containing all object parameter (e.g. texture, sampler state) names.
  492. */
  493. Vector<const GpuParamObjectDesc*> determineValidObjectParameters(const Vector<GpuParamDescPtr>& paramDescs) const;
  494. /**
  495. * @brief Constructs a list containing all shareable parameter block names. Shareable blocks may be shared between
  496. * different GPU programs, passes or even materials.
  497. */
  498. Set<String> determineValidShareableParamBlocks(const Vector<GpuParamDescPtr>& paramDescs) const;
  499. /**
  500. * @brief Constructs a map that maps parameter names to a parameter block.
  501. */
  502. Map<String, String> determineParameterToBlockMapping(const Vector<GpuParamDescPtr>& paramDescs);
  503. /**
  504. * @brief Checks are the specified two parameters equal
  505. *
  506. * @param paramA The parameter a to compare.
  507. * @param paramB The parameter b to compare.
  508. * @param ignoreBufferOffsets (optional) If true, parameter offsets into the parameter buffer will be ignored
  509. * when comparing.
  510. */
  511. bool areParamsEqual(const GpuParamDataDesc& paramA, const GpuParamDataDesc& paramB, bool ignoreBufferOffsets = false) const;
  512. /**
  513. * @brief Frees all parameter block buffers.
  514. */
  515. void freeParamBuffers();
  516. /**
  517. * @brief Finds a set of GPU parameters containing a data (e.g. float, vector2) parameter with the provided name.
  518. */
  519. GpuParamsPtr findParamsWithName(const String& name) const;
  520. /**
  521. * @brief Finds a set of GPU parameters containing a texture parameter with the provided name.
  522. */
  523. GpuParamsPtr findTexWithName(const String& name) const;
  524. /**
  525. * @brief Finds a set of GPU parameters containing a sampler state parameter with the provided name.
  526. */
  527. GpuParamsPtr findSamplerStateWithName(const String& name) const;
  528. /************************************************************************/
  529. /* RTTI */
  530. /************************************************************************/
  531. public:
  532. friend class MaterialRTTI;
  533. static RTTITypeBase* getRTTIStatic();
  534. virtual RTTITypeBase* getRTTI() const;
  535. };
  536. }