RenderPath.pkg 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. $#include "RenderPath.h"
  2. /// Rendering path definition.
  3. class RenderPath
  4. {
  5. public:
  6. /// Clone the rendering path.
  7. SharedPtr<RenderPath> Clone();
  8. /// Clear existing data and load from an XML file. Return true if successful.
  9. bool Load(XMLFile* file);
  10. /// Append data from an XML file. Return true if successful.
  11. bool Append(XMLFile* file);
  12. /// Enable/disable commands and rendertargets by tag.
  13. void SetEnabled(const char* tag, bool active);
  14. /// Toggle enabled state of commands and rendertargets by tag.
  15. void ToggleEnabled(const char* tag);
  16. /// Assign rendertarget at index.
  17. void SetRenderTarget(unsigned index, const RenderTargetInfo& info);
  18. /// Add a rendertarget.
  19. void AddRenderTarget(const RenderTargetInfo& info);
  20. /// Remove a rendertarget by index.
  21. void RemoveRenderTarget(unsigned index);
  22. /// Remove a rendertarget by name.
  23. void RemoveRenderTarget(const char* name);
  24. /// Remove rendertargets by tag name.
  25. void RemoveRenderTargets(const char* tag);
  26. /// Assign command at index.
  27. void SetCommand(unsigned index, const RenderPathCommand& command);
  28. /// Add a command to the end of the list.
  29. void AddCommand(const RenderPathCommand& command);
  30. /// Insert a command at a position.
  31. void InsertCommand(unsigned index, const RenderPathCommand& command);
  32. /// Remove a command by index.
  33. void RemoveCommand(unsigned index);
  34. /// Remove commands by tag name.
  35. void RemoveCommands(const char* tag);
  36. /// Set a shader parameter in all commands that define it.
  37. void SetShaderParameter(const char* name, const Vector4& value);
  38. /// Return number of rendertargets.
  39. unsigned GetNumRenderTargets() const { return renderTargets_.Size(); }
  40. /// Return number of commands.
  41. unsigned GetNumCommands() const { return commands_.Size(); }
  42. /// Return a shader parameter (first appearance in any command.)
  43. const Vector4& GetShaderParameter(const char* name) const;
  44. };