RenderPath.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // RenderPath.cs
  6. //
  7. // Copyright 2015 Xamarin Inc. All rights reserved.
  8. using System;
  9. using System.Runtime.InteropServices;
  10. using System.Collections.Generic;
  11. using Urho.Urho2D;
  12. using Urho.Gui;
  13. using Urho.Resources;
  14. using Urho.IO;
  15. using Urho.Navigation;
  16. using Urho.Network;
  17. namespace Urho
  18. {
  19. /// <summary>
  20. /// Rendering path definition. A sequence of commands (e.g. clear screen, draw objects with specific pass) that yields the scene rendering result.
  21. /// </summary>
  22. public unsafe partial class RenderPath : RefCounted
  23. {
  24. unsafe partial void OnRenderPathCreated ();
  25. [Preserve]
  26. public RenderPath (IntPtr handle) : base (handle)
  27. {
  28. OnRenderPathCreated ();
  29. }
  30. [Preserve]
  31. protected RenderPath (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnRenderPathCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern IntPtr RenderPath_RenderPath ();
  37. [Preserve]
  38. public RenderPath () : base (UrhoObjectFlag.Empty)
  39. {
  40. Runtime.Validate (typeof(RenderPath));
  41. handle = RenderPath_RenderPath ();
  42. Runtime.RegisterObject (this);
  43. OnRenderPathCreated ();
  44. }
  45. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  46. internal static extern IntPtr RenderPath_Clone (IntPtr handle);
  47. /// <summary>
  48. /// Clone the rendering path.
  49. /// </summary>
  50. public RenderPath Clone ()
  51. {
  52. Runtime.ValidateRefCounted (this);
  53. return Runtime.LookupRefCounted<RenderPath> (RenderPath_Clone (handle));
  54. }
  55. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  56. internal static extern bool RenderPath_Load (IntPtr handle, IntPtr file);
  57. /// <summary>
  58. /// Clear existing data and load from an XML file. Return true if successful.
  59. /// </summary>
  60. public bool Load (Urho.Resources.XmlFile file)
  61. {
  62. Runtime.ValidateRefCounted (this);
  63. return RenderPath_Load (handle, (object)file == null ? IntPtr.Zero : file.Handle);
  64. }
  65. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  66. internal static extern bool RenderPath_Append (IntPtr handle, IntPtr file);
  67. /// <summary>
  68. /// Append data from an XML file. Return true if successful.
  69. /// </summary>
  70. public bool Append (Urho.Resources.XmlFile file)
  71. {
  72. Runtime.ValidateRefCounted (this);
  73. return RenderPath_Append (handle, (object)file == null ? IntPtr.Zero : file.Handle);
  74. }
  75. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  76. internal static extern void RenderPath_SetEnabled (IntPtr handle, string tag, bool active);
  77. /// <summary>
  78. /// Enable/disable commands and rendertargets by tag.
  79. /// </summary>
  80. public void SetEnabled (string tag, bool active)
  81. {
  82. Runtime.ValidateRefCounted (this);
  83. RenderPath_SetEnabled (handle, tag, active);
  84. }
  85. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  86. internal static extern bool RenderPath_IsEnabled (IntPtr handle, string tag);
  87. /// <summary>
  88. /// Return true of any of render targets or commands with specified tag are enabled.
  89. /// </summary>
  90. public bool IsEnabled (string tag)
  91. {
  92. Runtime.ValidateRefCounted (this);
  93. return RenderPath_IsEnabled (handle, tag);
  94. }
  95. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  96. internal static extern bool RenderPath_IsAdded (IntPtr handle, string tag);
  97. /// <summary>
  98. /// Return true if renderpath or command with given tag exists.
  99. /// </summary>
  100. public bool IsAdded (string tag)
  101. {
  102. Runtime.ValidateRefCounted (this);
  103. return RenderPath_IsAdded (handle, tag);
  104. }
  105. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  106. internal static extern void RenderPath_ToggleEnabled (IntPtr handle, string tag);
  107. /// <summary>
  108. /// Toggle enabled state of commands and rendertargets by tag.
  109. /// </summary>
  110. public void ToggleEnabled (string tag)
  111. {
  112. Runtime.ValidateRefCounted (this);
  113. RenderPath_ToggleEnabled (handle, tag);
  114. }
  115. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  116. internal static extern void RenderPath_RemoveRenderTarget (IntPtr handle, uint index);
  117. /// <summary>
  118. /// Remove a rendertarget by index.
  119. /// </summary>
  120. public void RemoveRenderTarget (uint index)
  121. {
  122. Runtime.ValidateRefCounted (this);
  123. RenderPath_RemoveRenderTarget (handle, index);
  124. }
  125. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  126. internal static extern void RenderPath_RemoveRenderTarget0 (IntPtr handle, string name);
  127. /// <summary>
  128. /// Remove a rendertarget by name.
  129. /// </summary>
  130. public void RemoveRenderTarget (string name)
  131. {
  132. Runtime.ValidateRefCounted (this);
  133. RenderPath_RemoveRenderTarget0 (handle, name);
  134. }
  135. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  136. internal static extern void RenderPath_RemoveRenderTargets (IntPtr handle, string tag);
  137. /// <summary>
  138. /// Remove rendertargets by tag name.
  139. /// </summary>
  140. public void RemoveRenderTargets (string tag)
  141. {
  142. Runtime.ValidateRefCounted (this);
  143. RenderPath_RemoveRenderTargets (handle, tag);
  144. }
  145. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  146. internal static extern void RenderPath_SetCommand (IntPtr handle, uint index, ref Urho.RenderPathCommand command);
  147. /// <summary>
  148. /// Assign command at index.
  149. /// </summary>
  150. public void SetCommand (uint index, Urho.RenderPathCommand command)
  151. {
  152. Runtime.ValidateRefCounted (this);
  153. RenderPath_SetCommand (handle, index, ref command);
  154. }
  155. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  156. internal static extern void RenderPath_AddCommand (IntPtr handle, ref Urho.RenderPathCommand command);
  157. /// <summary>
  158. /// Add a command to the end of the list.
  159. /// </summary>
  160. public void AddCommand (Urho.RenderPathCommand command)
  161. {
  162. Runtime.ValidateRefCounted (this);
  163. RenderPath_AddCommand (handle, ref command);
  164. }
  165. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  166. internal static extern void RenderPath_InsertCommand (IntPtr handle, uint index, ref Urho.RenderPathCommand command);
  167. /// <summary>
  168. /// Insert a command at a position.
  169. /// </summary>
  170. public void InsertCommand (uint index, Urho.RenderPathCommand command)
  171. {
  172. Runtime.ValidateRefCounted (this);
  173. RenderPath_InsertCommand (handle, index, ref command);
  174. }
  175. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  176. internal static extern void RenderPath_RemoveCommand (IntPtr handle, uint index);
  177. /// <summary>
  178. /// Remove a command by index.
  179. /// </summary>
  180. public void RemoveCommand (uint index)
  181. {
  182. Runtime.ValidateRefCounted (this);
  183. RenderPath_RemoveCommand (handle, index);
  184. }
  185. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  186. internal static extern void RenderPath_RemoveCommands (IntPtr handle, string tag);
  187. /// <summary>
  188. /// Remove commands by tag name.
  189. /// </summary>
  190. public void RemoveCommands (string tag)
  191. {
  192. Runtime.ValidateRefCounted (this);
  193. RenderPath_RemoveCommands (handle, tag);
  194. }
  195. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  196. internal static extern void RenderPath_SetShaderParameter_0 (IntPtr handle, string name, ref Vector3 value);
  197. /// <summary>
  198. /// Set a shader parameter in all commands that define it.
  199. /// </summary>
  200. public void SetShaderParameter (string name, Vector3 value)
  201. {
  202. Runtime.ValidateRefCounted (this);
  203. RenderPath_SetShaderParameter_0 (handle, name, ref value);
  204. }
  205. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  206. internal static extern void RenderPath_SetShaderParameter_1 (IntPtr handle, string name, ref IntRect value);
  207. /// <summary>
  208. /// Set a shader parameter in all commands that define it.
  209. /// </summary>
  210. public void SetShaderParameter (string name, IntRect value)
  211. {
  212. Runtime.ValidateRefCounted (this);
  213. RenderPath_SetShaderParameter_1 (handle, name, ref value);
  214. }
  215. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  216. internal static extern void RenderPath_SetShaderParameter_2 (IntPtr handle, string name, ref Color value);
  217. /// <summary>
  218. /// Set a shader parameter in all commands that define it.
  219. /// </summary>
  220. public void SetShaderParameter (string name, Color value)
  221. {
  222. Runtime.ValidateRefCounted (this);
  223. RenderPath_SetShaderParameter_2 (handle, name, ref value);
  224. }
  225. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  226. internal static extern void RenderPath_SetShaderParameter_3 (IntPtr handle, string name, ref Vector2 value);
  227. /// <summary>
  228. /// Set a shader parameter in all commands that define it.
  229. /// </summary>
  230. public void SetShaderParameter (string name, Vector2 value)
  231. {
  232. Runtime.ValidateRefCounted (this);
  233. RenderPath_SetShaderParameter_3 (handle, name, ref value);
  234. }
  235. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  236. internal static extern void RenderPath_SetShaderParameter_4 (IntPtr handle, string name, ref Vector4 value);
  237. /// <summary>
  238. /// Set a shader parameter in all commands that define it.
  239. /// </summary>
  240. public void SetShaderParameter (string name, Vector4 value)
  241. {
  242. Runtime.ValidateRefCounted (this);
  243. RenderPath_SetShaderParameter_4 (handle, name, ref value);
  244. }
  245. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  246. internal static extern void RenderPath_SetShaderParameter_5 (IntPtr handle, string name, ref IntVector2 value);
  247. /// <summary>
  248. /// Set a shader parameter in all commands that define it.
  249. /// </summary>
  250. public void SetShaderParameter (string name, IntVector2 value)
  251. {
  252. Runtime.ValidateRefCounted (this);
  253. RenderPath_SetShaderParameter_5 (handle, name, ref value);
  254. }
  255. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  256. internal static extern void RenderPath_SetShaderParameter_6 (IntPtr handle, string name, ref Quaternion value);
  257. /// <summary>
  258. /// Set a shader parameter in all commands that define it.
  259. /// </summary>
  260. public void SetShaderParameter (string name, Quaternion value)
  261. {
  262. Runtime.ValidateRefCounted (this);
  263. RenderPath_SetShaderParameter_6 (handle, name, ref value);
  264. }
  265. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  266. internal static extern void RenderPath_SetShaderParameter_7 (IntPtr handle, string name, ref Matrix4 value);
  267. /// <summary>
  268. /// Set a shader parameter in all commands that define it.
  269. /// </summary>
  270. public void SetShaderParameter (string name, Matrix4 value)
  271. {
  272. Runtime.ValidateRefCounted (this);
  273. RenderPath_SetShaderParameter_7 (handle, name, ref value);
  274. }
  275. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  276. internal static extern void RenderPath_SetShaderParameter_8 (IntPtr handle, string name, ref Matrix3x4 value);
  277. /// <summary>
  278. /// Set a shader parameter in all commands that define it.
  279. /// </summary>
  280. public void SetShaderParameter (string name, Matrix3x4 value)
  281. {
  282. Runtime.ValidateRefCounted (this);
  283. RenderPath_SetShaderParameter_8 (handle, name, ref value);
  284. }
  285. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  286. internal static extern void RenderPath_SetShaderParameter_9 (IntPtr handle, string name, int value);
  287. /// <summary>
  288. /// Set a shader parameter in all commands that define it.
  289. /// </summary>
  290. public void SetShaderParameter (string name, int value)
  291. {
  292. Runtime.ValidateRefCounted (this);
  293. RenderPath_SetShaderParameter_9 (handle, name, value);
  294. }
  295. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  296. internal static extern void RenderPath_SetShaderParameter_10 (IntPtr handle, string name, float value);
  297. /// <summary>
  298. /// Set a shader parameter in all commands that define it.
  299. /// </summary>
  300. public void SetShaderParameter (string name, float value)
  301. {
  302. Runtime.ValidateRefCounted (this);
  303. RenderPath_SetShaderParameter_10 (handle, name, value);
  304. }
  305. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  306. internal static extern void RenderPath_SetShaderParameter_11 (IntPtr handle, string name, string value);
  307. /// <summary>
  308. /// Set a shader parameter in all commands that define it.
  309. /// </summary>
  310. public void SetShaderParameter (string name, string value)
  311. {
  312. Runtime.ValidateRefCounted (this);
  313. RenderPath_SetShaderParameter_11 (handle, name, value);
  314. }
  315. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  316. internal static extern void RenderPath_SetShaderParameter_12 (IntPtr handle, string name, bool value);
  317. /// <summary>
  318. /// Set a shader parameter in all commands that define it.
  319. /// </summary>
  320. public void SetShaderParameter (string name, bool value)
  321. {
  322. Runtime.ValidateRefCounted (this);
  323. RenderPath_SetShaderParameter_12 (handle, name, value);
  324. }
  325. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  326. internal static extern uint RenderPath_GetNumRenderTargets (IntPtr handle);
  327. /// <summary>
  328. /// Return number of rendertargets.
  329. /// </summary>
  330. private uint GetNumRenderTargets ()
  331. {
  332. Runtime.ValidateRefCounted (this);
  333. return RenderPath_GetNumRenderTargets (handle);
  334. }
  335. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  336. internal static extern uint RenderPath_GetNumCommands (IntPtr handle);
  337. /// <summary>
  338. /// Return number of commands.
  339. /// </summary>
  340. private uint GetNumCommands ()
  341. {
  342. Runtime.ValidateRefCounted (this);
  343. return RenderPath_GetNumCommands (handle);
  344. }
  345. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  346. internal static extern RenderPathCommand* RenderPath_GetCommand (IntPtr handle, uint index);
  347. /// <summary>
  348. /// Return command at index, or null if does not exist.
  349. /// </summary>
  350. public RenderPathCommand* GetCommand (uint index)
  351. {
  352. Runtime.ValidateRefCounted (this);
  353. return RenderPath_GetCommand (handle, index);
  354. }
  355. /// <summary>
  356. /// Return number of rendertargets.
  357. /// </summary>
  358. public uint NumRenderTargets {
  359. get {
  360. return GetNumRenderTargets ();
  361. }
  362. }
  363. /// <summary>
  364. /// Return number of commands.
  365. /// </summary>
  366. public uint NumCommands {
  367. get {
  368. return GetNumCommands ();
  369. }
  370. }
  371. }
  372. }