BVB Source Codes

CRYENGINE Show MaterialHelpers.h Source code

Return Download CRYENGINE: download MaterialHelpers.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:   MaterialHelpers.h
  5. //  Version:     v1.00
  6. //  Created:     6/6/2014 by NielsF.
  7. //  Compilers:   Visual Studio 2012
  8. //  Description:
  9. // -------------------------------------------------------------------------
  10. //  History:
  11. //
  12. ////////////////////////////////////////////////////////////////////////////
  13.  
  14. #ifndef __MaterialHelpers_h__
  15. #define __MaterialHelpers_h__
  16. #pragma once
  17.  
  18. #include <Cry3DEngine/IMaterial.h>
  19.  
  20. // Description:
  21. //   Namespace "implementation", not a class "implementation", no member-variables, only const functions;
  22. //   Used to encapsulate the material-definition/io into Cry3DEngine (and make it plugable that way).
  23. struct MaterialHelpers : public IMaterialHelpers
  24. {
  25.         //////////////////////////////////////////////////////////////////////////
  26.         virtual EEfResTextures FindTexSlot(const char* texName) const final;
  27.         virtual const char*    FindTexName(EEfResTextures texSlot) const final;
  28.         virtual const char*    LookupTexName(EEfResTextures texSlot) const final;
  29.         virtual const char*    LookupTexEnum(EEfResTextures texSlot) const final;
  30.         virtual const char*    LookupTexSuffix(EEfResTextures texSlot) const final;
  31.         virtual bool           IsAdjustableTexSlot(EEfResTextures texSlot) const final;
  32.  
  33.         //////////////////////////////////////////////////////////////////////////
  34.  
  35.         virtual const char* GetNameFromTextureType(uint8 texType) const final;
  36.         virtual uint8       GetTextureTypeFromName(const char* szName) const final;
  37.         virtual bool        IsTextureTypeExposed(uint8 texType) const final;
  38.  
  39.         //////////////////////////////////////////////////////////////////////////
  40.         virtual bool SetGetMaterialParamFloat(IRenderShaderResources& pShaderResources, const char* sParamName, float& v, bool bGet) const final;
  41.         virtual bool SetGetMaterialParamVec3(IRenderShaderResources& pShaderResources, const char* sParamName, Vec3& v, bool bGet) const final;
  42.  
  43.         //////////////////////////////////////////////////////////////////////////
  44.         virtual void SetTexModFromXml(SEfTexModificator& pShaderResources, const XmlNodeRef& node) const final;
  45.         virtual void SetXmlFromTexMod(const SEfTexModificator& pShaderResources, XmlNodeRef& node) const final;
  46.  
  47.         //////////////////////////////////////////////////////////////////////////
  48.         virtual void SetTexturesFromXml(SInputShaderResources& pShaderResources, const XmlNodeRef& node, const char* szBaseFileName) const final;
  49.         virtual void SetXmlFromTextures(const SInputShaderResources& pShaderResources, XmlNodeRef& node, const char* szBaseFileName) const final;
  50.  
  51.         //////////////////////////////////////////////////////////////////////////
  52.         virtual void SetVertexDeformFromXml(SInputShaderResources& pShaderResources, const XmlNodeRef& node) const final;
  53.         virtual void SetXmlFromVertexDeform(const SInputShaderResources& pShaderResources, XmlNodeRef& node) const final;
  54.  
  55.         //////////////////////////////////////////////////////////////////////////
  56.         virtual void SetDetailDecalFromXml(SInputShaderResources& pShaderResources, const XmlNodeRef& node) const final;
  57.         virtual void SetXmlFromDetailDecal(const SInputShaderResources& pShaderResources, XmlNodeRef& node) const final;
  58.  
  59.         //////////////////////////////////////////////////////////////////////////
  60.         virtual void SetLightingFromXml(SInputShaderResources& pShaderResources, const XmlNodeRef& node) const final;
  61.         virtual void SetXmlFromLighting(const SInputShaderResources& pShaderResources, XmlNodeRef& node) const final;
  62.  
  63.         //////////////////////////////////////////////////////////////////////////
  64.         virtual void SetShaderParamsFromXml(SInputShaderResources& pShaderResources, const XmlNodeRef& node) const final;
  65.         virtual void SetXmlFromShaderParams(const SInputShaderResources& pShaderResources, XmlNodeRef& node) const final;
  66.  
  67.         //////////////////////////////////////////////////////////////////////////
  68.         virtual void MigrateXmlLegacyData(SInputShaderResources& pShaderResources, const XmlNodeRef& node) const final;
  69. };
  70.  
  71. #endif
  72.  
downloadMaterialHelpers.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