BVB Source Codes

CRYENGINE Show ParticleFeature.cpp Source code

Return Download CRYENGINE: download ParticleFeature.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  Created:     01/10/2015 by Benjamin Block
  5. //  Description:
  6. // -------------------------------------------------------------------------
  7. //
  8. ////////////////////////////////////////////////////////////////////////////
  9.  
  10. #include "StdAfx.h"
  11. #include "ParticleFeature.h"
  12.  
  13. namespace pfx2
  14. {
  15.  
  16. void CParticleFeature::Serialize(Serialization::IArchive& ar)
  17. {
  18.         ar(m_enabled);
  19. }
  20.  
  21. void CParticleFeature::AddNoPropertiesLabel(Serialization::IArchive& ar)
  22. {
  23.         if (ar.isEdit() && ar.isOutput())
  24.         {
  25.                 const string label;            
  26.                 ar(label, "", "!No Properties");
  27.         }
  28. }
  29.  
  30. gpu_pfx2::IParticleFeatureGpuInterface* pfx2::CParticleFeature::GetGpuInterface()
  31. {
  32.         if (m_gpuInterfaceRef.feature == gpu_pfx2::eGpuFeatureType_None)
  33.                 return nullptr;
  34.         if (!m_gpuInterfaceNeeded || !gEnv->pRenderer)
  35.                 m_gpuInterfaceRef.gpuInterface.reset();
  36.         else
  37.         {
  38.                 if (!m_gpuInterfaceRef.gpuInterface)
  39.                         m_gpuInterfaceRef.gpuInterface = gEnv->pRenderer->GetGpuParticleManager()->CreateParticleFeatureGpuInterface(m_gpuInterfaceRef.feature);
  40.         }
  41.         return m_gpuInterfaceRef.gpuInterface.get();
  42. }
  43.  
  44. class CFeatureComment : public CParticleFeature
  45. {
  46. public:
  47.         CRY_PFX2_DECLARE_FEATURE
  48.  
  49.         virtual void Serialize(Serialization::IArchive& ar) override
  50.         {
  51.                 CParticleFeature::Serialize(ar);
  52.                 ar(m_text, "Text", "Text");
  53.         }
  54.  
  55. private:
  56.         string m_text;
  57. };
  58.  
  59. CRY_PFX2_IMPLEMENT_FEATURE(CParticleFeature, CFeatureComment, "General", "Comment", colorGeneral);
  60.  
  61. }
  62.  
downloadParticleFeature.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top