RenderPath.pkg 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. $#include "RenderPath.h"
  2. class RenderPath
  3. {
  4. // SharedPtr<RenderPath> Clone();
  5. tolua_outside RenderPath* RenderPathClone @ Clone();
  6. bool Load(XMLFile* file);
  7. bool Append(XMLFile* file);
  8. void SetEnabled(const String tag, bool active);
  9. void ToggleEnabled(const String tag);
  10. void SetRenderTarget(unsigned index, const RenderTargetInfo& info);
  11. void AddRenderTarget(const RenderTargetInfo& info);
  12. void RemoveRenderTarget(const String name);
  13. void RemoveRenderTarget(unsigned index);
  14. void RemoveRenderTargets(const String tag);
  15. void SetCommand(unsigned index, const RenderPathCommand& command);
  16. void AddCommand(const RenderPathCommand& command);
  17. void InsertCommand(unsigned index, const RenderPathCommand& command);
  18. void RemoveCommand(unsigned index);
  19. void RemoveCommands(const String tag);
  20. void SetShaderParameter(const String name, const Variant& value);
  21. unsigned GetNumRenderTargets() const;
  22. unsigned GetNumCommands() const;
  23. const Variant& GetShaderParameter(const String name) const;
  24. };
  25. ${
  26. static RenderPath* RenderPathClone(RenderPath* renderPath)
  27. {
  28. if (!renderPath)
  29. return 0;
  30. SharedPtr<RenderPath> clonedRenderPathPtr = renderPath->Clone();
  31. RenderPath* clonedRenderPath = clonedRenderPathPtr.Get();
  32. clonedRenderPathPtr.Detach();
  33. return clonedRenderPath;
  34. }
  35. $}