$#include "Graphics/Technique.h" enum PassLightingMode { LIGHTING_UNLIT, LIGHTING_PERVERTEX, LIGHTING_PERPIXEL }; class Pass : public RefCounted { void SetBlendMode(BlendMode mode); void SetCullMode(CullMode mode); void SetDepthTestMode(CompareMode mode); void SetLightingMode(PassLightingMode mode); void SetDepthWrite(bool enable); void SetAlphaToCoverage(bool enable); void SetIsDesktop(bool enable); void SetVertexShader(const String name); void SetPixelShader(const String name); void SetVertexShaderDefines(const String defines); void SetPixelShaderDefines(const String defines); void SetVertexShaderDefineExcludes(const String excludes); void SetPixelShaderDefineExcludes(const String excludes); void ReleaseShaders(); const String GetName() const; unsigned GetIndex() const; CullMode GetCullMode() const; BlendMode GetBlendMode() const; CompareMode GetDepthTestMode() const; PassLightingMode GetLightingMode() const; bool GetDepthWrite() const; bool GetAlphaToCoverage() const; bool IsDesktop() const; const String GetVertexShader() const; const String GetPixelShader() const; const String GetVertexShaderDefines() const; const String GetPixelShaderDefines() const; const String GetVertexShaderDefineExcludes() const; const String GetPixelShaderDefineExcludes() const; tolua_readonly tolua_property__get_set String name; tolua_readonly tolua_property__get_set unsigned index; tolua_property__get_set BlendMode blendMode; tolua_property__get_set CullMode cullMode; tolua_property__get_set CompareMode depthTestMode; tolua_property__get_set PassLightingMode lightingMode; tolua_property__get_set bool depthWrite; tolua_property__get_set bool alphaToCoverage; tolua_readonly tolua_property__is_set bool desktop; tolua_property__get_set String vertexShader; tolua_property__get_set String pixelShader; tolua_property__get_set String vertexShaderDefines; tolua_property__get_set String pixelShaderDefines; tolua_property__get_set String vertexShaderDefineExcludes; tolua_property__get_set String pixelShaderDefineExcludes; }; class Technique : public Resource { void SetIsDesktop(bool enable); Pass* CreatePass(const String passName); void RemovePass(const String passName); void ReleaseShaders(); tolua_outside Technique* TechniqueClone @ Clone(const String cloneName = String::EMPTY) const; bool HasPass(const String type) const; Pass* GetPass(const String type) const; Pass* GetSupportedPass(const String type) const; bool IsSupported() const; bool IsDesktop() const; unsigned GetNumPasses() const; tolua_outside const Vector& TechniqueGetPassNames @ GetPassTypes() const; tolua_outside const PODVector& TechniqueGetPasses @ GetPasses() const; tolua_readonly tolua_property__is_set bool supported; tolua_readonly tolua_property__is_set bool desktop; tolua_readonly tolua_property__get_set unsigned numPasses; }; ${ static const Vector& TechniqueGetPassNames(const Technique* technique) { static Vector vector = technique->GetPassNames(); return vector; } static const PODVector& TechniqueGetPasses(const Technique* technique) { static PODVector vector = technique->GetPasses(); return vector; } static Technique* TechniqueClone(const Technique* technique, const String& cloneName = String::EMPTY) { if (!technique) return 0; SharedPtr clonedTechniquePtr = technique->Clone(cloneName); Technique* clonedTechnique = clonedTechniquePtr.Get(); clonedTechniquePtr.Detach(); return clonedTechnique; } $}