RenderPath.pkg 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 SetEnabled(const char* tag, bool active);
  10. void ToggleEnabled(const String& tag);
  11. void ToggleEnabled(const char* tag);
  12. void SetRenderTarget(unsigned index, const RenderTargetInfo& info);
  13. void AddRenderTarget(const RenderTargetInfo& info);
  14. void RemoveRenderTarget(unsigned index);
  15. void RemoveRenderTarget(const String& name);
  16. void RemoveRenderTarget(const char* name);
  17. void RemoveRenderTargets(const String& tag);
  18. void RemoveRenderTargets(const char* tag);
  19. void SetCommand(unsigned index, const RenderPathCommand& command);
  20. void AddCommand(const RenderPathCommand& command);
  21. void InsertCommand(unsigned index, const RenderPathCommand& command);
  22. void RemoveCommand(unsigned index);
  23. void RemoveCommands(const String& tag);
  24. void RemoveCommands(const char* tag);
  25. void SetShaderParameter(const String& name, const Variant& value);
  26. void SetShaderParameter(const char* name, const Variant& value);
  27. unsigned GetNumRenderTargets() const;
  28. unsigned GetNumCommands() const;
  29. const Variant& GetShaderParameter(const String& name) const;
  30. };
  31. ${
  32. RenderPath* RenderPathClone(RenderPath* renderPath)
  33. {
  34. if (renderPath == 0)
  35. return 0;
  36. RenderPath* newRenderPath = new RenderPath();
  37. newRenderPath->renderTargets_ = renderPath->renderTargets_;
  38. newRenderPath->commands_ = renderPath->commands_;
  39. return newRenderPath;
  40. }
  41. $}