RenderPath.pkg 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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(unsigned index);
  13. void RemoveRenderTarget(const String name);
  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. RenderPath* RenderPathClone(RenderPath* renderPath)
  27. {
  28. if (renderPath == 0)
  29. return 0;
  30. RenderPath* newRenderPath = new RenderPath();
  31. newRenderPath->renderTargets_ = renderPath->renderTargets_;
  32. newRenderPath->commands_ = renderPath->commands_;
  33. return newRenderPath;
  34. }
  35. $}