BVB Source Codes

CRYENGINE Show MFXLibrary.h Source code

Return Download CRYENGINE: download MFXLibrary.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // ----------------------------------------------------------------------------------------
  4. //  File name:   MFXLibrary.h
  5. //  Description: A library which contains a set of MFXEffects
  6. //
  7. ////////////////////////////////////////////////////////////////////////////////////////////
  8.  
  9. #ifndef _MFX_LIBRARY_H_
  10. #define _MFX_LIBRARY_H_
  11.  
  12. #pragma once
  13.  
  14. #include "MFXContainer.h"
  15.  
  16. class CMFXLibrary
  17. {
  18. private:
  19.         typedef std::map<TMFXNameId, TMFXContainerPtr, stl::less_stricmp<string>> TEffectContainersMap;
  20.  
  21. public:
  22.         typedef std::vector<string> TEffectNames;
  23.  
  24.         struct SLoadingEnvironment
  25.         {
  26.         public:
  27.  
  28.                 SLoadingEnvironment(const TMFXNameId& _libraryName, const XmlNodeRef& _libraryParamsNode, std::vector<TMFXContainerPtr>& _allContainers)
  29.                         : libraryName(_libraryName)
  30.                         , libraryParamsNode(_libraryParamsNode)
  31.                         , allContainers(_allContainers)
  32.                 {
  33.                 }
  34.  
  35.                 void AddLibraryContainer(const TMFXNameId& libraryName, TMFXContainerPtr pContainer)
  36.                 {
  37.                         pContainer->SetLibraryAndId(libraryName, static_cast<TMFXEffectId>(allContainers.size()));
  38.                         allContainers.push_back(pContainer);
  39.                 }
  40.  
  41.                 const TMFXNameId& libraryName;
  42.                 const XmlNodeRef& libraryParamsNode;
  43.  
  44.         private:
  45.                 std::vector<TMFXContainerPtr>& allContainers;
  46.         };
  47.  
  48. public:
  49.  
  50.         void             LoadFromXml(SLoadingEnvironment& loadingEnvironment);
  51.         TMFXContainerPtr FindEffectContainer(const char* effectName) const;
  52.         void             GetMemoryUsage(ICrySizer* pSizer) const;
  53.         void             GetEffectNames(TEffectNames& nameList) const;
  54.  
  55. private:
  56.  
  57.         bool AddContainer(const TMFXNameId& effectName, TMFXContainerPtr pContainer);
  58.  
  59. private:
  60.  
  61.         TEffectContainersMap m_effectContainers;
  62. };
  63.  
  64. #endif // _MFX_LIBRARY_H_
  65.  
downloadMFXLibrary.h 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