| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // TextureCube.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho
- {
- /// <summary>
- /// Cube texture resource.
- /// </summary>
- public unsafe partial class TextureCube : Texture
- {
- unsafe partial void OnTextureCubeCreated ();
- [Preserve]
- public TextureCube (IntPtr handle) : base (handle)
- {
- OnTextureCubeCreated ();
- }
- [Preserve]
- protected TextureCube (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnTextureCubeCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TextureCube_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (TextureCube_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TextureCube_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (TextureCube_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TextureCube_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(TextureCube));
- return new StringHash (TextureCube_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TextureCube_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(TextureCube));
- return Marshal.PtrToStringAnsi (TextureCube_GetTypeNameStatic ());
- }
- [Preserve]
- public TextureCube () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TextureCube_TextureCube (IntPtr context);
- [Preserve]
- public TextureCube (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(TextureCube));
- handle = TextureCube_TextureCube ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnTextureCubeCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TextureCube_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(TextureCube));
- TextureCube_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_BeginLoad_File (IntPtr handle, IntPtr source);
- /// <summary>
- /// Load resource from stream. May be called from a worker thread. Return true if successful.
- /// </summary>
- public override bool BeginLoad (File source)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_BeginLoad_File (handle, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_BeginLoad_MemoryBuffer (IntPtr handle, IntPtr source);
- /// <summary>
- /// Load resource from stream. May be called from a worker thread. Return true if successful.
- /// </summary>
- public override bool BeginLoad (MemoryBuffer source)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_BeginLoad_MemoryBuffer (handle, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_EndLoad (IntPtr handle);
- /// <summary>
- /// Finish resource loading. Always called from the main thread. Return true if successful.
- /// </summary>
- public override bool EndLoad ()
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_EndLoad (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TextureCube_Release (IntPtr handle);
- /// <summary>
- /// Release the texture.
- /// </summary>
- public void Release ()
- {
- Runtime.ValidateRefCounted (this);
- TextureCube_Release (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_SetSize (IntPtr handle, int size, uint format, TextureUsage usage, int multiSample);
- /// <summary>
- /// Set size, format, usage and multisampling parameter for rendertargets. Note that cube textures always use autoresolve when multisampled due to lacking support (on all APIs) to multisample them in a shader. Return true if successful.
- /// </summary>
- public bool SetSize (int size, uint format, TextureUsage usage = TextureUsage.Static, int multiSample = 1)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_SetSize (handle, size, format, usage, multiSample);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_SetData (IntPtr handle, CubeMapFace face, uint level, int x, int y, int width, int height, void* data);
- /// <summary>
- /// Set data either partially or fully on a face's mip level. Return true if successful.
- /// </summary>
- public bool SetData (CubeMapFace face, uint level, int x, int y, int width, int height, void* data)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_SetData (handle, face, level, x, y, width, height, data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_SetData0_File (IntPtr handle, CubeMapFace face, IntPtr source);
- /// <summary>
- /// Set data of one face from a stream. Return true if successful.
- /// </summary>
- public bool SetData (CubeMapFace face, File source)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_SetData0_File (handle, face, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_SetData0_MemoryBuffer (IntPtr handle, CubeMapFace face, IntPtr source);
- /// <summary>
- /// Set data of one face from a stream. Return true if successful.
- /// </summary>
- public bool SetData (CubeMapFace face, MemoryBuffer source)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_SetData0_MemoryBuffer (handle, face, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_SetData1 (IntPtr handle, CubeMapFace face, IntPtr image, bool useAlpha);
- /// <summary>
- /// Set data of one face from an image. Return true if successful. Optionally make a single channel image alpha-only.
- /// </summary>
- public bool SetData (CubeMapFace face, Image image, bool useAlpha = false)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_SetData1 (handle, face, (object)image == null ? IntPtr.Zero : image.Handle, useAlpha);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TextureCube_GetData (IntPtr handle, CubeMapFace face, uint level, IntPtr dest);
- /// <summary>
- /// Get data from a face's mip level. The destination buffer must be big enough. Return true if successful.
- /// </summary>
- public bool GetData (CubeMapFace face, uint level, IntPtr dest)
- {
- Runtime.ValidateRefCounted (this);
- return TextureCube_GetData (handle, face, level, dest);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TextureCube_GetImage (IntPtr handle, CubeMapFace face);
- /// <summary>
- /// Get image data from a face's zero mip level. Only RGB and RGBA textures are supported.
- /// </summary>
- public Image GetImage (CubeMapFace face)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<Image> (TextureCube_GetImage (handle, face));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TextureCube_GetRenderSurface (IntPtr handle, CubeMapFace face);
- /// <summary>
- /// Return render surface for one face.
- /// </summary>
- public RenderSurface GetRenderSurface (CubeMapFace face)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<RenderSurface> (TextureCube_GetRenderSurface (handle, face));
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- }
- }
|