Skip to content

Instantly share code, notes, and snippets.

@JoshEngebretson
Last active June 26, 2016 23:34
Show Gist options
  • Save JoshEngebretson/02e3b272da5eae6efdd436e6c56e817b to your computer and use it in GitHub Desktop.
Save JoshEngebretson/02e3b272da5eae6efdd436e6c56e817b to your computer and use it in GitHub Desktop.
Atomic C# managed bindings example
// Autogenerated
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace AtomicEngine
{
public enum UpdateGeometryType
{
UPDATE_NONE,
UPDATE_MAIN_THREAD,
UPDATE_WORKER_THREAD
}
public enum PrimitiveType
{
TRIANGLE_LIST,
LINE_LIST,
POINT_LIST,
TRIANGLE_STRIP,
LINE_STRIP,
TRIANGLE_FAN
}
public enum GeometryType
{
GEOM_STATIC,
GEOM_SKINNED,
GEOM_INSTANCED,
GEOM_BILLBOARD,
GEOM_STATIC_NOINSTANCING,
MAX_GEOMETRYTYPES
}
public enum BlendMode
{
BLEND_REPLACE,
BLEND_ADD,
BLEND_MULTIPLY,
BLEND_ALPHA,
BLEND_ADDALPHA,
BLEND_PREMULALPHA,
BLEND_INVDESTALPHA,
BLEND_SUBTRACT,
BLEND_SUBTRACTALPHA,
MAX_BLENDMODES
}
public enum CompareMode
{
CMP_ALWAYS,
CMP_EQUAL,
CMP_NOTEQUAL,
CMP_LESS,
CMP_LESSEQUAL,
CMP_GREATER,
CMP_GREATEREQUAL,
MAX_COMPAREMODES
}
public enum CullMode
{
CULL_NONE,
CULL_CCW,
CULL_CW,
MAX_CULLMODES
}
public enum FillMode
{
FILL_SOLID,
FILL_WIREFRAME,
FILL_POINT
}
public enum StencilOp
{
OP_KEEP,
OP_ZERO,
OP_REF,
OP_INCR,
OP_DECR
}
public enum LockState
{
LOCK_NONE,
LOCK_HARDWARE,
LOCK_SHADOW,
LOCK_SCRATCH
}
public enum VertexElement
{
ELEMENT_POSITION,
ELEMENT_NORMAL,
ELEMENT_COLOR,
ELEMENT_TEXCOORD1,
ELEMENT_TEXCOORD2,
ELEMENT_CUBETEXCOORD1,
ELEMENT_CUBETEXCOORD2,
ELEMENT_TANGENT,
ELEMENT_BLENDWEIGHTS,
ELEMENT_BLENDINDICES,
ELEMENT_INSTANCEMATRIX1,
ELEMENT_INSTANCEMATRIX2,
ELEMENT_INSTANCEMATRIX3,
MAX_VERTEX_ELEMENTS
}
public enum TextureFilterMode
{
FILTER_NEAREST,
FILTER_BILINEAR,
FILTER_TRILINEAR,
FILTER_ANISOTROPIC,
FILTER_DEFAULT,
MAX_FILTERMODES
}
public enum TextureAddressMode
{
ADDRESS_WRAP,
ADDRESS_MIRROR,
ADDRESS_CLAMP,
ADDRESS_BORDER,
MAX_ADDRESSMODES
}
public enum TextureCoordinate
{
COORD_U,
COORD_V,
COORD_W,
MAX_COORDS
}
public enum TextureUsage
{
TEXTURE_STATIC,
TEXTURE_DYNAMIC,
TEXTURE_RENDERTARGET,
TEXTURE_DEPTHSTENCIL
}
public enum CubeMapFace
{
FACE_POSITIVE_X,
FACE_NEGATIVE_X,
FACE_POSITIVE_Y,
FACE_NEGATIVE_Y,
FACE_POSITIVE_Z,
FACE_NEGATIVE_Z,
MAX_CUBEMAP_FACES
}
public enum CubeMapLayout
{
CML_HORIZONTAL,
CML_HORIZONTALNVIDIA,
CML_HORIZONTALCROSS,
CML_VERTICALCROSS,
CML_BLENDER
}
public enum RenderSurfaceUpdateMode
{
SURFACE_MANUALUPDATE,
SURFACE_UPDATEVISIBLE,
SURFACE_UPDATEALWAYS
}
public enum ShaderType
{
VS,
PS
}
public enum ShaderParameterGroup
{
SP_FRAME,
SP_CAMERA,
SP_ZONE,
SP_LIGHT,
SP_MATERIAL,
SP_OBJECT,
SP_CUSTOM,
MAX_SHADER_PARAMETER_GROUPS
}
public enum TextureUnit
{
TU_DIFFUSE = 0,
TU_ALBEDOBUFFER = 0,
TU_NORMAL = 1,
TU_NORMALBUFFER = 1,
TU_SPECULAR = 2,
TU_EMISSIVE = 3,
TU_ENVIRONMENT = 4,
TU_VOLUMEMAP = 5,
TU_CUSTOM1 = 6,
TU_CUSTOM2 = 7,
TU_LIGHTRAMP = 8,
TU_LIGHTSHAPE = 9,
TU_SHADOWMAP = 10,
TU_FACESELECT = 11,
TU_INDIRECTION = 12,
TU_DEPTHBUFFER = 13,
TU_LIGHTBUFFER = 14,
TU_ZONE = 15,
MAX_MATERIAL_TEXTURE_UNITS = 8,
MAX_TEXTURE_UNITS = 16
}
public enum FaceCameraMode
{
FC_NONE,
FC_ROTATE_XYZ,
FC_ROTATE_Y,
FC_LOOKAT_XYZ,
FC_LOOKAT_Y
}
public enum LightType
{
LIGHT_DIRECTIONAL,
LIGHT_SPOT,
LIGHT_POINT
}
public enum RayQueryLevel
{
RAY_AABB,
RAY_OBB,
RAY_TRIANGLE,
RAY_TRIANGLE_UV
}
public enum LightVSVariation
{
LVS_DIR,
LVS_SPOT,
LVS_POINT,
LVS_SHADOW,
LVS_SPOTSHADOW,
LVS_POINTSHADOW,
MAX_LIGHT_VS_VARIATIONS
}
public enum VertexLightVSVariation
{
VLVS_NOLIGHTS,
VLVS_1LIGHT,
VLVS_2LIGHTS,
VLVS_3LIGHTS,
VLVS_4LIGHTS,
MAX_VERTEXLIGHT_VS_VARIATIONS
}
public enum LightPSVariation
{
LPS_NONE,
LPS_SPOT,
LPS_POINT,
LPS_POINTMASK,
LPS_SPEC,
LPS_SPOTSPEC,
LPS_POINTSPEC,
LPS_POINTMASKSPEC,
LPS_SHADOW,
LPS_SPOTSHADOW,
LPS_POINTSHADOW,
LPS_POINTMASKSHADOW,
LPS_SHADOWSPEC,
LPS_SPOTSHADOWSPEC,
LPS_POINTSHADOWSPEC,
LPS_POINTMASKSHADOWSPEC,
MAX_LIGHT_PS_VARIATIONS
}
public enum DeferredLightVSVariation
{
DLVS_NONE,
DLVS_DIR,
DLVS_ORTHO,
DLVS_ORTHODIR,
MAX_DEFERRED_LIGHT_VS_VARIATIONS
}
public enum DeferredLightPSVariation
{
DLPS_NONE,
DLPS_SPOT,
DLPS_POINT,
DLPS_POINTMASK,
DLPS_SPEC,
DLPS_SPOTSPEC,
DLPS_POINTSPEC,
DLPS_POINTMASKSPEC,
DLPS_SHADOW,
DLPS_SPOTSHADOW,
DLPS_POINTSHADOW,
DLPS_POINTMASKSHADOW,
DLPS_SHADOWSPEC,
DLPS_SPOTSHADOWSPEC,
DLPS_POINTSHADOWSPEC,
DLPS_POINTMASKSHADOWSPEC,
DLPS_ORTHO,
DLPS_ORTHOSPOT,
DLPS_ORTHOPOINT,
DLPS_ORTHOPOINTMASK,
DLPS_ORTHOSPEC,
DLPS_ORTHOSPOTSPEC,
DLPS_ORTHOPOINTSPEC,
DLPS_ORTHOPOINTMASKSPEC,
DLPS_ORTHOSHADOW,
DLPS_ORTHOSPOTSHADOW,
DLPS_ORTHOPOINTSHADOW,
DLPS_ORTHOPOINTMASKSHADOW,
DLPS_ORTHOSHADOWSPEC,
DLPS_ORTHOSPOTSHADOWSPEC,
DLPS_ORTHOPOINTSHADOWSPEC,
DLPS_ORTHOPOINTMASKSHADOWSPEC,
MAX_DEFERRED_LIGHT_PS_VARIATIONS
}
public enum RenderCommandType
{
CMD_NONE,
CMD_CLEAR,
CMD_SCENEPASS,
CMD_QUAD,
CMD_FORWARDLIGHTS,
CMD_LIGHTVOLUMES,
CMD_RENDERUI
}
public enum RenderCommandSortMode
{
SORT_FRONTTOBACK,
SORT_BACKTOFRONT
}
public enum RenderTargetSizeMode
{
SIZE_ABSOLUTE,
SIZE_VIEWPORTDIVISOR,
SIZE_VIEWPORTMULTIPLIER
}
public enum PassLightingMode
{
LIGHTING_UNLIT,
LIGHTING_PERVERTEX,
LIGHTING_PERPIXEL
}
public static partial class Constants
{
public const float DEFAULT_NEARCLIP = 0.1f;
public const float DEFAULT_FARCLIP = 1000.0f;
public const float DEFAULT_CAMERA_FOV = 45.0f;
public const float DEFAULT_ORTHOSIZE = 20.0f;
public const uint VO_NONE = 0x0;
public const uint VO_LOW_MATERIAL_QUALITY = 0x1;
public const uint VO_DISABLE_SHADOWS = 0x2;
public const uint VO_DISABLE_OCCLUSION = 0x4;
public const uint DRAWABLE_GEOMETRY = 0x1;
public const uint DRAWABLE_LIGHT = 0x2;
public const uint DRAWABLE_ZONE = 0x4;
public const uint DRAWABLE_GEOMETRY2D = 0x8;
public const uint DRAWABLE_ANY = 0xff;
public const uint DEFAULT_VIEWMASK = 0xffffffff;
public const uint DEFAULT_LIGHTMASK = 0xffffffff;
public const uint DEFAULT_SHADOWMASK = 0xffffffff;
public const uint DEFAULT_ZONEMASK = 0xffffffff;
public const int MAX_VERTEX_LIGHTS = 4;
public const float ANIMATION_LOD_BASESCALE = 2500.0f;
public const int QUALITY_LOW = 0;
public const int QUALITY_MEDIUM = 1;
public const int QUALITY_HIGH = 2;
public const int QUALITY_MAX = 15;
public const int SHADOWQUALITY_LOW_16BIT = 0;
public const int SHADOWQUALITY_LOW_24BIT = 1;
public const int SHADOWQUALITY_HIGH_16BIT = 2;
public const int SHADOWQUALITY_HIGH_24BIT = 3;
public const uint CLEAR_COLOR = 0x1;
public const uint CLEAR_DEPTH = 0x2;
public const uint CLEAR_STENCIL = 0x4;
public const uint MASK_NONE = 0x0;
public const uint MASK_POSITION = 0x1;
public const uint MASK_NORMAL = 0x2;
public const uint MASK_COLOR = 0x4;
public const uint MASK_TEXCOORD1 = 0x8;
public const uint MASK_TEXCOORD2 = 0x10;
public const uint MASK_CUBETEXCOORD1 = 0x20;
public const uint MASK_CUBETEXCOORD2 = 0x40;
public const uint MASK_TANGENT = 0x80;
public const uint MASK_BLENDWEIGHTS = 0x100;
public const uint MASK_BLENDINDICES = 0x200;
public const uint MASK_INSTANCEMATRIX1 = 0x400;
public const uint MASK_INSTANCEMATRIX2 = 0x800;
public const uint MASK_INSTANCEMATRIX3 = 0x1000;
public const uint MASK_DEFAULT = 0xffffffff;
public const uint NO_ELEMENT = 0xffffffff;
public const int MAX_RENDERTARGETS = 4;
public const int MAX_VERTEX_STREAMS = 4;
public const int MAX_CONSTANT_REGISTERS = 256;
public const int BITS_PER_COMPONENT = 8;
public const float SHADOW_MIN_QUANTIZE = 0.1f;
public const float SHADOW_MIN_VIEW = 1.0f;
public const int MAX_LIGHT_SPLITS = 6;
public const int MAX_CASCADE_SPLITS = 4;
public const uint DEFAULT_RENDER_ORDER = 128;
public const int OCCLUSION_MIN_SIZE = 8;
public const int OCCLUSION_DEFAULT_MAX_TRIANGLES = 5000;
public const float OCCLUSION_RELATIVE_BIAS = 0.00001f;
public const int OCCLUSION_FIXED_BIAS = 16;
public const float OCCLUSION_X_SCALE = 65536.0f;
public const float OCCLUSION_Z_SCALE = 16777216.0f;
public const int NUM_OCTANTS = 8;
public const uint ROOT_INDEX = 0xffffffff;
public const int SHADOW_MIN_PIXELS = 64;
public const int INSTANCING_BUFFER_DEFAULT_SIZE = 1024;
public const uint MAX_VIEWPORT_TEXTURES = 2;
public const uint NUM_SCREEN_BUFFERS = 2;
public const int MAX_TEXTURE_QUALITY_LEVELS = 3;
}
public static partial class GraphicsModule
{
public static void Initialize()
{
NativeCore.RegisterNativeType(new NativeType(Camera.csb_Atomic_Camera_GetClassIDStatic (), typeof(Camera), (IntPtr x) => { return new Camera (x); } ) );
NativeCore.RegisterNativeType(new NativeType(DebugRenderer.csb_Atomic_DebugRenderer_GetClassIDStatic (), typeof(DebugRenderer), (IntPtr x) => { return new DebugRenderer (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Light.csb_Atomic_Light_GetClassIDStatic (), typeof(Light), (IntPtr x) => { return new Light (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Material.csb_Atomic_Material_GetClassIDStatic (), typeof(Material), (IntPtr x) => { return new Material (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Octree.csb_Atomic_Octree_GetClassIDStatic (), typeof(Octree), (IntPtr x) => { return new Octree (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Renderer.csb_Atomic_Renderer_GetClassIDStatic (), typeof(Renderer), (IntPtr x) => { return new Renderer (x); } ) );
NativeCore.RegisterNativeType(new NativeType(RenderPath.csb_Atomic_RenderPath_GetClassIDStatic (), typeof(RenderPath), (IntPtr x) => { return new RenderPath (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Shader.csb_Atomic_Shader_GetClassIDStatic (), typeof(Shader), (IntPtr x) => { return new Shader (x); } ) );
NativeCore.RegisterNativeType(new NativeType(ShaderPrecache.csb_Atomic_ShaderPrecache_GetClassIDStatic (), typeof(ShaderPrecache), (IntPtr x) => { return new ShaderPrecache (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Pass.csb_Atomic_Pass_GetClassIDStatic (), typeof(Pass), (IntPtr x) => { return new Pass (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Technique.csb_Atomic_Technique_GetClassIDStatic (), typeof(Technique), (IntPtr x) => { return new Technique (x); } ) );
NativeCore.RegisterNativeType(new NativeType(View.csb_Atomic_View_GetClassIDStatic (), typeof(View), (IntPtr x) => { return new View (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Viewport.csb_Atomic_Viewport_GetClassIDStatic (), typeof(Viewport), (IntPtr x) => { return new Viewport (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Zone.csb_Atomic_Zone_GetClassIDStatic (), typeof(Zone), (IntPtr x) => { return new Zone (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Graphics.csb_Atomic_Graphics_GetClassIDStatic (), typeof(Graphics), (IntPtr x) => { return new Graphics (x); } ) );
NativeCore.RegisterNativeType(new NativeType(RenderSurface.csb_Atomic_RenderSurface_GetClassIDStatic (), typeof(RenderSurface), (IntPtr x) => { return new RenderSurface (x); } ) );
NativeCore.RegisterNativeType(new NativeType(ShaderVariation.csb_Atomic_ShaderVariation_GetClassIDStatic (), typeof(ShaderVariation), (IntPtr x) => { return new ShaderVariation (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Texture.csb_Atomic_Texture_GetClassIDStatic (), typeof(Texture), (IntPtr x) => { return new Texture (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Texture2D.csb_Atomic_Texture2D_GetClassIDStatic (), typeof(Texture2D), (IntPtr x) => { return new Texture2D (x); } ) );
NativeCore.RegisterNativeType(new NativeType(Texture3D.csb_Atomic_Texture3D_GetClassIDStatic (), typeof(Texture3D), (IntPtr x) => { return new Texture3D (x); } ) );
NativeCore.RegisterNativeType(new NativeType(TextureCube.csb_Atomic_TextureCube_GetClassIDStatic (), typeof(TextureCube), (IntPtr x) => { return new TextureCube (x); } ) );
}
}
public partial class Camera : Component
{
public float NearClip
{
get
{
return GetNearClip();
}
set
{
SetNearClip(value);
}
}
public float FarClip
{
get
{
return GetFarClip();
}
set
{
SetFarClip(value);
}
}
public float Fov
{
get
{
return GetFov();
}
set
{
SetFov(value);
}
}
public float OrthoSize
{
get
{
return GetOrthoSize();
}
set
{
SetOrthoSize(value);
}
}
public float AspectRatio
{
get
{
return GetAspectRatio();
}
set
{
SetAspectRatio(value);
}
}
public FillMode FillMode
{
get
{
return GetFillMode();
}
set
{
SetFillMode(value);
}
}
public float Zoom
{
get
{
return GetZoom();
}
set
{
SetZoom(value);
}
}
public float LodBias
{
get
{
return GetLodBias();
}
set
{
SetLodBias(value);
}
}
public uint ViewMask
{
get
{
return GetViewMask();
}
set
{
SetViewMask(value);
}
}
public uint ViewOverrideFlags
{
get
{
return GetViewOverrideFlags();
}
set
{
SetViewOverrideFlags(value);
}
}
public bool Orthographic
{
set
{
SetOrthographic(value);
}
}
public bool AutoAspectRatio
{
get
{
return GetAutoAspectRatio();
}
set
{
SetAutoAspectRatio(value);
}
}
public Vector2 ProjectionOffset
{
get
{
return GetProjectionOffset();
}
set
{
SetProjectionOffset(value);
}
}
public bool UseReflection
{
get
{
return GetUseReflection();
}
set
{
SetUseReflection(value);
}
}
public bool UseClipping
{
get
{
return GetUseClipping();
}
set
{
SetUseClipping(value);
}
}
public bool FlipVertical
{
get
{
return GetFlipVertical();
}
set
{
SetFlipVertical(value);
}
}
public float HalfViewSize
{
get
{
return GetHalfViewSize();
}
}
public bool ReverseCulling
{
get
{
return GetReverseCulling();
}
}
public float AspectRatioInternal
{
set
{
SetAspectRatioInternal(value);
}
}
public float OrthoSizeAttr
{
set
{
SetOrthoSizeAttr(value);
}
}
public Vector4 ReflectionPlaneAttr
{
get
{
return GetReflectionPlaneAttr();
}
set
{
SetReflectionPlaneAttr(value);
}
}
public Vector4 ClipPlaneAttr
{
get
{
return GetClipPlaneAttr();
}
set
{
SetClipPlaneAttr(value);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Camera_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Camera (IntPtr native) : base (native)
{
}
public Camera ()
{
if (typeof(Camera) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Camera_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Camera_Constructor();
/// <summary>
/// Visualize the component as debug geometry.
/// </summary>
public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
{
csb_Atomic_Camera_DrawDebugGeometry(nativeInstance, debug == null ? IntPtr.Zero : debug.nativeInstance, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_DrawDebugGeometry(IntPtr self, IntPtr debug, bool depthTest);
/// <summary>
/// Set near clip distance.
/// </summary>
public void SetNearClip (float nearClip)
{
csb_Atomic_Camera_SetNearClip(nativeInstance, nearClip);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetNearClip(IntPtr self, float nearClip);
/// <summary>
/// Set far clip distance.
/// </summary>
public void SetFarClip (float farClip)
{
csb_Atomic_Camera_SetFarClip(nativeInstance, farClip);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetFarClip(IntPtr self, float farClip);
/// <summary>
/// Set vertical field of view in degrees.
/// </summary>
public void SetFov (float fov)
{
csb_Atomic_Camera_SetFov(nativeInstance, fov);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetFov(IntPtr self, float fov);
/// <summary>
/// Set orthographic mode view uniform size.
/// </summary>
public void SetOrthoSize (float orthoSize)
{
csb_Atomic_Camera_SetOrthoSize(nativeInstance, orthoSize);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetOrthoSize(IntPtr self, float orthoSize);
/// <summary>
/// Set aspect ratio manually. Disables the auto aspect ratio -mode.
/// </summary>
public void SetAspectRatio (float aspectRatio)
{
csb_Atomic_Camera_SetAspectRatio(nativeInstance, aspectRatio);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetAspectRatio(IntPtr self, float aspectRatio);
/// <summary>
/// Set polygon fill mode to use when rendering a scene.
/// </summary>
public void SetFillMode (FillMode mode)
{
csb_Atomic_Camera_SetFillMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetFillMode(IntPtr self, FillMode mode);
/// <summary>
/// Set zoom.
/// </summary>
public void SetZoom (float zoom)
{
csb_Atomic_Camera_SetZoom(nativeInstance, zoom);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetZoom(IntPtr self, float zoom);
/// <summary>
/// Set LOD bias.
/// </summary>
public void SetLodBias (float bias)
{
csb_Atomic_Camera_SetLodBias(nativeInstance, bias);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetLodBias(IntPtr self, float bias);
/// <summary>
/// Set view mask. Will be and'ed with object's view mask to see if the object should be rendered.
/// </summary>
public void SetViewMask (uint mask)
{
csb_Atomic_Camera_SetViewMask(nativeInstance, mask);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetViewMask(IntPtr self, uint mask);
/// <summary>
/// Set view override flags.
/// </summary>
public void SetViewOverrideFlags (uint flags)
{
csb_Atomic_Camera_SetViewOverrideFlags(nativeInstance, flags);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetViewOverrideFlags(IntPtr self, uint flags);
/// <summary>
/// Set orthographic mode enabled/disabled.
/// </summary>
public void SetOrthographic (bool enable)
{
csb_Atomic_Camera_SetOrthographic(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetOrthographic(IntPtr self, bool enable);
/// <summary>
/// Set automatic aspect ratio based on viewport dimensions. Enabled by default.
/// </summary>
public void SetAutoAspectRatio (bool enable)
{
csb_Atomic_Camera_SetAutoAspectRatio(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetAutoAspectRatio(IntPtr self, bool enable);
/// <summary>
/// Set projection offset. It needs to be calculated as (offset in pixels) / (viewport dimensions.)
/// </summary>
public void SetProjectionOffset (Vector2 offset)
{
csb_Atomic_Camera_SetProjectionOffset(nativeInstance, ref offset);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetProjectionOffset(IntPtr self, ref Vector2 offset);
/// <summary>
/// Set reflection mode.
/// </summary>
public void SetUseReflection (bool enable)
{
csb_Atomic_Camera_SetUseReflection(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetUseReflection(IntPtr self, bool enable);
/// <summary>
/// Set whether to use a custom clip plane.
/// </summary>
public void SetUseClipping (bool enable)
{
csb_Atomic_Camera_SetUseClipping(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetUseClipping(IntPtr self, bool enable);
/// <summary>
/// Set vertical flipping mode. Called internally by View to resolve OpenGL / Direct3D9 rendertarget sampling differences.
/// </summary>
public void SetFlipVertical (bool enable)
{
csb_Atomic_Camera_SetFlipVertical(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetFlipVertical(IntPtr self, bool enable);
/// <summary>
/// Return far clip distance.
/// </summary>
public float GetFarClip ()
{
return csb_Atomic_Camera_GetFarClip(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetFarClip(IntPtr self);
/// <summary>
/// Return near clip distance.
/// </summary>
public float GetNearClip ()
{
return csb_Atomic_Camera_GetNearClip(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetNearClip(IntPtr self);
/// <summary>
/// Return vertical field of view in degrees.
/// </summary>
public float GetFov ()
{
return csb_Atomic_Camera_GetFov(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetFov(IntPtr self);
/// <summary>
/// Return orthographic mode size.
/// </summary>
public float GetOrthoSize ()
{
return csb_Atomic_Camera_GetOrthoSize(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetOrthoSize(IntPtr self);
/// <summary>
/// Return aspect ratio.
/// </summary>
public float GetAspectRatio ()
{
return csb_Atomic_Camera_GetAspectRatio(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetAspectRatio(IntPtr self);
/// <summary>
/// Return zoom.
/// </summary>
public float GetZoom ()
{
return csb_Atomic_Camera_GetZoom(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetZoom(IntPtr self);
/// <summary>
/// Return LOD bias.
/// </summary>
public float GetLodBias ()
{
return csb_Atomic_Camera_GetLodBias(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetLodBias(IntPtr self);
/// <summary>
/// Return view mask.
/// </summary>
public uint GetViewMask ()
{
return csb_Atomic_Camera_GetViewMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Camera_GetViewMask(IntPtr self);
/// <summary>
/// Return view override flags.
/// </summary>
public uint GetViewOverrideFlags ()
{
return csb_Atomic_Camera_GetViewOverrideFlags(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Camera_GetViewOverrideFlags(IntPtr self);
/// <summary>
/// Return fill mode.
/// </summary>
public FillMode GetFillMode ()
{
return csb_Atomic_Camera_GetFillMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern FillMode csb_Atomic_Camera_GetFillMode(IntPtr self);
/// <summary>
/// Return orthographic flag.
/// </summary>
public bool IsOrthographic ()
{
return csb_Atomic_Camera_IsOrthographic(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Camera_IsOrthographic(IntPtr self);
/// <summary>
/// Return auto aspect ratio flag.
/// </summary>
public bool GetAutoAspectRatio ()
{
return csb_Atomic_Camera_GetAutoAspectRatio(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Camera_GetAutoAspectRatio(IntPtr self);
/// <summary>
/// Return frustum near and far sizes.
/// </summary>
public void GetFrustumSize (Vector3 near, Vector3 far)
{
csb_Atomic_Camera_GetFrustumSize(nativeInstance, ref near, ref far);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_GetFrustumSize(IntPtr self, ref Vector3 near, ref Vector3 far);
/// <summary>
/// Return half view size.
/// </summary>
public float GetHalfViewSize ()
{
return csb_Atomic_Camera_GetHalfViewSize(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetHalfViewSize(IntPtr self);
private Vector2 CameraWorldToScreenPointReturnValue = new Vector2();
public Vector2 WorldToScreenPoint (Vector3 worldPos)
{
csb_Atomic_Camera_WorldToScreenPoint(nativeInstance, ref worldPos, ref CameraWorldToScreenPointReturnValue);
return CameraWorldToScreenPointReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_WorldToScreenPoint(IntPtr self, ref Vector3 worldPos, ref Vector2 retValue);
private Vector3 CameraScreenToWorldPointReturnValue = new Vector3();
public Vector3 ScreenToWorldPoint (Vector3 screenPos)
{
csb_Atomic_Camera_ScreenToWorldPoint(nativeInstance, ref screenPos, ref CameraScreenToWorldPointReturnValue);
return CameraScreenToWorldPointReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_ScreenToWorldPoint(IntPtr self, ref Vector3 screenPos, ref Vector3 retValue);
private Vector2 CameraGetProjectionOffsetReturnValue = new Vector2();
/// <summary>
/// Return projection offset.
/// </summary>
public Vector2 GetProjectionOffset ()
{
csb_Atomic_Camera_GetProjectionOffset(nativeInstance, ref CameraGetProjectionOffsetReturnValue);
return CameraGetProjectionOffsetReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_GetProjectionOffset(IntPtr self, ref Vector2 retValue);
/// <summary>
/// Return whether is using reflection.
/// </summary>
public bool GetUseReflection ()
{
return csb_Atomic_Camera_GetUseReflection(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Camera_GetUseReflection(IntPtr self);
/// <summary>
/// Return whether is using a custom clipping plane.
/// </summary>
public bool GetUseClipping ()
{
return csb_Atomic_Camera_GetUseClipping(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Camera_GetUseClipping(IntPtr self);
/// <summary>
/// Return vertical flipping mode.
/// </summary>
public bool GetFlipVertical ()
{
return csb_Atomic_Camera_GetFlipVertical(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Camera_GetFlipVertical(IntPtr self);
/// <summary>
/// Return whether to reverse culling; affected by vertical flipping and reflection.
/// </summary>
public bool GetReverseCulling ()
{
return csb_Atomic_Camera_GetReverseCulling(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Camera_GetReverseCulling(IntPtr self);
/// <summary>
/// Return distance to position. In orthographic mode uses only Z coordinate.
/// </summary>
public float GetDistance (Vector3 worldPos)
{
return csb_Atomic_Camera_GetDistance(nativeInstance, ref worldPos);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetDistance(IntPtr self, ref Vector3 worldPos);
/// <summary>
/// Return squared distance to position. In orthographic mode uses only Z coordinate.
/// </summary>
public float GetDistanceSquared (Vector3 worldPos)
{
return csb_Atomic_Camera_GetDistanceSquared(nativeInstance, ref worldPos);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetDistanceSquared(IntPtr self, ref Vector3 worldPos);
/// <summary>
/// Return a scene node's LOD scaled distance.
/// </summary>
public float GetLodDistance (float distance, float scale, float bias)
{
return csb_Atomic_Camera_GetLodDistance(nativeInstance, distance, scale, bias);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Camera_GetLodDistance(IntPtr self, float distance, float scale, float bias);
private Quaternion CameraGetFaceCameraRotationReturnValue = new Quaternion();
/// <summary>
/// Return a world rotation for facing a camera on certain axes based on the existing world rotation.
/// </summary>
public Quaternion GetFaceCameraRotation (Vector3 position, Quaternion rotation, FaceCameraMode mode)
{
csb_Atomic_Camera_GetFaceCameraRotation(nativeInstance, ref position, ref rotation, mode, ref CameraGetFaceCameraRotationReturnValue);
return CameraGetFaceCameraRotationReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_GetFaceCameraRotation(IntPtr self, ref Vector3 position, ref Quaternion rotation, FaceCameraMode mode, ref Quaternion retValue);
/// <summary>
/// Return if projection parameters are valid for rendering and raycasting.
/// </summary>
public bool IsProjectionValid ()
{
return csb_Atomic_Camera_IsProjectionValid(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Camera_IsProjectionValid(IntPtr self);
/// <summary>
/// Set aspect ratio without disabling the "auto aspect ratio" mode. Called internally by View.
/// </summary>
public void SetAspectRatioInternal (float aspectRatio)
{
csb_Atomic_Camera_SetAspectRatioInternal(nativeInstance, aspectRatio);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetAspectRatioInternal(IntPtr self, float aspectRatio);
/// <summary>
/// Set orthographic size attribute without forcing the aspect ratio.
/// </summary>
public void SetOrthoSizeAttr (float orthoSize)
{
csb_Atomic_Camera_SetOrthoSizeAttr(nativeInstance, orthoSize);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetOrthoSizeAttr(IntPtr self, float orthoSize);
/// <summary>
/// Set reflection plane attribute.
/// </summary>
public void SetReflectionPlaneAttr (Vector4 value)
{
csb_Atomic_Camera_SetReflectionPlaneAttr(nativeInstance, ref value);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetReflectionPlaneAttr(IntPtr self, ref Vector4 value);
private Vector4 CameraGetReflectionPlaneAttrReturnValue = new Vector4();
/// <summary>
/// Return reflection plane attribute.
/// </summary>
public Vector4 GetReflectionPlaneAttr ()
{
csb_Atomic_Camera_GetReflectionPlaneAttr(nativeInstance, ref CameraGetReflectionPlaneAttrReturnValue);
return CameraGetReflectionPlaneAttrReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_GetReflectionPlaneAttr(IntPtr self, ref Vector4 retValue);
/// <summary>
/// Set clipping plane attribute.
/// </summary>
public void SetClipPlaneAttr (Vector4 value)
{
csb_Atomic_Camera_SetClipPlaneAttr(nativeInstance, ref value);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_SetClipPlaneAttr(IntPtr self, ref Vector4 value);
private Vector4 CameraGetClipPlaneAttrReturnValue = new Vector4();
/// <summary>
/// Return clipping plane attribute.
/// </summary>
public Vector4 GetClipPlaneAttr ()
{
csb_Atomic_Camera_GetClipPlaneAttr(nativeInstance, ref CameraGetClipPlaneAttrReturnValue);
return CameraGetClipPlaneAttrReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Camera_GetClipPlaneAttr(IntPtr self, ref Vector4 retValue);
}
public partial class DebugRenderer : Component
{
public Camera View
{
set
{
SetView(value);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_DebugRenderer_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public DebugRenderer (IntPtr native) : base (native)
{
}
public DebugRenderer ()
{
if (typeof(DebugRenderer) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_DebugRenderer_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_DebugRenderer_Constructor();
/// <summary>
/// Set the camera viewpoint. Call before rendering, or before adding geometry if you want to use culling.
/// </summary>
public void SetView (Camera camera)
{
csb_Atomic_DebugRenderer_SetView(nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_SetView(IntPtr self, IntPtr camera);
/// <summary>
/// Add a scene node represented as its coordinate axes.
/// </summary>
public void AddNode (Node node, float scale = 1.0f, bool depthTest = true)
{
csb_Atomic_DebugRenderer_AddNode(nativeInstance, node == null ? IntPtr.Zero : node.nativeInstance, scale, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_AddNode(IntPtr self, IntPtr node, float scale, bool depthTest);
/// <summary>
/// Add a bounding box.
/// </summary>
public void AddBoundingBox (BoundingBox box, Color color, bool depthTest = true)
{
csb_Atomic_DebugRenderer_AddBoundingBox(nativeInstance, ref box, ref color, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_AddBoundingBox(IntPtr self, ref BoundingBox box, ref Color color, bool depthTest);
/// <summary>
/// Add a cylinder
/// </summary>
public void AddCylinder (Vector3 position, float radius, float height, Color color, bool depthTest = true)
{
csb_Atomic_DebugRenderer_AddCylinder(nativeInstance, ref position, radius, height, ref color, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_AddCylinder(IntPtr self, ref Vector3 position, float radius, float height, ref Color color, bool depthTest);
/// <summary>
/// Create positive and negative X axis lines
/// </summary>
public void CreateXAxisLines (uint gridColor, bool depthTest, int x, int y, int z)
{
csb_Atomic_DebugRenderer_CreateXAxisLines(nativeInstance, gridColor, depthTest, x, y, z);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_CreateXAxisLines(IntPtr self, uint gridColor, bool depthTest, int x, int y, int z);
/// <summary>
/// Create positive and negative Z axis lines
/// </summary>
public void CreateZAxisLines (uint gridColor, bool depthTest, int x, int y, int z)
{
csb_Atomic_DebugRenderer_CreateZAxisLines(nativeInstance, gridColor, depthTest, x, y, z);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_CreateZAxisLines(IntPtr self, uint gridColor, bool depthTest, int x, int y, int z);
/// <summary>
/// Creates a grid on all axis
/// </summary>
public void CreateGrid (Color grid, bool depthTest, Vector3 position)
{
csb_Atomic_DebugRenderer_CreateGrid(nativeInstance, ref grid, depthTest, ref position);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_CreateGrid(IntPtr self, ref Color grid, bool depthTest, ref Vector3 position);
/// <summary>
/// Update vertex buffer and render all debug lines. The viewport and rendertarget should be set before.
/// </summary>
public void Render ()
{
csb_Atomic_DebugRenderer_Render(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_DebugRenderer_Render(IntPtr self);
/// <summary>
/// Check whether a bounding box is inside the view frustum.
/// </summary>
public bool IsInside (BoundingBox box)
{
return csb_Atomic_DebugRenderer_IsInside(nativeInstance, ref box);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_DebugRenderer_IsInside(IntPtr self, ref BoundingBox box);
/// <summary>
/// Return whether has something to render.
/// </summary>
public bool HasContent ()
{
return csb_Atomic_DebugRenderer_HasContent(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_DebugRenderer_HasContent(IntPtr self);
}
public partial class Drawable : Component
{
public UpdateGeometryType UpdateGeometryType
{
get
{
return GetUpdateGeometryType();
}
}
public uint NumOccluderTriangles
{
get
{
return GetNumOccluderTriangles();
}
}
public float DrawDistance
{
get
{
return GetDrawDistance();
}
set
{
SetDrawDistance(value);
}
}
public float ShadowDistance
{
get
{
return GetShadowDistance();
}
set
{
SetShadowDistance(value);
}
}
public float LodBias
{
get
{
return GetLodBias();
}
set
{
SetLodBias(value);
}
}
public uint ViewMask
{
get
{
return GetViewMask();
}
set
{
SetViewMask(value);
}
}
public uint LightMask
{
get
{
return GetLightMask();
}
set
{
SetLightMask(value);
}
}
public uint ShadowMask
{
get
{
return GetShadowMask();
}
set
{
SetShadowMask(value);
}
}
public uint ZoneMask
{
get
{
return GetZoneMask();
}
set
{
SetZoneMask(value);
}
}
public uint MaxLights
{
get
{
return GetMaxLights();
}
set
{
SetMaxLights(value);
}
}
public bool CastShadows
{
get
{
return GetCastShadows();
}
set
{
SetCastShadows(value);
}
}
public bool Occluder
{
set
{
SetOccluder(value);
}
}
public bool Occludee
{
set
{
SetOccludee(value);
}
}
public BoundingBox BoundingBox
{
get
{
return GetBoundingBox();
}
}
public BoundingBox WorldBoundingBox
{
get
{
return GetWorldBoundingBox();
}
}
public byte DrawableFlags
{
get
{
return GetDrawableFlags();
}
}
public float SortValue
{
get
{
return GetSortValue();
}
set
{
SetSortValue(value);
}
}
public uint BasePass
{
set
{
SetBasePass(value);
}
}
public Zone Zone
{
get
{
return GetZone();
}
}
public float Distance
{
get
{
return GetDistance();
}
}
public float LodDistance
{
get
{
return GetLodDistance();
}
}
public Light FirstLight
{
get
{
return GetFirstLight();
}
}
public float MinZ
{
get
{
return GetMinZ();
}
}
public float MaxZ
{
get
{
return GetMaxZ();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Drawable_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Drawable (IntPtr native) : base (native)
{
}
public Drawable (byte drawableFlags = 0)
{
if (typeof(Drawable) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Drawable_Constructor(drawableFlags), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Drawable_Constructor(byte drawableFlags);
/// <summary>
/// Handle enabled/disabled state change.
/// </summary>
public override void OnSetEnabled ()
{
csb_Atomic_Drawable_OnSetEnabled(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_OnSetEnabled(IntPtr self);
/// <summary>
/// Return whether a geometry update is necessary, and if it can happen in a worker thread.
/// </summary>
public virtual UpdateGeometryType GetUpdateGeometryType ()
{
return csb_Atomic_Drawable_GetUpdateGeometryType(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern UpdateGeometryType csb_Atomic_Drawable_GetUpdateGeometryType(IntPtr self);
/// <summary>
/// Return number of occlusion geometry triangles.
/// </summary>
public virtual uint GetNumOccluderTriangles ()
{
return csb_Atomic_Drawable_GetNumOccluderTriangles(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Drawable_GetNumOccluderTriangles(IntPtr self);
/// <summary>
/// Visualize the component as debug geometry.
/// </summary>
public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
{
csb_Atomic_Drawable_DrawDebugGeometry(nativeInstance, debug == null ? IntPtr.Zero : debug.nativeInstance, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_DrawDebugGeometry(IntPtr self, IntPtr debug, bool depthTest);
/// <summary>
/// Set draw distance.
/// </summary>
public void SetDrawDistance (float distance)
{
csb_Atomic_Drawable_SetDrawDistance(nativeInstance, distance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetDrawDistance(IntPtr self, float distance);
/// <summary>
/// Set shadow draw distance.
/// </summary>
public void SetShadowDistance (float distance)
{
csb_Atomic_Drawable_SetShadowDistance(nativeInstance, distance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetShadowDistance(IntPtr self, float distance);
/// <summary>
/// Set LOD bias.
/// </summary>
public void SetLodBias (float bias)
{
csb_Atomic_Drawable_SetLodBias(nativeInstance, bias);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetLodBias(IntPtr self, float bias);
/// <summary>
/// Set view mask. Is and'ed with camera's view mask to see if the object should be rendered.
/// </summary>
public void SetViewMask (uint mask)
{
csb_Atomic_Drawable_SetViewMask(nativeInstance, mask);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetViewMask(IntPtr self, uint mask);
/// <summary>
/// Set light mask. Is and'ed with light's and zone's light mask to see if the object should be lit.
/// </summary>
public void SetLightMask (uint mask)
{
csb_Atomic_Drawable_SetLightMask(nativeInstance, mask);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetLightMask(IntPtr self, uint mask);
/// <summary>
/// Set shadow mask. Is and'ed with light's light mask and zone's shadow mask to see if the object should be rendered to a shadow map.
/// </summary>
public void SetShadowMask (uint mask)
{
csb_Atomic_Drawable_SetShadowMask(nativeInstance, mask);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetShadowMask(IntPtr self, uint mask);
/// <summary>
/// Set zone mask. Is and'ed with zone's zone mask to see if the object should belong to the zone.
/// </summary>
public void SetZoneMask (uint mask)
{
csb_Atomic_Drawable_SetZoneMask(nativeInstance, mask);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetZoneMask(IntPtr self, uint mask);
/// <summary>
/// Set maximum number of per-pixel lights. Default 0 is unlimited.
/// </summary>
public void SetMaxLights (uint num)
{
csb_Atomic_Drawable_SetMaxLights(nativeInstance, num);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetMaxLights(IntPtr self, uint num);
/// <summary>
/// Set shadowcaster flag.
/// </summary>
public void SetCastShadows (bool enable)
{
csb_Atomic_Drawable_SetCastShadows(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetCastShadows(IntPtr self, bool enable);
/// <summary>
/// Set occlusion flag.
/// </summary>
public void SetOccluder (bool enable)
{
csb_Atomic_Drawable_SetOccluder(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetOccluder(IntPtr self, bool enable);
/// <summary>
/// Set occludee flag.
/// </summary>
public void SetOccludee (bool enable)
{
csb_Atomic_Drawable_SetOccludee(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetOccludee(IntPtr self, bool enable);
/// <summary>
/// Mark for update and octree reinsertion. Update is automatically queued when the drawable's scene node moves or changes scale.
/// </summary>
public void MarkForUpdate ()
{
csb_Atomic_Drawable_MarkForUpdate(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_MarkForUpdate(IntPtr self);
private BoundingBox DrawableGetBoundingBoxReturnValue = new BoundingBox();
/// <summary>
/// Return local space bounding box. May not be applicable or properly updated on all drawables.
/// </summary>
public BoundingBox GetBoundingBox ()
{
csb_Atomic_Drawable_GetBoundingBox(nativeInstance, ref DrawableGetBoundingBoxReturnValue);
return DrawableGetBoundingBoxReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_GetBoundingBox(IntPtr self, ref BoundingBox retValue);
private BoundingBox DrawableGetWorldBoundingBoxReturnValue = new BoundingBox();
/// <summary>
/// Return world-space bounding box.
/// </summary>
public BoundingBox GetWorldBoundingBox ()
{
csb_Atomic_Drawable_GetWorldBoundingBox(nativeInstance, ref DrawableGetWorldBoundingBoxReturnValue);
return DrawableGetWorldBoundingBoxReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_GetWorldBoundingBox(IntPtr self, ref BoundingBox retValue);
/// <summary>
/// Return drawable flags.
/// </summary>
public byte GetDrawableFlags ()
{
return csb_Atomic_Drawable_GetDrawableFlags(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern byte csb_Atomic_Drawable_GetDrawableFlags(IntPtr self);
/// <summary>
/// Return draw distance.
/// </summary>
public float GetDrawDistance ()
{
return csb_Atomic_Drawable_GetDrawDistance(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetDrawDistance(IntPtr self);
/// <summary>
/// Return shadow draw distance.
/// </summary>
public float GetShadowDistance ()
{
return csb_Atomic_Drawable_GetShadowDistance(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetShadowDistance(IntPtr self);
/// <summary>
/// Return LOD bias.
/// </summary>
public float GetLodBias ()
{
return csb_Atomic_Drawable_GetLodBias(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetLodBias(IntPtr self);
/// <summary>
/// Return view mask.
/// </summary>
public uint GetViewMask ()
{
return csb_Atomic_Drawable_GetViewMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Drawable_GetViewMask(IntPtr self);
/// <summary>
/// Return light mask.
/// </summary>
public uint GetLightMask ()
{
return csb_Atomic_Drawable_GetLightMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Drawable_GetLightMask(IntPtr self);
/// <summary>
/// Return shadow mask.
/// </summary>
public uint GetShadowMask ()
{
return csb_Atomic_Drawable_GetShadowMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Drawable_GetShadowMask(IntPtr self);
/// <summary>
/// Return zone mask.
/// </summary>
public uint GetZoneMask ()
{
return csb_Atomic_Drawable_GetZoneMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Drawable_GetZoneMask(IntPtr self);
/// <summary>
/// Return maximum number of per-pixel lights.
/// </summary>
public uint GetMaxLights ()
{
return csb_Atomic_Drawable_GetMaxLights(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Drawable_GetMaxLights(IntPtr self);
/// <summary>
/// Return shadowcaster flag.
/// </summary>
public bool GetCastShadows ()
{
return csb_Atomic_Drawable_GetCastShadows(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Drawable_GetCastShadows(IntPtr self);
/// <summary>
/// Return occluder flag.
/// </summary>
public bool IsOccluder ()
{
return csb_Atomic_Drawable_IsOccluder(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Drawable_IsOccluder(IntPtr self);
/// <summary>
/// Return occludee flag.
/// </summary>
public bool IsOccludee ()
{
return csb_Atomic_Drawable_IsOccludee(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Drawable_IsOccludee(IntPtr self);
/// <summary>
/// Set new zone. Zone assignment may optionally be temporary, meaning it needs to be re-evaluated on the next frame.
/// </summary>
public void SetZone (Zone zone, bool temporary = false)
{
csb_Atomic_Drawable_SetZone(nativeInstance, zone == null ? IntPtr.Zero : zone.nativeInstance, temporary);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetZone(IntPtr self, IntPtr zone, bool temporary);
/// <summary>
/// Set sorting value.
/// </summary>
public void SetSortValue (float value)
{
csb_Atomic_Drawable_SetSortValue(nativeInstance, value);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetSortValue(IntPtr self, float value);
/// <summary>
/// Set view-space depth bounds.
/// </summary>
public void SetMinMaxZ (float minZ, float maxZ)
{
csb_Atomic_Drawable_SetMinMaxZ(nativeInstance, minZ, maxZ);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetMinMaxZ(IntPtr self, float minZ, float maxZ);
/// <summary>
/// Mark in view without specifying a camera. Used for shadow casters.
/// </summary>
public void MarkInView (uint frameNumber)
{
csb_Atomic_Drawable_MarkInView(nativeInstance, frameNumber);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_MarkInView(IntPtr self, uint frameNumber);
/// <summary>
/// Sort and limit per-pixel lights to maximum allowed. Convert extra lights into vertex lights.
/// </summary>
public void LimitLights ()
{
csb_Atomic_Drawable_LimitLights(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_LimitLights(IntPtr self);
/// <summary>
/// Sort and limit per-vertex lights to maximum allowed.
/// </summary>
public void LimitVertexLights (bool removeConvertedLights)
{
csb_Atomic_Drawable_LimitVertexLights(nativeInstance, removeConvertedLights);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_LimitVertexLights(IntPtr self, bool removeConvertedLights);
/// <summary>
/// Set base pass flag for a batch.
/// </summary>
public void SetBasePass (uint batchIndex)
{
csb_Atomic_Drawable_SetBasePass(nativeInstance, batchIndex);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_SetBasePass(IntPtr self, uint batchIndex);
/// <summary>
/// Return current zone.
/// </summary>
public Zone GetZone ()
{
IntPtr retNativeInstance = csb_Atomic_Drawable_GetZone(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Zone> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Drawable_GetZone(IntPtr self);
/// <summary>
/// Return whether current zone is inconclusive or dirty due to the drawable moving.
/// </summary>
public bool IsZoneDirty ()
{
return csb_Atomic_Drawable_IsZoneDirty(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Drawable_IsZoneDirty(IntPtr self);
/// <summary>
/// Return distance from camera.
/// </summary>
public float GetDistance ()
{
return csb_Atomic_Drawable_GetDistance(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetDistance(IntPtr self);
/// <summary>
/// Return LOD scaled distance from camera.
/// </summary>
public float GetLodDistance ()
{
return csb_Atomic_Drawable_GetLodDistance(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetLodDistance(IntPtr self);
/// <summary>
/// Return sorting value.
/// </summary>
public float GetSortValue ()
{
return csb_Atomic_Drawable_GetSortValue(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetSortValue(IntPtr self);
/// <summary>
/// Return whether has a base pass.
/// </summary>
public bool HasBasePass (uint batchIndex)
{
return csb_Atomic_Drawable_HasBasePass(nativeInstance, batchIndex);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Drawable_HasBasePass(IntPtr self, uint batchIndex);
/// <summary>
/// Return the first added per-pixel light.
/// </summary>
public Light GetFirstLight ()
{
IntPtr retNativeInstance = csb_Atomic_Drawable_GetFirstLight(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Light> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Drawable_GetFirstLight(IntPtr self);
/// <summary>
/// Return the minimum view-space depth.
/// </summary>
public float GetMinZ ()
{
return csb_Atomic_Drawable_GetMinZ(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetMinZ(IntPtr self);
/// <summary>
/// Return the maximum view-space depth.
/// </summary>
public float GetMaxZ ()
{
return csb_Atomic_Drawable_GetMaxZ(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Drawable_GetMaxZ(IntPtr self);
public void AddLight (Light light)
{
csb_Atomic_Drawable_AddLight(nativeInstance, light == null ? IntPtr.Zero : light.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_AddLight(IntPtr self, IntPtr light);
public void AddVertexLight (Light light)
{
csb_Atomic_Drawable_AddVertexLight(nativeInstance, light == null ? IntPtr.Zero : light.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Drawable_AddVertexLight(IntPtr self, IntPtr light);
}
public partial class Light : Drawable
{
public LightType LightType
{
get
{
return GetLightType();
}
set
{
SetLightType(value);
}
}
public bool PerVertex
{
get
{
return GetPerVertex();
}
set
{
SetPerVertex(value);
}
}
public Color Color
{
get
{
return GetColor();
}
set
{
SetColor(value);
}
}
public float SpecularIntensity
{
get
{
return GetSpecularIntensity();
}
set
{
SetSpecularIntensity(value);
}
}
public float Brightness
{
get
{
return GetBrightness();
}
set
{
SetBrightness(value);
}
}
public float Range
{
get
{
return GetRange();
}
set
{
SetRange(value);
}
}
public float Fov
{
get
{
return GetFov();
}
set
{
SetFov(value);
}
}
public float AspectRatio
{
get
{
return GetAspectRatio();
}
set
{
SetAspectRatio(value);
}
}
public float FadeDistance
{
get
{
return GetFadeDistance();
}
set
{
SetFadeDistance(value);
}
}
public float ShadowFadeDistance
{
get
{
return GetShadowFadeDistance();
}
set
{
SetShadowFadeDistance(value);
}
}
public float ShadowIntensity
{
get
{
return GetShadowIntensity();
}
set
{
SetShadowIntensity(value);
}
}
public float ShadowResolution
{
get
{
return GetShadowResolution();
}
set
{
SetShadowResolution(value);
}
}
public float ShadowNearFarRatio
{
get
{
return GetShadowNearFarRatio();
}
set
{
SetShadowNearFarRatio(value);
}
}
public Texture RampTexture
{
get
{
return GetRampTexture();
}
set
{
SetRampTexture(value);
}
}
public Texture ShapeTexture
{
get
{
return GetShapeTexture();
}
set
{
SetShapeTexture(value);
}
}
public Color EffectiveColor
{
get
{
return GetEffectiveColor();
}
}
public float EffectiveSpecularIntensity
{
get
{
return GetEffectiveSpecularIntensity();
}
}
public int NumShadowSplits
{
get
{
return GetNumShadowSplits();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Light_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Light (IntPtr native) : base (native)
{
}
public Light ()
{
if (typeof(Light) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Light_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Light_Constructor();
/// <summary>
/// Visualize the component as debug geometry.
/// </summary>
public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
{
csb_Atomic_Light_DrawDebugGeometry(nativeInstance, debug == null ? IntPtr.Zero : debug.nativeInstance, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_DrawDebugGeometry(IntPtr self, IntPtr debug, bool depthTest);
/// <summary>
/// Set light type.
/// </summary>
public void SetLightType (LightType type)
{
csb_Atomic_Light_SetLightType(nativeInstance, type);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetLightType(IntPtr self, LightType type);
/// <summary>
/// Set vertex lighting mode.
/// </summary>
public void SetPerVertex (bool enable)
{
csb_Atomic_Light_SetPerVertex(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetPerVertex(IntPtr self, bool enable);
/// <summary>
/// Set color.
/// </summary>
public void SetColor (Color color)
{
csb_Atomic_Light_SetColor(nativeInstance, ref color);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetColor(IntPtr self, ref Color color);
/// <summary>
/// Set specular intensity. Zero disables specular calculations.
/// </summary>
public void SetSpecularIntensity (float intensity)
{
csb_Atomic_Light_SetSpecularIntensity(nativeInstance, intensity);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetSpecularIntensity(IntPtr self, float intensity);
/// <summary>
/// Set light brightness multiplier. Both the color and specular intensity are multiplied with this to get final values for rendering.
/// </summary>
public void SetBrightness (float brightness)
{
csb_Atomic_Light_SetBrightness(nativeInstance, brightness);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetBrightness(IntPtr self, float brightness);
/// <summary>
/// Set range.
/// </summary>
public void SetRange (float range)
{
csb_Atomic_Light_SetRange(nativeInstance, range);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetRange(IntPtr self, float range);
/// <summary>
/// Set spotlight field of view.
/// </summary>
public void SetFov (float fov)
{
csb_Atomic_Light_SetFov(nativeInstance, fov);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetFov(IntPtr self, float fov);
/// <summary>
/// Set spotlight aspect ratio.
/// </summary>
public void SetAspectRatio (float aspectRatio)
{
csb_Atomic_Light_SetAspectRatio(nativeInstance, aspectRatio);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetAspectRatio(IntPtr self, float aspectRatio);
/// <summary>
/// Set fade out start distance.
/// </summary>
public void SetFadeDistance (float distance)
{
csb_Atomic_Light_SetFadeDistance(nativeInstance, distance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetFadeDistance(IntPtr self, float distance);
/// <summary>
/// Set shadow fade out start distance. Only has effect if shadow distance is also non-zero.
/// </summary>
public void SetShadowFadeDistance (float distance)
{
csb_Atomic_Light_SetShadowFadeDistance(nativeInstance, distance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetShadowFadeDistance(IntPtr self, float distance);
/// <summary>
/// Set shadow intensity between 0.0 - 1.0. 0.0 (the default) gives fully dark shadows.
/// </summary>
public void SetShadowIntensity (float intensity)
{
csb_Atomic_Light_SetShadowIntensity(nativeInstance, intensity);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetShadowIntensity(IntPtr self, float intensity);
/// <summary>
/// Set shadow resolution between 0.25 - 1.0. Determines the shadow map to use.
/// </summary>
public void SetShadowResolution (float resolution)
{
csb_Atomic_Light_SetShadowResolution(nativeInstance, resolution);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetShadowResolution(IntPtr self, float resolution);
/// <summary>
/// Set shadow camera near/far clip distance ratio.
/// </summary>
public void SetShadowNearFarRatio (float nearFarRatio)
{
csb_Atomic_Light_SetShadowNearFarRatio(nativeInstance, nearFarRatio);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetShadowNearFarRatio(IntPtr self, float nearFarRatio);
/// <summary>
/// Set range attenuation texture.
/// </summary>
public void SetRampTexture (Texture texture)
{
csb_Atomic_Light_SetRampTexture(nativeInstance, texture == null ? IntPtr.Zero : texture.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetRampTexture(IntPtr self, IntPtr texture);
/// <summary>
/// Set spotlight attenuation texture.
/// </summary>
public void SetShapeTexture (Texture texture)
{
csb_Atomic_Light_SetShapeTexture(nativeInstance, texture == null ? IntPtr.Zero : texture.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_SetShapeTexture(IntPtr self, IntPtr texture);
/// <summary>
/// Return light type.
/// </summary>
public LightType GetLightType ()
{
return csb_Atomic_Light_GetLightType(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern LightType csb_Atomic_Light_GetLightType(IntPtr self);
/// <summary>
/// Return vertex lighting mode.
/// </summary>
public bool GetPerVertex ()
{
return csb_Atomic_Light_GetPerVertex(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Light_GetPerVertex(IntPtr self);
private Color LightGetColorReturnValue = new Color();
/// <summary>
/// Return color.
/// </summary>
public Color GetColor ()
{
csb_Atomic_Light_GetColor(nativeInstance, ref LightGetColorReturnValue);
return LightGetColorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_GetColor(IntPtr self, ref Color retValue);
/// <summary>
/// Return specular intensity.
/// </summary>
public float GetSpecularIntensity ()
{
return csb_Atomic_Light_GetSpecularIntensity(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetSpecularIntensity(IntPtr self);
/// <summary>
/// Return brightness multiplier.
/// </summary>
public float GetBrightness ()
{
return csb_Atomic_Light_GetBrightness(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetBrightness(IntPtr self);
private Color LightGetEffectiveColorReturnValue = new Color();
/// <summary>
/// Return effective color, multiplied by brightness. Do not multiply the alpha so that can compare against the default black color to detect a light with no effect.
/// </summary>
public Color GetEffectiveColor ()
{
csb_Atomic_Light_GetEffectiveColor(nativeInstance, ref LightGetEffectiveColorReturnValue);
return LightGetEffectiveColorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Light_GetEffectiveColor(IntPtr self, ref Color retValue);
/// <summary>
/// Return effective specular intensity, multiplied by absolute value of brightness.
/// </summary>
public float GetEffectiveSpecularIntensity ()
{
return csb_Atomic_Light_GetEffectiveSpecularIntensity(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetEffectiveSpecularIntensity(IntPtr self);
/// <summary>
/// Return range.
/// </summary>
public float GetRange ()
{
return csb_Atomic_Light_GetRange(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetRange(IntPtr self);
/// <summary>
/// Return spotlight field of view.
/// </summary>
public float GetFov ()
{
return csb_Atomic_Light_GetFov(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetFov(IntPtr self);
/// <summary>
/// Return spotlight aspect ratio.
/// </summary>
public float GetAspectRatio ()
{
return csb_Atomic_Light_GetAspectRatio(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetAspectRatio(IntPtr self);
/// <summary>
/// Return fade start distance.
/// </summary>
public float GetFadeDistance ()
{
return csb_Atomic_Light_GetFadeDistance(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetFadeDistance(IntPtr self);
/// <summary>
/// Return shadow fade start distance.
/// </summary>
public float GetShadowFadeDistance ()
{
return csb_Atomic_Light_GetShadowFadeDistance(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetShadowFadeDistance(IntPtr self);
/// <summary>
/// Return shadow intensity.
/// </summary>
public float GetShadowIntensity ()
{
return csb_Atomic_Light_GetShadowIntensity(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetShadowIntensity(IntPtr self);
/// <summary>
/// Return shadow resolution.
/// </summary>
public float GetShadowResolution ()
{
return csb_Atomic_Light_GetShadowResolution(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetShadowResolution(IntPtr self);
/// <summary>
/// Return shadow camera near/far clip distance ratio.
/// </summary>
public float GetShadowNearFarRatio ()
{
return csb_Atomic_Light_GetShadowNearFarRatio(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetShadowNearFarRatio(IntPtr self);
/// <summary>
/// Return range attenuation texture.
/// </summary>
public Texture GetRampTexture ()
{
IntPtr retNativeInstance = csb_Atomic_Light_GetRampTexture(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Light_GetRampTexture(IntPtr self);
/// <summary>
/// Return spotlight attenuation texture.
/// </summary>
public Texture GetShapeTexture ()
{
IntPtr retNativeInstance = csb_Atomic_Light_GetShapeTexture(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Light_GetShapeTexture(IntPtr self);
/// <summary>
/// Return number of shadow map cascade splits for a directional light, considering also graphics API limitations.
/// </summary>
public int GetNumShadowSplits ()
{
return csb_Atomic_Light_GetNumShadowSplits(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Light_GetNumShadowSplits(IntPtr self);
/// <summary>
/// Return whether light has negative (darkening) color.
/// </summary>
public bool IsNegative ()
{
return csb_Atomic_Light_IsNegative(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Light_IsNegative(IntPtr self);
/// <summary>
/// Return a divisor value based on intensity for calculating the sort value.
/// </summary>
public float GetIntensityDivisor (float attenuation = 1.0f)
{
return csb_Atomic_Light_GetIntensityDivisor(nativeInstance, attenuation);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Light_GetIntensityDivisor(IntPtr self, float attenuation);
}
public partial class Material : Resource
{
public uint NumTechniques
{
get
{
return GetNumTechniques();
}
set
{
SetNumTechniques(value);
}
}
public CullMode CullMode
{
get
{
return GetCullMode();
}
set
{
SetCullMode(value);
}
}
public CullMode ShadowCullMode
{
get
{
return GetShadowCullMode();
}
set
{
SetShadowCullMode(value);
}
}
public FillMode FillMode
{
get
{
return GetFillMode();
}
set
{
SetFillMode(value);
}
}
public byte RenderOrder
{
get
{
return GetRenderOrder();
}
set
{
SetRenderOrder(value);
}
}
public Scene Scene
{
get
{
return GetScene();
}
set
{
SetScene(value);
}
}
public uint AuxViewFrameNumber
{
get
{
return GetAuxViewFrameNumber();
}
}
public bool Occlusion
{
get
{
return GetOcclusion();
}
}
public bool Specular
{
get
{
return GetSpecular();
}
}
public uint ShaderParameterHash
{
get
{
return GetShaderParameterHash();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Material_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Material (IntPtr native) : base (native)
{
}
public Material ()
{
if (typeof(Material) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Material_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_Constructor();
/// <summary>
/// Finish resource loading. Always called from the main thread. Return true if successful.
/// </summary>
public override bool EndLoad ()
{
return csb_Atomic_Material_EndLoad(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Material_EndLoad(IntPtr self);
/// <summary>
/// Set number of techniques.
/// </summary>
public void SetNumTechniques (uint num)
{
csb_Atomic_Material_SetNumTechniques(nativeInstance, num);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetNumTechniques(IntPtr self, uint num);
/// <summary>
/// Set technique.
/// </summary>
public void SetTechnique (uint index, Technique tech, uint qualityLevel = 0, float lodDistance = 0.0f)
{
csb_Atomic_Material_SetTechnique(nativeInstance, index, tech == null ? IntPtr.Zero : tech.nativeInstance, qualityLevel, lodDistance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetTechnique(IntPtr self, uint index, IntPtr tech, uint qualityLevel, float lodDistance);
public void SetShaderParameterAnimation (string name, ValueAnimation animation, WrapMode wrapMode = WrapMode.WM_LOOP, float speed = 1.0f)
{
csb_Atomic_Material_SetShaderParameterAnimation(nativeInstance, name, animation == null ? IntPtr.Zero : animation.nativeInstance, wrapMode, speed);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetShaderParameterAnimation(IntPtr self, string name, IntPtr animation, WrapMode wrapMode, float speed);
/// <summary>
/// Set shader parameter animation wrap mode.
/// </summary>
public void SetShaderParameterAnimationWrapMode (string name, WrapMode wrapMode)
{
csb_Atomic_Material_SetShaderParameterAnimationWrapMode(nativeInstance, name, wrapMode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetShaderParameterAnimationWrapMode(IntPtr self, string name, WrapMode wrapMode);
/// <summary>
/// Set shader parameter animation speed.
/// </summary>
public void SetShaderParameterAnimationSpeed (string name, float speed)
{
csb_Atomic_Material_SetShaderParameterAnimationSpeed(nativeInstance, name, speed);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetShaderParameterAnimationSpeed(IntPtr self, string name, float speed);
/// <summary>
/// Set texture.
/// </summary>
public void SetTexture (TextureUnit unit, Texture texture)
{
csb_Atomic_Material_SetTexture(nativeInstance, unit, texture == null ? IntPtr.Zero : texture.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetTexture(IntPtr self, TextureUnit unit, IntPtr texture);
/// <summary>
/// Set culling mode.
/// </summary>
public void SetCullMode (CullMode mode)
{
csb_Atomic_Material_SetCullMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetCullMode(IntPtr self, CullMode mode);
/// <summary>
/// Set culling mode for shadows.
/// </summary>
public void SetShadowCullMode (CullMode mode)
{
csb_Atomic_Material_SetShadowCullMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetShadowCullMode(IntPtr self, CullMode mode);
/// <summary>
/// Set polygon fill mode. Interacts with the camera's fill mode setting so that the "least filled" mode will be used.
/// </summary>
public void SetFillMode (FillMode mode)
{
csb_Atomic_Material_SetFillMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetFillMode(IntPtr self, FillMode mode);
/// <summary>
/// Set 8-bit render order within pass. Default 128. Lower values will render earlier and higher values later, taking precedence over e.g. state and distance sorting.
/// </summary>
public void SetRenderOrder (byte order)
{
csb_Atomic_Material_SetRenderOrder(nativeInstance, order);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetRenderOrder(IntPtr self, byte order);
/// <summary>
/// Associate the material with a scene to ensure that shader parameter animation happens in sync with scene update, respecting the scene time scale. If no scene is set, the global update events will be used.
/// </summary>
public void SetScene (Scene scene)
{
csb_Atomic_Material_SetScene(nativeInstance, scene == null ? IntPtr.Zero : scene.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SetScene(IntPtr self, IntPtr scene);
/// <summary>
/// Remove shader parameter.
/// </summary>
public void RemoveShaderParameter (string name)
{
csb_Atomic_Material_RemoveShaderParameter(nativeInstance, name);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_RemoveShaderParameter(IntPtr self, string name);
/// <summary>
/// Reset all shader pointers.
/// </summary>
public void ReleaseShaders ()
{
csb_Atomic_Material_ReleaseShaders(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_ReleaseShaders(IntPtr self);
/// <summary>
/// Clone the material.
/// </summary>
public Material Clone (string cloneName = "")
{
IntPtr retNativeInstance = csb_Atomic_Material_Clone(nativeInstance, cloneName);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Material> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_Clone(IntPtr self, string cloneName);
/// <summary>
/// Ensure that material techniques are listed in correct order.
/// </summary>
public void SortTechniques ()
{
csb_Atomic_Material_SortTechniques(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_SortTechniques(IntPtr self);
/// <summary>
/// Mark material for auxiliary view rendering.
/// </summary>
public void MarkForAuxView (uint frameNumber)
{
csb_Atomic_Material_MarkForAuxView(nativeInstance, frameNumber);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Material_MarkForAuxView(IntPtr self, uint frameNumber);
/// <summary>
/// Return number of techniques.
/// </summary>
public uint GetNumTechniques ()
{
return csb_Atomic_Material_GetNumTechniques(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Material_GetNumTechniques(IntPtr self);
/// <summary>
/// Return technique by index.
/// </summary>
public Technique GetTechnique (uint index)
{
IntPtr retNativeInstance = csb_Atomic_Material_GetTechnique(nativeInstance, index);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Technique> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_GetTechnique(IntPtr self, uint index);
/// <summary>
/// Return pass by technique index and pass name.
/// </summary>
public Pass GetPass (uint index, string passName)
{
IntPtr retNativeInstance = csb_Atomic_Material_GetPass(nativeInstance, index, passName);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Pass> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_GetPass(IntPtr self, uint index, string passName);
/// <summary>
/// Return texture by unit.
/// </summary>
public Texture GetTexture (TextureUnit unit)
{
IntPtr retNativeInstance = csb_Atomic_Material_GetTexture(nativeInstance, unit);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_GetTexture(IntPtr self, TextureUnit unit);
/// <summary>
/// Return shader parameter animation.
/// </summary>
public ValueAnimation GetShaderParameterAnimation (string name)
{
IntPtr retNativeInstance = csb_Atomic_Material_GetShaderParameterAnimation(nativeInstance, name);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<ValueAnimation> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_GetShaderParameterAnimation(IntPtr self, string name);
/// <summary>
/// Return shader parameter animation wrap mode.
/// </summary>
public WrapMode GetShaderParameterAnimationWrapMode (string name)
{
return csb_Atomic_Material_GetShaderParameterAnimationWrapMode(nativeInstance, name);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern WrapMode csb_Atomic_Material_GetShaderParameterAnimationWrapMode(IntPtr self, string name);
/// <summary>
/// Return shader parameter animation speed.
/// </summary>
public float GetShaderParameterAnimationSpeed (string name)
{
return csb_Atomic_Material_GetShaderParameterAnimationSpeed(nativeInstance, name);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Material_GetShaderParameterAnimationSpeed(IntPtr self, string name);
/// <summary>
/// Return normal culling mode.
/// </summary>
public CullMode GetCullMode ()
{
return csb_Atomic_Material_GetCullMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern CullMode csb_Atomic_Material_GetCullMode(IntPtr self);
/// <summary>
/// Return culling mode for shadows.
/// </summary>
public CullMode GetShadowCullMode ()
{
return csb_Atomic_Material_GetShadowCullMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern CullMode csb_Atomic_Material_GetShadowCullMode(IntPtr self);
/// <summary>
/// Return polygon fill mode.
/// </summary>
public FillMode GetFillMode ()
{
return csb_Atomic_Material_GetFillMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern FillMode csb_Atomic_Material_GetFillMode(IntPtr self);
/// <summary>
/// Return render order.
/// </summary>
public byte GetRenderOrder ()
{
return csb_Atomic_Material_GetRenderOrder(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern byte csb_Atomic_Material_GetRenderOrder(IntPtr self);
/// <summary>
/// Return last auxiliary view rendered frame number.
/// </summary>
public uint GetAuxViewFrameNumber ()
{
return csb_Atomic_Material_GetAuxViewFrameNumber(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Material_GetAuxViewFrameNumber(IntPtr self);
/// <summary>
/// Return whether should render occlusion.
/// </summary>
public bool GetOcclusion ()
{
return csb_Atomic_Material_GetOcclusion(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Material_GetOcclusion(IntPtr self);
/// <summary>
/// Return whether should render specular.
/// </summary>
public bool GetSpecular ()
{
return csb_Atomic_Material_GetSpecular(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Material_GetSpecular(IntPtr self);
/// <summary>
/// Return the scene associated with the material for shader parameter animation updates.
/// </summary>
public Scene GetScene ()
{
IntPtr retNativeInstance = csb_Atomic_Material_GetScene(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Scene> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_GetScene(IntPtr self);
/// <summary>
/// Return shader parameter hash value. Used as an optimization to avoid setting shader parameters unnecessarily.
/// </summary>
public uint GetShaderParameterHash ()
{
return csb_Atomic_Material_GetShaderParameterHash(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Material_GetShaderParameterHash(IntPtr self);
/// <summary>
/// Return name for texture unit.
/// </summary>
public static string GetTextureUnitName (TextureUnit unit)
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Material_GetTextureUnitName(unit));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Material_GetTextureUnitName(TextureUnit unit);
}
public partial class Octree : Component
{
public uint NumLevels
{
get
{
return GetNumLevels();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Octree_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Octree (IntPtr native) : base (native)
{
}
public Octree ()
{
if (typeof(Octree) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Octree_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Octree_Constructor();
/// <summary>
/// Set size and maximum subdivision levels. If octree is not empty, drawable objects will be temporarily moved to the root.
/// </summary>
public void SetSize (BoundingBox box, uint numLevels)
{
csb_Atomic_Octree_SetSize(nativeInstance, ref box, numLevels);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Octree_SetSize(IntPtr self, ref BoundingBox box, uint numLevels);
/// <summary>
/// Add a drawable manually.
/// </summary>
public void AddManualDrawable (Drawable drawable)
{
csb_Atomic_Octree_AddManualDrawable(nativeInstance, drawable == null ? IntPtr.Zero : drawable.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Octree_AddManualDrawable(IntPtr self, IntPtr drawable);
/// <summary>
/// Remove a manually added drawable.
/// </summary>
public void RemoveManualDrawable (Drawable drawable)
{
csb_Atomic_Octree_RemoveManualDrawable(nativeInstance, drawable == null ? IntPtr.Zero : drawable.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Octree_RemoveManualDrawable(IntPtr self, IntPtr drawable);
/// <summary>
/// Return subdivision levels.
/// </summary>
public uint GetNumLevels ()
{
return csb_Atomic_Octree_GetNumLevels(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Octree_GetNumLevels(IntPtr self);
/// <summary>
/// Mark drawable object as requiring an update and a reinsertion.
/// </summary>
public void QueueUpdate (Drawable drawable)
{
csb_Atomic_Octree_QueueUpdate(nativeInstance, drawable == null ? IntPtr.Zero : drawable.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Octree_QueueUpdate(IntPtr self, IntPtr drawable);
/// <summary>
/// Cancel drawable object's update.
/// </summary>
public void CancelUpdate (Drawable drawable)
{
csb_Atomic_Octree_CancelUpdate(nativeInstance, drawable == null ? IntPtr.Zero : drawable.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Octree_CancelUpdate(IntPtr self, IntPtr drawable);
}
public partial class Renderer : AObject
{
public uint NumViewports
{
get
{
return GetNumViewports();
}
set
{
SetNumViewports(value);
}
}
public bool HDRRendering
{
get
{
return GetHDRRendering();
}
set
{
SetHDRRendering(value);
}
}
public bool SpecularLighting
{
get
{
return GetSpecularLighting();
}
set
{
SetSpecularLighting(value);
}
}
public int TextureAnisotropy
{
get
{
return GetTextureAnisotropy();
}
set
{
SetTextureAnisotropy(value);
}
}
public TextureFilterMode TextureFilterMode
{
get
{
return GetTextureFilterMode();
}
set
{
SetTextureFilterMode(value);
}
}
public int TextureQuality
{
get
{
return GetTextureQuality();
}
set
{
SetTextureQuality(value);
}
}
public int MaterialQuality
{
get
{
return GetMaterialQuality();
}
set
{
SetMaterialQuality(value);
}
}
public bool DrawShadows
{
get
{
return GetDrawShadows();
}
set
{
SetDrawShadows(value);
}
}
public int ShadowMapSize
{
get
{
return GetShadowMapSize();
}
set
{
SetShadowMapSize(value);
}
}
public int ShadowQuality
{
get
{
return GetShadowQuality();
}
set
{
SetShadowQuality(value);
}
}
public bool ReuseShadowMaps
{
get
{
return GetReuseShadowMaps();
}
set
{
SetReuseShadowMaps(value);
}
}
public int MaxShadowMaps
{
get
{
return GetMaxShadowMaps();
}
set
{
SetMaxShadowMaps(value);
}
}
public bool DynamicInstancing
{
get
{
return GetDynamicInstancing();
}
set
{
SetDynamicInstancing(value);
}
}
public int MinInstances
{
get
{
return GetMinInstances();
}
set
{
SetMinInstances(value);
}
}
public int MaxSortedInstances
{
get
{
return GetMaxSortedInstances();
}
set
{
SetMaxSortedInstances(value);
}
}
public int MaxOccluderTriangles
{
get
{
return GetMaxOccluderTriangles();
}
set
{
SetMaxOccluderTriangles(value);
}
}
public int OcclusionBufferSize
{
get
{
return GetOcclusionBufferSize();
}
set
{
SetOcclusionBufferSize(value);
}
}
public float OccluderSizeThreshold
{
get
{
return GetOccluderSizeThreshold();
}
set
{
SetOccluderSizeThreshold(value);
}
}
public float MobileShadowBiasMul
{
get
{
return GetMobileShadowBiasMul();
}
set
{
SetMobileShadowBiasMul(value);
}
}
public float MobileShadowBiasAdd
{
get
{
return GetMobileShadowBiasAdd();
}
set
{
SetMobileShadowBiasAdd(value);
}
}
public RenderPath DefaultRenderPath
{
get
{
return GetDefaultRenderPath();
}
}
public uint NumViews
{
get
{
return GetNumViews();
}
}
public uint NumPrimitives
{
get
{
return GetNumPrimitives();
}
}
public uint NumBatches
{
get
{
return GetNumBatches();
}
}
public Zone DefaultZone
{
get
{
return GetDefaultZone();
}
}
public Material DefaultMaterial
{
get
{
return GetDefaultMaterial();
}
}
public Texture2D DefaultLightRamp
{
get
{
return GetDefaultLightRamp();
}
}
public Texture2D DefaultLightSpot
{
get
{
return GetDefaultLightSpot();
}
}
public TextureCube FaceSelectCubeMap
{
get
{
return GetFaceSelectCubeMap();
}
}
public TextureCube IndirectionCubeMap
{
get
{
return GetIndirectionCubeMap();
}
}
public Camera ShadowCamera
{
get
{
return GetShadowCamera();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Renderer_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Renderer (IntPtr native) : base (native)
{
}
public Renderer ()
{
if (typeof(Renderer) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Renderer_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_Constructor();
/// <summary>
/// Set number of backbuffer viewports to render.
/// </summary>
public void SetNumViewports (uint num)
{
csb_Atomic_Renderer_SetNumViewports(nativeInstance, num);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetNumViewports(IntPtr self, uint num);
/// <summary>
/// Set a backbuffer viewport.
/// </summary>
public void SetViewport (uint index, Viewport viewport)
{
csb_Atomic_Renderer_SetViewport(nativeInstance, index, viewport == null ? IntPtr.Zero : viewport.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetViewport(IntPtr self, uint index, IntPtr viewport);
/// <summary>
/// Set HDR rendering on/off.
/// </summary>
public void SetHDRRendering (bool enable)
{
csb_Atomic_Renderer_SetHDRRendering(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetHDRRendering(IntPtr self, bool enable);
/// <summary>
/// Set specular lighting on/off.
/// </summary>
public void SetSpecularLighting (bool enable)
{
csb_Atomic_Renderer_SetSpecularLighting(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetSpecularLighting(IntPtr self, bool enable);
/// <summary>
/// Set texture anisotropy.
/// </summary>
public void SetTextureAnisotropy (int level)
{
csb_Atomic_Renderer_SetTextureAnisotropy(nativeInstance, level);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetTextureAnisotropy(IntPtr self, int level);
/// <summary>
/// Set texture filtering.
/// </summary>
public void SetTextureFilterMode (TextureFilterMode mode)
{
csb_Atomic_Renderer_SetTextureFilterMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetTextureFilterMode(IntPtr self, TextureFilterMode mode);
/// <summary>
/// Set texture quality level. See the QUALITY constants in GraphicsDefs.h.
/// </summary>
public void SetTextureQuality (int quality)
{
csb_Atomic_Renderer_SetTextureQuality(nativeInstance, quality);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetTextureQuality(IntPtr self, int quality);
/// <summary>
/// Set material quality level. See the QUALITY constants in GraphicsDefs.h.
/// </summary>
public void SetMaterialQuality (int quality)
{
csb_Atomic_Renderer_SetMaterialQuality(nativeInstance, quality);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetMaterialQuality(IntPtr self, int quality);
/// <summary>
/// Set shadows on/off.
/// </summary>
public void SetDrawShadows (bool enable)
{
csb_Atomic_Renderer_SetDrawShadows(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetDrawShadows(IntPtr self, bool enable);
/// <summary>
/// Set shadow map resolution.
/// </summary>
public void SetShadowMapSize (int size)
{
csb_Atomic_Renderer_SetShadowMapSize(nativeInstance, size);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetShadowMapSize(IntPtr self, int size);
/// <summary>
/// Set shadow quality mode. See the SHADOWQUALITY constants in GraphicsDefs.h.
/// </summary>
public void SetShadowQuality (int quality)
{
csb_Atomic_Renderer_SetShadowQuality(nativeInstance, quality);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetShadowQuality(IntPtr self, int quality);
/// <summary>
/// Set reuse of shadow maps. Default is true. If disabled, also transparent geometry can be shadowed.
/// </summary>
public void SetReuseShadowMaps (bool enable)
{
csb_Atomic_Renderer_SetReuseShadowMaps(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetReuseShadowMaps(IntPtr self, bool enable);
/// <summary>
/// Set maximum number of shadow maps created for one resolution. Only has effect if reuse of shadow maps is disabled.
/// </summary>
public void SetMaxShadowMaps (int shadowMaps)
{
csb_Atomic_Renderer_SetMaxShadowMaps(nativeInstance, shadowMaps);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetMaxShadowMaps(IntPtr self, int shadowMaps);
/// <summary>
/// Set dynamic instancing on/off.
/// </summary>
public void SetDynamicInstancing (bool enable)
{
csb_Atomic_Renderer_SetDynamicInstancing(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetDynamicInstancing(IntPtr self, bool enable);
/// <summary>
/// Set minimum number of instances required in a batch group to render as instanced.
/// </summary>
public void SetMinInstances (int instances)
{
csb_Atomic_Renderer_SetMinInstances(nativeInstance, instances);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetMinInstances(IntPtr self, int instances);
/// <summary>
/// Set maximum number of sorted instances per batch group. If exceeded, instances are rendered unsorted.
/// </summary>
public void SetMaxSortedInstances (int instances)
{
csb_Atomic_Renderer_SetMaxSortedInstances(nativeInstance, instances);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetMaxSortedInstances(IntPtr self, int instances);
/// <summary>
/// Set maximum number of occluder triangles.
/// </summary>
public void SetMaxOccluderTriangles (int triangles)
{
csb_Atomic_Renderer_SetMaxOccluderTriangles(nativeInstance, triangles);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetMaxOccluderTriangles(IntPtr self, int triangles);
/// <summary>
/// Set occluder buffer width.
/// </summary>
public void SetOcclusionBufferSize (int size)
{
csb_Atomic_Renderer_SetOcclusionBufferSize(nativeInstance, size);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetOcclusionBufferSize(IntPtr self, int size);
/// <summary>
/// Set required screen size (1.0 = full screen) for occluders.
/// </summary>
public void SetOccluderSizeThreshold (float screenSize)
{
csb_Atomic_Renderer_SetOccluderSizeThreshold(nativeInstance, screenSize);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetOccluderSizeThreshold(IntPtr self, float screenSize);
/// <summary>
/// Set shadow depth bias multiplier for mobile platforms (OpenGL ES.) No effect on desktops. Default 2.
/// </summary>
public void SetMobileShadowBiasMul (float mul)
{
csb_Atomic_Renderer_SetMobileShadowBiasMul(nativeInstance, mul);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetMobileShadowBiasMul(IntPtr self, float mul);
/// <summary>
/// Set shadow depth bias addition for mobile platforms (OpenGL ES.) No effect on desktops. Default 0.0001.
/// </summary>
public void SetMobileShadowBiasAdd (float add)
{
csb_Atomic_Renderer_SetMobileShadowBiasAdd(nativeInstance, add);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetMobileShadowBiasAdd(IntPtr self, float add);
/// <summary>
/// Force reload of shaders.
/// </summary>
public void ReloadShaders ()
{
csb_Atomic_Renderer_ReloadShaders(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_ReloadShaders(IntPtr self);
/// <summary>
/// Return number of backbuffer viewports.
/// </summary>
public uint GetNumViewports ()
{
return csb_Atomic_Renderer_GetNumViewports(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumViewports(IntPtr self);
/// <summary>
/// Return backbuffer viewport by index.
/// </summary>
public Viewport GetViewport (uint index)
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetViewport(nativeInstance, index);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Viewport> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetViewport(IntPtr self, uint index);
/// <summary>
/// Return default renderpath.
/// </summary>
public RenderPath GetDefaultRenderPath ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetDefaultRenderPath(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderPath> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetDefaultRenderPath(IntPtr self);
/// <summary>
/// Return whether HDR rendering is enabled.
/// </summary>
public bool GetHDRRendering ()
{
return csb_Atomic_Renderer_GetHDRRendering(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Renderer_GetHDRRendering(IntPtr self);
/// <summary>
/// Return whether specular lighting is enabled.
/// </summary>
public bool GetSpecularLighting ()
{
return csb_Atomic_Renderer_GetSpecularLighting(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Renderer_GetSpecularLighting(IntPtr self);
/// <summary>
/// Return whether drawing shadows is enabled.
/// </summary>
public bool GetDrawShadows ()
{
return csb_Atomic_Renderer_GetDrawShadows(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Renderer_GetDrawShadows(IntPtr self);
/// <summary>
/// Return texture anisotropy.
/// </summary>
public int GetTextureAnisotropy ()
{
return csb_Atomic_Renderer_GetTextureAnisotropy(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetTextureAnisotropy(IntPtr self);
/// <summary>
/// Return texture filtering.
/// </summary>
public TextureFilterMode GetTextureFilterMode ()
{
return csb_Atomic_Renderer_GetTextureFilterMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern TextureFilterMode csb_Atomic_Renderer_GetTextureFilterMode(IntPtr self);
/// <summary>
/// Return texture quality level.
/// </summary>
public int GetTextureQuality ()
{
return csb_Atomic_Renderer_GetTextureQuality(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetTextureQuality(IntPtr self);
/// <summary>
/// Return material quality level.
/// </summary>
public int GetMaterialQuality ()
{
return csb_Atomic_Renderer_GetMaterialQuality(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetMaterialQuality(IntPtr self);
/// <summary>
/// Return shadow map resolution.
/// </summary>
public int GetShadowMapSize ()
{
return csb_Atomic_Renderer_GetShadowMapSize(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetShadowMapSize(IntPtr self);
/// <summary>
/// Return shadow quality.
/// </summary>
public int GetShadowQuality ()
{
return csb_Atomic_Renderer_GetShadowQuality(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetShadowQuality(IntPtr self);
/// <summary>
/// Return whether shadow maps are reused.
/// </summary>
public bool GetReuseShadowMaps ()
{
return csb_Atomic_Renderer_GetReuseShadowMaps(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Renderer_GetReuseShadowMaps(IntPtr self);
/// <summary>
/// Return maximum number of shadow maps per resolution.
/// </summary>
public int GetMaxShadowMaps ()
{
return csb_Atomic_Renderer_GetMaxShadowMaps(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetMaxShadowMaps(IntPtr self);
/// <summary>
/// Return whether dynamic instancing is in use.
/// </summary>
public bool GetDynamicInstancing ()
{
return csb_Atomic_Renderer_GetDynamicInstancing(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Renderer_GetDynamicInstancing(IntPtr self);
/// <summary>
/// Return minimum number of instances required in a batch group to render as instanced.
/// </summary>
public int GetMinInstances ()
{
return csb_Atomic_Renderer_GetMinInstances(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetMinInstances(IntPtr self);
/// <summary>
/// Return maximum number of sorted instances per batch group.
/// </summary>
public int GetMaxSortedInstances ()
{
return csb_Atomic_Renderer_GetMaxSortedInstances(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetMaxSortedInstances(IntPtr self);
/// <summary>
/// Return maximum number of occluder triangles.
/// </summary>
public int GetMaxOccluderTriangles ()
{
return csb_Atomic_Renderer_GetMaxOccluderTriangles(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetMaxOccluderTriangles(IntPtr self);
/// <summary>
/// Return occlusion buffer width.
/// </summary>
public int GetOcclusionBufferSize ()
{
return csb_Atomic_Renderer_GetOcclusionBufferSize(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Renderer_GetOcclusionBufferSize(IntPtr self);
/// <summary>
/// Return occluder screen size threshold.
/// </summary>
public float GetOccluderSizeThreshold ()
{
return csb_Atomic_Renderer_GetOccluderSizeThreshold(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Renderer_GetOccluderSizeThreshold(IntPtr self);
/// <summary>
/// Return shadow depth bias multiplier for mobile platforms.
/// </summary>
public float GetMobileShadowBiasMul ()
{
return csb_Atomic_Renderer_GetMobileShadowBiasMul(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Renderer_GetMobileShadowBiasMul(IntPtr self);
/// <summary>
/// Return shadow depth bias addition for mobile platforms.
/// </summary>
public float GetMobileShadowBiasAdd ()
{
return csb_Atomic_Renderer_GetMobileShadowBiasAdd(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Renderer_GetMobileShadowBiasAdd(IntPtr self);
/// <summary>
/// Return number of views rendered.
/// </summary>
public uint GetNumViews ()
{
return csb_Atomic_Renderer_GetNumViews(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumViews(IntPtr self);
/// <summary>
/// Return number of primitives rendered.
/// </summary>
public uint GetNumPrimitives ()
{
return csb_Atomic_Renderer_GetNumPrimitives(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumPrimitives(IntPtr self);
/// <summary>
/// Return number of batches rendered.
/// </summary>
public uint GetNumBatches ()
{
return csb_Atomic_Renderer_GetNumBatches(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumBatches(IntPtr self);
/// <summary>
/// Return number of geometries rendered.
/// </summary>
public uint GetNumGeometries (bool allViews = false)
{
return csb_Atomic_Renderer_GetNumGeometries(nativeInstance, allViews);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumGeometries(IntPtr self, bool allViews);
/// <summary>
/// Return number of lights rendered.
/// </summary>
public uint GetNumLights (bool allViews = false)
{
return csb_Atomic_Renderer_GetNumLights(nativeInstance, allViews);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumLights(IntPtr self, bool allViews);
/// <summary>
/// Return number of shadow maps rendered.
/// </summary>
public uint GetNumShadowMaps (bool allViews = false)
{
return csb_Atomic_Renderer_GetNumShadowMaps(nativeInstance, allViews);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumShadowMaps(IntPtr self, bool allViews);
/// <summary>
/// Return number of occluders rendered.
/// </summary>
public uint GetNumOccluders (bool allViews = false)
{
return csb_Atomic_Renderer_GetNumOccluders(nativeInstance, allViews);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Renderer_GetNumOccluders(IntPtr self, bool allViews);
/// <summary>
/// Return the default zone.
/// </summary>
public Zone GetDefaultZone ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetDefaultZone(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Zone> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetDefaultZone(IntPtr self);
/// <summary>
/// Return the default material.
/// </summary>
public Material GetDefaultMaterial ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetDefaultMaterial(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Material> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetDefaultMaterial(IntPtr self);
/// <summary>
/// Return the default range attenuation texture.
/// </summary>
public Texture2D GetDefaultLightRamp ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetDefaultLightRamp(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture2D> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetDefaultLightRamp(IntPtr self);
/// <summary>
/// Return the default spotlight attenuation texture.
/// </summary>
public Texture2D GetDefaultLightSpot ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetDefaultLightSpot(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture2D> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetDefaultLightSpot(IntPtr self);
/// <summary>
/// Return the shadowed pointlight face selection cube map.
/// </summary>
public TextureCube GetFaceSelectCubeMap ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetFaceSelectCubeMap(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<TextureCube> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetFaceSelectCubeMap(IntPtr self);
/// <summary>
/// Return the shadowed pointlight indirection cube map.
/// </summary>
public TextureCube GetIndirectionCubeMap ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetIndirectionCubeMap(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<TextureCube> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetIndirectionCubeMap(IntPtr self);
/// <summary>
/// Update for rendering. Called by HandleRenderUpdate().
/// </summary>
public void Update (float timeStep)
{
csb_Atomic_Renderer_Update(nativeInstance, timeStep);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_Update(IntPtr self, float timeStep);
/// <summary>
/// Render. Called by Engine.
/// </summary>
public void Render ()
{
csb_Atomic_Renderer_Render(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_Render(IntPtr self);
/// <summary>
/// Add debug geometry to the debug renderer.
/// </summary>
public void DrawDebugGeometry (bool depthTest)
{
csb_Atomic_Renderer_DrawDebugGeometry(nativeInstance, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_DrawDebugGeometry(IntPtr self, bool depthTest);
/// <summary>
/// Queue a render surface's viewports for rendering. Called by the surface, or by View.
/// </summary>
public void QueueRenderSurface (RenderSurface renderTarget)
{
csb_Atomic_Renderer_QueueRenderSurface(nativeInstance, renderTarget == null ? IntPtr.Zero : renderTarget.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_QueueRenderSurface(IntPtr self, IntPtr renderTarget);
/// <summary>
/// Queue a viewport for rendering. Null surface means backbuffer.
/// </summary>
public void QueueViewport (RenderSurface renderTarget, Viewport viewport)
{
csb_Atomic_Renderer_QueueViewport(nativeInstance, renderTarget == null ? IntPtr.Zero : renderTarget.nativeInstance, viewport == null ? IntPtr.Zero : viewport.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_QueueViewport(IntPtr self, IntPtr renderTarget, IntPtr viewport);
/// <summary>
/// Allocate a shadow map. If shadow map reuse is disabled, a different map is returned each time.
/// </summary>
public Texture2D GetShadowMap (Light light, Camera camera, uint viewWidth, uint viewHeight)
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetShadowMap(nativeInstance, light == null ? IntPtr.Zero : light.nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance, viewWidth, viewHeight);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture2D> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetShadowMap(IntPtr self, IntPtr light, IntPtr camera, uint viewWidth, uint viewHeight);
/// <summary>
/// Allocate a rendertarget or depth-stencil texture for deferred rendering or postprocessing. Should only be called during actual rendering, not before.
/// </summary>
public Texture GetScreenBuffer (int width, int height, uint format, bool cubemap, bool filtered, bool srgb, uint persistentKey = 0)
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetScreenBuffer(nativeInstance, width, height, format, cubemap, filtered, srgb, persistentKey);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetScreenBuffer(IntPtr self, int width, int height, uint format, bool cubemap, bool filtered, bool srgb, uint persistentKey);
/// <summary>
/// Allocate a depth-stencil surface that does not need to be readable. Should only be called during actual rendering, not before.
/// </summary>
public RenderSurface GetDepthStencil (int width, int height)
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetDepthStencil(nativeInstance, width, height);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetDepthStencil(IntPtr self, int width, int height);
/// <summary>
/// Allocate a temporary shadow camera and a scene node for it. Is thread-safe.
/// </summary>
public Camera GetShadowCamera ()
{
IntPtr retNativeInstance = csb_Atomic_Renderer_GetShadowCamera(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Camera> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Renderer_GetShadowCamera(IntPtr self);
/// <summary>
/// Set cull mode while taking possible projection flipping into account.
/// </summary>
public void SetCullMode (CullMode mode, Camera camera)
{
csb_Atomic_Renderer_SetCullMode(nativeInstance, mode, camera == null ? IntPtr.Zero : camera.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SetCullMode(IntPtr self, CullMode mode, IntPtr camera);
/// <summary>
/// Ensure sufficient size of the instancing vertex buffer. Return true if successful.
/// </summary>
public bool ResizeInstancingBuffer (uint numInstances)
{
return csb_Atomic_Renderer_ResizeInstancingBuffer(nativeInstance, numInstances);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Renderer_ResizeInstancingBuffer(IntPtr self, uint numInstances);
/// <summary>
/// Save the screen buffer allocation status. Called by View.
/// </summary>
public void SaveScreenBufferAllocations ()
{
csb_Atomic_Renderer_SaveScreenBufferAllocations(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_SaveScreenBufferAllocations(IntPtr self);
/// <summary>
/// Restore the screen buffer allocation status. Called by View.
/// </summary>
public void RestoreScreenBufferAllocations ()
{
csb_Atomic_Renderer_RestoreScreenBufferAllocations(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_RestoreScreenBufferAllocations(IntPtr self);
/// <summary>
/// Optimize a light by scissor rectangle.
/// </summary>
public void OptimizeLightByScissor (Light light, Camera camera)
{
csb_Atomic_Renderer_OptimizeLightByScissor(nativeInstance, light == null ? IntPtr.Zero : light.nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_OptimizeLightByScissor(IntPtr self, IntPtr light, IntPtr camera);
/// <summary>
/// Optimize a light by marking it to the stencil buffer and setting a stencil test.
/// </summary>
public void OptimizeLightByStencil (Light light, Camera camera)
{
csb_Atomic_Renderer_OptimizeLightByStencil(nativeInstance, light == null ? IntPtr.Zero : light.nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_OptimizeLightByStencil(IntPtr self, IntPtr light, IntPtr camera);
private Rect RendererGetLightScissorReturnValue = new Rect();
/// <summary>
/// Return a scissor rectangle for a light.
/// </summary>
public Rect GetLightScissor (Light light, Camera camera)
{
csb_Atomic_Renderer_GetLightScissor(nativeInstance, light == null ? IntPtr.Zero : light.nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance, ref RendererGetLightScissorReturnValue);
return RendererGetLightScissorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Renderer_GetLightScissor(IntPtr self, IntPtr light, IntPtr camera, ref Rect retValue);
}
public partial class RenderPath : RefCounted
{
public uint NumRenderTargets
{
get
{
return GetNumRenderTargets();
}
}
public uint NumCommands
{
get
{
return GetNumCommands();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_RenderPath_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public RenderPath (IntPtr native) : base (native)
{
}
public RenderPath ()
{
if (typeof(RenderPath) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_RenderPath_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_RenderPath_Constructor();
/// <summary>
/// Clone the rendering path.
/// </summary>
public RenderPath Clone ()
{
IntPtr retNativeInstance = csb_Atomic_RenderPath_Clone(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderPath> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_RenderPath_Clone(IntPtr self);
/// <summary>
/// Clear existing data and load from an XML file. Return true if successful.
/// </summary>
public bool Load (XMLFile file)
{
return csb_Atomic_RenderPath_Load(nativeInstance, file == null ? IntPtr.Zero : file.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_RenderPath_Load(IntPtr self, IntPtr file);
/// <summary>
/// Append data from an XML file. Return true if successful.
/// </summary>
public bool Append (XMLFile file)
{
return csb_Atomic_RenderPath_Append(nativeInstance, file == null ? IntPtr.Zero : file.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_RenderPath_Append(IntPtr self, IntPtr file);
/// <summary>
/// Enable/disable commands and rendertargets by tag.
/// </summary>
public void SetEnabled (string tag, bool active)
{
csb_Atomic_RenderPath_SetEnabled(nativeInstance, tag, active);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderPath_SetEnabled(IntPtr self, string tag, bool active);
/// <summary>
/// Toggle enabled state of commands and rendertargets by tag.
/// </summary>
public void ToggleEnabled (string tag)
{
csb_Atomic_RenderPath_ToggleEnabled(nativeInstance, tag);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderPath_ToggleEnabled(IntPtr self, string tag);
/// <summary>
/// Remove rendertargets by tag name.
/// </summary>
public void RemoveRenderTargets (string tag)
{
csb_Atomic_RenderPath_RemoveRenderTargets(nativeInstance, tag);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderPath_RemoveRenderTargets(IntPtr self, string tag);
/// <summary>
/// Remove a command by index.
/// </summary>
public void RemoveCommand (uint index)
{
csb_Atomic_RenderPath_RemoveCommand(nativeInstance, index);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderPath_RemoveCommand(IntPtr self, uint index);
/// <summary>
/// Remove commands by tag name.
/// </summary>
public void RemoveCommands (string tag)
{
csb_Atomic_RenderPath_RemoveCommands(nativeInstance, tag);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderPath_RemoveCommands(IntPtr self, string tag);
/// <summary>
/// Return number of rendertargets.
/// </summary>
public uint GetNumRenderTargets ()
{
return csb_Atomic_RenderPath_GetNumRenderTargets(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_RenderPath_GetNumRenderTargets(IntPtr self);
/// <summary>
/// Return number of commands.
/// </summary>
public uint GetNumCommands ()
{
return csb_Atomic_RenderPath_GetNumCommands(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_RenderPath_GetNumCommands(IntPtr self);
}
public partial class Shader : Resource
{
public uint TimeStamp
{
get
{
return GetTimeStamp();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Shader_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Shader (IntPtr native) : base (native)
{
}
public Shader ()
{
if (typeof(Shader) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Shader_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Shader_Constructor();
/// <summary>
/// Finish resource loading. Always called from the main thread. Return true if successful.
/// </summary>
public override bool EndLoad ()
{
return csb_Atomic_Shader_EndLoad(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Shader_EndLoad(IntPtr self);
/// <summary>
/// Return a variation with defines.
/// </summary>
public ShaderVariation GetVariation (ShaderType type, string defines)
{
IntPtr retNativeInstance = csb_Atomic_Shader_GetVariation(nativeInstance, type, defines);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<ShaderVariation> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Shader_GetVariation(IntPtr self, ShaderType type, string defines);
/// <summary>
/// Return either vertex or pixel shader source code.
/// </summary>
public string GetSourceCode (ShaderType type)
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Shader_GetSourceCode(nativeInstance, type));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Shader_GetSourceCode(IntPtr self, ShaderType type);
/// <summary>
/// Return the latest timestamp of the shader code and its includes.
/// </summary>
public uint GetTimeStamp ()
{
return csb_Atomic_Shader_GetTimeStamp(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Shader_GetTimeStamp(IntPtr self);
}
public partial class ShaderPrecache : AObject
{
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_ShaderPrecache_GetClassIDStatic();
/// <summary>
/// Construct and begin collecting shader combinations. Load existing combinations from XML if the file exists.
/// </summary>
public ShaderPrecache (IntPtr native) : base (native)
{
}
public ShaderPrecache (string fileName)
{
if (typeof(ShaderPrecache) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_ShaderPrecache_Constructor(fileName), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_ShaderPrecache_Constructor(string fileName);
/// <summary>
/// Collect a shader combination. Called by Graphics when shaders have been set.
/// </summary>
public void StoreShaders (ShaderVariation vs, ShaderVariation ps)
{
csb_Atomic_ShaderPrecache_StoreShaders(nativeInstance, vs == null ? IntPtr.Zero : vs.nativeInstance, ps == null ? IntPtr.Zero : ps.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_ShaderPrecache_StoreShaders(IntPtr self, IntPtr vs, IntPtr ps);
}
public partial class Pass : RefCounted
{
public BlendMode BlendMode
{
get
{
return GetBlendMode();
}
set
{
SetBlendMode(value);
}
}
public CompareMode DepthTestMode
{
get
{
return GetDepthTestMode();
}
set
{
SetDepthTestMode(value);
}
}
public PassLightingMode LightingMode
{
get
{
return GetLightingMode();
}
set
{
SetLightingMode(value);
}
}
public bool DepthWrite
{
get
{
return GetDepthWrite();
}
set
{
SetDepthWrite(value);
}
}
public bool AlphaMask
{
get
{
return GetAlphaMask();
}
set
{
SetAlphaMask(value);
}
}
public bool IsDesktop
{
set
{
SetIsDesktop(value);
}
}
public string VertexShader
{
get
{
return GetVertexShader();
}
set
{
SetVertexShader(value);
}
}
public string PixelShader
{
get
{
return GetPixelShader();
}
set
{
SetPixelShader(value);
}
}
public string VertexShaderDefines
{
get
{
return GetVertexShaderDefines();
}
set
{
SetVertexShaderDefines(value);
}
}
public string PixelShaderDefines
{
get
{
return GetPixelShaderDefines();
}
set
{
SetPixelShaderDefines(value);
}
}
public string Name
{
get
{
return GetName();
}
}
public uint Index
{
get
{
return GetIndex();
}
}
public uint ShadersLoadedFrameNumber
{
get
{
return GetShadersLoadedFrameNumber();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Pass_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Pass (IntPtr native) : base (native)
{
}
public Pass (string passName)
{
if (typeof(Pass) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Pass_Constructor(passName), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Pass_Constructor(string passName);
/// <summary>
/// Set blend mode.
/// </summary>
public void SetBlendMode (BlendMode mode)
{
csb_Atomic_Pass_SetBlendMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetBlendMode(IntPtr self, BlendMode mode);
/// <summary>
/// Set depth compare mode.
/// </summary>
public void SetDepthTestMode (CompareMode mode)
{
csb_Atomic_Pass_SetDepthTestMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetDepthTestMode(IntPtr self, CompareMode mode);
/// <summary>
/// Set pass lighting mode, affects what shader variations will be attempted to be loaded.
/// </summary>
public void SetLightingMode (PassLightingMode mode)
{
csb_Atomic_Pass_SetLightingMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetLightingMode(IntPtr self, PassLightingMode mode);
/// <summary>
/// Set depth write on/off.
/// </summary>
public void SetDepthWrite (bool enable)
{
csb_Atomic_Pass_SetDepthWrite(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetDepthWrite(IntPtr self, bool enable);
/// <summary>
/// Set alpha masking hint. Completely opaque draw calls will be performed before alpha masked.
/// </summary>
public void SetAlphaMask (bool enable)
{
csb_Atomic_Pass_SetAlphaMask(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetAlphaMask(IntPtr self, bool enable);
/// <summary>
/// Set whether requires desktop level hardware.
/// </summary>
public void SetIsDesktop (bool enable)
{
csb_Atomic_Pass_SetIsDesktop(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetIsDesktop(IntPtr self, bool enable);
/// <summary>
/// Set vertex shader name.
/// </summary>
public void SetVertexShader (string name)
{
csb_Atomic_Pass_SetVertexShader(nativeInstance, name);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetVertexShader(IntPtr self, string name);
/// <summary>
/// Set pixel shader name.
/// </summary>
public void SetPixelShader (string name)
{
csb_Atomic_Pass_SetPixelShader(nativeInstance, name);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetPixelShader(IntPtr self, string name);
/// <summary>
/// Set vertex shader defines.
/// </summary>
public void SetVertexShaderDefines (string defines)
{
csb_Atomic_Pass_SetVertexShaderDefines(nativeInstance, defines);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetVertexShaderDefines(IntPtr self, string defines);
/// <summary>
/// Set pixel shader defines.
/// </summary>
public void SetPixelShaderDefines (string defines)
{
csb_Atomic_Pass_SetPixelShaderDefines(nativeInstance, defines);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_SetPixelShaderDefines(IntPtr self, string defines);
/// <summary>
/// Reset shader pointers.
/// </summary>
public void ReleaseShaders ()
{
csb_Atomic_Pass_ReleaseShaders(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_ReleaseShaders(IntPtr self);
/// <summary>
/// Mark shaders loaded this frame.
/// </summary>
public void MarkShadersLoaded (uint frameNumber)
{
csb_Atomic_Pass_MarkShadersLoaded(nativeInstance, frameNumber);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Pass_MarkShadersLoaded(IntPtr self, uint frameNumber);
/// <summary>
/// Return pass name.
/// </summary>
public string GetName ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Pass_GetName(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Pass_GetName(IntPtr self);
/// <summary>
/// Return pass index. This is used for optimal render-time pass queries that avoid map lookups.
/// </summary>
public uint GetIndex ()
{
return csb_Atomic_Pass_GetIndex(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Pass_GetIndex(IntPtr self);
/// <summary>
/// Return blend mode.
/// </summary>
public BlendMode GetBlendMode ()
{
return csb_Atomic_Pass_GetBlendMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern BlendMode csb_Atomic_Pass_GetBlendMode(IntPtr self);
/// <summary>
/// Return depth compare mode.
/// </summary>
public CompareMode GetDepthTestMode ()
{
return csb_Atomic_Pass_GetDepthTestMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern CompareMode csb_Atomic_Pass_GetDepthTestMode(IntPtr self);
/// <summary>
/// Return pass lighting mode.
/// </summary>
public PassLightingMode GetLightingMode ()
{
return csb_Atomic_Pass_GetLightingMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern PassLightingMode csb_Atomic_Pass_GetLightingMode(IntPtr self);
/// <summary>
/// Return last shaders loaded frame number.
/// </summary>
public uint GetShadersLoadedFrameNumber ()
{
return csb_Atomic_Pass_GetShadersLoadedFrameNumber(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Pass_GetShadersLoadedFrameNumber(IntPtr self);
/// <summary>
/// Return depth write mode.
/// </summary>
public bool GetDepthWrite ()
{
return csb_Atomic_Pass_GetDepthWrite(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Pass_GetDepthWrite(IntPtr self);
/// <summary>
/// Return alpha masking hint.
/// </summary>
public bool GetAlphaMask ()
{
return csb_Atomic_Pass_GetAlphaMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Pass_GetAlphaMask(IntPtr self);
/// <summary>
/// Return vertex shader name.
/// </summary>
public string GetVertexShader ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Pass_GetVertexShader(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Pass_GetVertexShader(IntPtr self);
/// <summary>
/// Return pixel shader name.
/// </summary>
public string GetPixelShader ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Pass_GetPixelShader(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Pass_GetPixelShader(IntPtr self);
/// <summary>
/// Return vertex shader defines.
/// </summary>
public string GetVertexShaderDefines ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Pass_GetVertexShaderDefines(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Pass_GetVertexShaderDefines(IntPtr self);
/// <summary>
/// Return pixel shader defines.
/// </summary>
public string GetPixelShaderDefines ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Pass_GetPixelShaderDefines(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Pass_GetPixelShaderDefines(IntPtr self);
}
public partial class Technique : Resource
{
public bool IsDesktop
{
set
{
SetIsDesktop(value);
}
}
public uint NumPasses
{
get
{
return GetNumPasses();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Technique_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Technique (IntPtr native) : base (native)
{
}
public Technique ()
{
if (typeof(Technique) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Technique_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Technique_Constructor();
/// <summary>
/// Set whether requires desktop level hardware.
/// </summary>
public void SetIsDesktop (bool enable)
{
csb_Atomic_Technique_SetIsDesktop(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Technique_SetIsDesktop(IntPtr self, bool enable);
/// <summary>
/// Create a new pass.
/// </summary>
public Pass CreatePass (string passName)
{
IntPtr retNativeInstance = csb_Atomic_Technique_CreatePass(nativeInstance, passName);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Pass> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Technique_CreatePass(IntPtr self, string passName);
/// <summary>
/// Remove a pass.
/// </summary>
public void RemovePass (string passName)
{
csb_Atomic_Technique_RemovePass(nativeInstance, passName);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Technique_RemovePass(IntPtr self, string passName);
/// <summary>
/// Reset shader pointers in all passes.
/// </summary>
public void ReleaseShaders ()
{
csb_Atomic_Technique_ReleaseShaders(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Technique_ReleaseShaders(IntPtr self);
/// <summary>
/// Return whether technique is supported by the current hardware.
/// </summary>
public bool IsSupported ()
{
return csb_Atomic_Technique_IsSupported(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Technique_IsSupported(IntPtr self);
/// <summary>
/// Return number of passes.
/// </summary>
public uint GetNumPasses ()
{
return csb_Atomic_Technique_GetNumPasses(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Technique_GetNumPasses(IntPtr self);
/// <summary>
/// Return a pass type index by name. Allocate new if not used yet.
/// </summary>
public static uint GetPassIndex (string passName)
{
return csb_Atomic_Technique_GetPassIndex(passName);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Technique_GetPassIndex(string passName);
}
public partial class View : AObject
{
public Graphics Graphics
{
get
{
return GetGraphics();
}
}
public Renderer Renderer
{
get
{
return GetRenderer();
}
}
public Scene Scene
{
get
{
return GetScene();
}
}
public Octree Octree
{
get
{
return GetOctree();
}
}
public Camera Camera
{
get
{
return GetCamera();
}
}
public RenderSurface RenderTarget
{
get
{
return GetRenderTarget();
}
}
public bool DrawDebug
{
get
{
return GetDrawDebug();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_View_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public View (IntPtr native) : base (native)
{
}
public View ()
{
if (typeof(View) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_View_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_View_Constructor();
/// <summary>
/// Define with rendertarget and viewport. Return true if successful.
/// </summary>
public bool Define (RenderSurface renderTarget, Viewport viewport)
{
return csb_Atomic_View_Define(nativeInstance, renderTarget == null ? IntPtr.Zero : renderTarget.nativeInstance, viewport == null ? IntPtr.Zero : viewport.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_View_Define(IntPtr self, IntPtr renderTarget, IntPtr viewport);
/// <summary>
/// Render batches.
/// </summary>
public void Render ()
{
csb_Atomic_View_Render(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_View_Render(IntPtr self);
/// <summary>
/// Return graphics subsystem.
/// </summary>
public Graphics GetGraphics ()
{
IntPtr retNativeInstance = csb_Atomic_View_GetGraphics(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Graphics> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_View_GetGraphics(IntPtr self);
/// <summary>
/// Return renderer subsystem.
/// </summary>
public Renderer GetRenderer ()
{
IntPtr retNativeInstance = csb_Atomic_View_GetRenderer(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Renderer> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_View_GetRenderer(IntPtr self);
/// <summary>
/// Return scene.
/// </summary>
public Scene GetScene ()
{
IntPtr retNativeInstance = csb_Atomic_View_GetScene(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Scene> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_View_GetScene(IntPtr self);
/// <summary>
/// Return octree.
/// </summary>
public Octree GetOctree ()
{
IntPtr retNativeInstance = csb_Atomic_View_GetOctree(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Octree> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_View_GetOctree(IntPtr self);
/// <summary>
/// Return camera.
/// </summary>
public Camera GetCamera ()
{
IntPtr retNativeInstance = csb_Atomic_View_GetCamera(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Camera> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_View_GetCamera(IntPtr self);
/// <summary>
/// Return the rendertarget. 0 if using the backbuffer.
/// </summary>
public RenderSurface GetRenderTarget ()
{
IntPtr retNativeInstance = csb_Atomic_View_GetRenderTarget(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_View_GetRenderTarget(IntPtr self);
/// <summary>
/// Return whether should draw debug geometry.
/// </summary>
public bool GetDrawDebug ()
{
return csb_Atomic_View_GetDrawDebug(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_View_GetDrawDebug(IntPtr self);
/// <summary>
/// Set global (per-frame) shader parameters. Called by Batch and internally by View.
/// </summary>
public void SetGlobalShaderParameters ()
{
csb_Atomic_View_SetGlobalShaderParameters(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_View_SetGlobalShaderParameters(IntPtr self);
/// <summary>
/// Set camera-specific shader parameters. Called by Batch and internally by View.
/// </summary>
public void SetCameraShaderParameters (Camera camera, bool setProjectionMatrix)
{
csb_Atomic_View_SetCameraShaderParameters(nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance, setProjectionMatrix);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_View_SetCameraShaderParameters(IntPtr self, IntPtr camera, bool setProjectionMatrix);
/// <summary>
/// Set G-buffer offset and inverse size shader parameters. Called by Batch and internally by View.
/// </summary>
public void SetGBufferShaderParameters (IntVector2 texSize, IntRect viewRect)
{
csb_Atomic_View_SetGBufferShaderParameters(nativeInstance, ref texSize, ref viewRect);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_View_SetGBufferShaderParameters(IntPtr self, ref IntVector2 texSize, ref IntRect viewRect);
}
public partial class Viewport : AObject
{
public Scene Scene
{
get
{
return GetScene();
}
set
{
SetScene(value);
}
}
public Camera Camera
{
get
{
return GetCamera();
}
set
{
SetCamera(value);
}
}
public IntRect Rect
{
get
{
return GetRect();
}
set
{
SetRect(value);
}
}
public bool DrawDebug
{
get
{
return GetDrawDebug();
}
set
{
SetDrawDebug(value);
}
}
public View View
{
get
{
return GetView();
}
}
public int Width
{
get
{
return GetWidth();
}
}
public int Height
{
get
{
return GetHeight();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Viewport_GetClassIDStatic();
/// <summary>
/// Construct with a full rectangle.
/// </summary>
public Viewport (IntPtr native) : base (native)
{
}
public Viewport (Scene scene, Camera camera, RenderPath renderPath = null)
{
if (typeof(Viewport) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Viewport_Constructor(scene == null ? IntPtr.Zero : scene.nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance, renderPath == null ? IntPtr.Zero : renderPath.nativeInstance), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Viewport_Constructor(IntPtr scene, IntPtr camera, IntPtr renderPath);
/// <summary>
/// Set scene.
/// </summary>
public void SetScene (Scene scene)
{
csb_Atomic_Viewport_SetScene(nativeInstance, scene == null ? IntPtr.Zero : scene.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_SetScene(IntPtr self, IntPtr scene);
/// <summary>
/// Set camera.
/// </summary>
public void SetCamera (Camera camera)
{
csb_Atomic_Viewport_SetCamera(nativeInstance, camera == null ? IntPtr.Zero : camera.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_SetCamera(IntPtr self, IntPtr camera);
/// <summary>
/// Set rectangle.
/// </summary>
public void SetRect (IntRect rect)
{
csb_Atomic_Viewport_SetRect(nativeInstance, ref rect);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_SetRect(IntPtr self, ref IntRect rect);
/// <summary>
/// Set rendering path from an XML file.
/// </summary>
public void SetRenderPath (XMLFile file)
{
csb_Atomic_Viewport_SetRenderPath(nativeInstance, file == null ? IntPtr.Zero : file.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_SetRenderPath(IntPtr self, IntPtr file);
/// <summary>
/// Set whether to render debug geometry. Default true.
/// </summary>
public void SetDrawDebug (bool enable)
{
csb_Atomic_Viewport_SetDrawDebug(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_SetDrawDebug(IntPtr self, bool enable);
/// <summary>
/// Return scene.
/// </summary>
public Scene GetScene ()
{
IntPtr retNativeInstance = csb_Atomic_Viewport_GetScene(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Scene> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Viewport_GetScene(IntPtr self);
/// <summary>
/// Return camera.
/// </summary>
public Camera GetCamera ()
{
IntPtr retNativeInstance = csb_Atomic_Viewport_GetCamera(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Camera> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Viewport_GetCamera(IntPtr self);
/// <summary>
/// Return the internal rendering structure. May be null if the viewport has not been rendered yet.
/// </summary>
public View GetView ()
{
IntPtr retNativeInstance = csb_Atomic_Viewport_GetView(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<View> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Viewport_GetView(IntPtr self);
private IntRect ViewportGetRectReturnValue = new IntRect();
/// <summary>
/// Return rectangle.
/// </summary>
public IntRect GetRect ()
{
csb_Atomic_Viewport_GetRect(nativeInstance, ref ViewportGetRectReturnValue);
return ViewportGetRectReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_GetRect(IntPtr self, ref IntRect retValue);
/// <summary>
/// Return the viewport width
/// </summary>
public int GetWidth ()
{
return csb_Atomic_Viewport_GetWidth(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Viewport_GetWidth(IntPtr self);
/// <summary>
/// Return the viewport height
/// </summary>
public int GetHeight ()
{
return csb_Atomic_Viewport_GetHeight(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Viewport_GetHeight(IntPtr self);
/// <summary>
/// Return rendering path.
/// </summary>
public RenderPath GetRenderPath ()
{
IntPtr retNativeInstance = csb_Atomic_Viewport_GetRenderPath(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderPath> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Viewport_GetRenderPath(IntPtr self);
/// <summary>
/// Return whether to draw debug geometry.
/// </summary>
public bool GetDrawDebug ()
{
return csb_Atomic_Viewport_GetDrawDebug(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Viewport_GetDrawDebug(IntPtr self);
private IntVector2 ViewportWorldToScreenPointReturnValue = new IntVector2();
public IntVector2 WorldToScreenPoint (Vector3 worldPos)
{
csb_Atomic_Viewport_WorldToScreenPoint(nativeInstance, ref worldPos, ref ViewportWorldToScreenPointReturnValue);
return ViewportWorldToScreenPointReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_WorldToScreenPoint(IntPtr self, ref Vector3 worldPos, ref IntVector2 retValue);
private Vector3 ViewportScreenToWorldPointReturnValue = new Vector3();
public Vector3 ScreenToWorldPoint (int x, int y, float depth)
{
csb_Atomic_Viewport_ScreenToWorldPoint(nativeInstance, x, y, depth, ref ViewportScreenToWorldPointReturnValue);
return ViewportScreenToWorldPointReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_ScreenToWorldPoint(IntPtr self, int x, int y, float depth, ref Vector3 retValue);
/// <summary>
/// Allocate the view structure. Called by Renderer.
/// </summary>
public void AllocateView ()
{
csb_Atomic_Viewport_AllocateView(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Viewport_AllocateView(IntPtr self);
}
public partial class Zone : Drawable
{
public new BoundingBox BoundingBox
{
set
{
SetBoundingBox(value);
}
}
public Color AmbientColor
{
get
{
return GetAmbientColor();
}
set
{
SetAmbientColor(value);
}
}
public Color FogColor
{
get
{
return GetFogColor();
}
set
{
SetFogColor(value);
}
}
public float FogStart
{
get
{
return GetFogStart();
}
set
{
SetFogStart(value);
}
}
public float FogEnd
{
get
{
return GetFogEnd();
}
set
{
SetFogEnd(value);
}
}
public float FogHeight
{
get
{
return GetFogHeight();
}
set
{
SetFogHeight(value);
}
}
public float FogHeightScale
{
get
{
return GetFogHeightScale();
}
set
{
SetFogHeightScale(value);
}
}
public int Priority
{
get
{
return GetPriority();
}
set
{
SetPriority(value);
}
}
public bool HeightFog
{
get
{
return GetHeightFog();
}
set
{
SetHeightFog(value);
}
}
public bool Override
{
get
{
return GetOverride();
}
set
{
SetOverride(value);
}
}
public bool AmbientGradient
{
get
{
return GetAmbientGradient();
}
set
{
SetAmbientGradient(value);
}
}
public Texture ZoneTexture
{
get
{
return GetZoneTexture();
}
set
{
SetZoneTexture(value);
}
}
public Color AmbientStartColor
{
get
{
return GetAmbientStartColor();
}
}
public Color AmbientEndColor
{
get
{
return GetAmbientEndColor();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Zone_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Zone (IntPtr native) : base (native)
{
}
public Zone ()
{
if (typeof(Zone) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Zone_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Zone_Constructor();
/// <summary>
/// Visualize the component as debug geometry.
/// </summary>
public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
{
csb_Atomic_Zone_DrawDebugGeometry(nativeInstance, debug == null ? IntPtr.Zero : debug.nativeInstance, depthTest);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_DrawDebugGeometry(IntPtr self, IntPtr debug, bool depthTest);
/// <summary>
/// Set local-space bounding box. Will be used as an oriented bounding box to test whether objects or the camera are inside.
/// </summary>
public void SetBoundingBox (BoundingBox box)
{
csb_Atomic_Zone_SetBoundingBox(nativeInstance, ref box);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetBoundingBox(IntPtr self, ref BoundingBox box);
/// <summary>
/// Set ambient color
/// </summary>
public void SetAmbientColor (Color color)
{
csb_Atomic_Zone_SetAmbientColor(nativeInstance, ref color);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetAmbientColor(IntPtr self, ref Color color);
/// <summary>
/// Set fog color.
/// </summary>
public void SetFogColor (Color color)
{
csb_Atomic_Zone_SetFogColor(nativeInstance, ref color);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetFogColor(IntPtr self, ref Color color);
/// <summary>
/// Set fog start distance.
/// </summary>
public void SetFogStart (float start)
{
csb_Atomic_Zone_SetFogStart(nativeInstance, start);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetFogStart(IntPtr self, float start);
/// <summary>
/// Set fog end distance.
/// </summary>
public void SetFogEnd (float end)
{
csb_Atomic_Zone_SetFogEnd(nativeInstance, end);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetFogEnd(IntPtr self, float end);
/// <summary>
/// Set fog height distance relative to the scene node's world position. Effective only in height fog mode.
/// </summary>
public void SetFogHeight (float height)
{
csb_Atomic_Zone_SetFogHeight(nativeInstance, height);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetFogHeight(IntPtr self, float height);
/// <summary>
/// Set fog height scale. Effective only in height fog mode.
/// </summary>
public void SetFogHeightScale (float scale)
{
csb_Atomic_Zone_SetFogHeightScale(nativeInstance, scale);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetFogHeightScale(IntPtr self, float scale);
/// <summary>
/// Set zone priority. If an object or camera is inside several zones, the one with highest priority is used.
/// </summary>
public void SetPriority (int priority)
{
csb_Atomic_Zone_SetPriority(nativeInstance, priority);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetPriority(IntPtr self, int priority);
/// <summary>
/// Set height fog mode.
/// </summary>
public void SetHeightFog (bool enable)
{
csb_Atomic_Zone_SetHeightFog(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetHeightFog(IntPtr self, bool enable);
/// <summary>
/// Set override mode. If camera is inside an override zone, that zone will be used for all rendered objects instead of their own zone.
/// </summary>
public void SetOverride (bool enable)
{
csb_Atomic_Zone_SetOverride(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetOverride(IntPtr self, bool enable);
/// <summary>
/// Set ambient gradient mode. In gradient mode ambient color is interpolated from neighbor zones.
/// </summary>
public void SetAmbientGradient (bool enable)
{
csb_Atomic_Zone_SetAmbientGradient(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetAmbientGradient(IntPtr self, bool enable);
/// <summary>
/// Set zone texture. This will be bound to the zone texture unit when rendering objects inside the zone. Note that the default shaders do not use it.
/// </summary>
public void SetZoneTexture (Texture texture)
{
csb_Atomic_Zone_SetZoneTexture(nativeInstance, texture == null ? IntPtr.Zero : texture.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_SetZoneTexture(IntPtr self, IntPtr texture);
private Color ZoneGetAmbientColorReturnValue = new Color();
/// <summary>
/// Return zone's own ambient color, disregarding gradient mode.
/// </summary>
public Color GetAmbientColor ()
{
csb_Atomic_Zone_GetAmbientColor(nativeInstance, ref ZoneGetAmbientColorReturnValue);
return ZoneGetAmbientColorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_GetAmbientColor(IntPtr self, ref Color retValue);
private Color ZoneGetAmbientStartColorReturnValue = new Color();
/// <summary>
/// Return ambient start color. Not safe to call from worker threads due to possible octree query.
/// </summary>
public Color GetAmbientStartColor ()
{
csb_Atomic_Zone_GetAmbientStartColor(nativeInstance, ref ZoneGetAmbientStartColorReturnValue);
return ZoneGetAmbientStartColorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_GetAmbientStartColor(IntPtr self, ref Color retValue);
private Color ZoneGetAmbientEndColorReturnValue = new Color();
/// <summary>
/// Return ambient end color. Not safe to call from worker threads due to possible octree query.
/// </summary>
public Color GetAmbientEndColor ()
{
csb_Atomic_Zone_GetAmbientEndColor(nativeInstance, ref ZoneGetAmbientEndColorReturnValue);
return ZoneGetAmbientEndColorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_GetAmbientEndColor(IntPtr self, ref Color retValue);
private Color ZoneGetFogColorReturnValue = new Color();
/// <summary>
/// Return fog color.
/// </summary>
public Color GetFogColor ()
{
csb_Atomic_Zone_GetFogColor(nativeInstance, ref ZoneGetFogColorReturnValue);
return ZoneGetFogColorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Zone_GetFogColor(IntPtr self, ref Color retValue);
/// <summary>
/// Return fog start distance.
/// </summary>
public float GetFogStart ()
{
return csb_Atomic_Zone_GetFogStart(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Zone_GetFogStart(IntPtr self);
/// <summary>
/// Return fog end distance.
/// </summary>
public float GetFogEnd ()
{
return csb_Atomic_Zone_GetFogEnd(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Zone_GetFogEnd(IntPtr self);
/// <summary>
/// Return fog height distance relative to the scene node's world position.
/// </summary>
public float GetFogHeight ()
{
return csb_Atomic_Zone_GetFogHeight(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Zone_GetFogHeight(IntPtr self);
/// <summary>
/// Return fog height scale.
/// </summary>
public float GetFogHeightScale ()
{
return csb_Atomic_Zone_GetFogHeightScale(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Zone_GetFogHeightScale(IntPtr self);
/// <summary>
/// Return zone priority.
/// </summary>
public int GetPriority ()
{
return csb_Atomic_Zone_GetPriority(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Zone_GetPriority(IntPtr self);
/// <summary>
/// Return whether height fog mode is enabled.
/// </summary>
public bool GetHeightFog ()
{
return csb_Atomic_Zone_GetHeightFog(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Zone_GetHeightFog(IntPtr self);
/// <summary>
/// Return whether override mode is enabled.
/// </summary>
public bool GetOverride ()
{
return csb_Atomic_Zone_GetOverride(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Zone_GetOverride(IntPtr self);
/// <summary>
/// Return whether ambient gradient mode is enabled.
/// </summary>
public bool GetAmbientGradient ()
{
return csb_Atomic_Zone_GetAmbientGradient(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Zone_GetAmbientGradient(IntPtr self);
/// <summary>
/// Return zone texture.
/// </summary>
public Texture GetZoneTexture ()
{
IntPtr retNativeInstance = csb_Atomic_Zone_GetZoneTexture(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Zone_GetZoneTexture(IntPtr self);
/// <summary>
/// Check whether a point is inside.
/// </summary>
public bool IsInside (Vector3 point)
{
return csb_Atomic_Zone_IsInside(nativeInstance, ref point);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Zone_IsInside(IntPtr self, ref Vector3 point);
}
public partial class Graphics : AObject
{
public Image WindowIcon
{
set
{
SetWindowIcon(value);
}
}
public string WindowTitle
{
get
{
return GetWindowTitle();
}
set
{
SetWindowTitle(value);
}
}
public bool SRGB
{
get
{
return GetSRGB();
}
set
{
SetSRGB(value);
}
}
public bool FlushGPU
{
get
{
return GetFlushGPU();
}
set
{
SetFlushGPU(value);
}
}
public bool ForceGL2
{
get
{
return GetForceGL2();
}
set
{
SetForceGL2(value);
}
}
public string Orientations
{
get
{
return GetOrientations();
}
set
{
SetOrientations(value);
}
}
public Texture TextureForUpdate
{
set
{
SetTextureForUpdate(value);
}
}
public TextureFilterMode DefaultTextureFilterMode
{
get
{
return GetDefaultTextureFilterMode();
}
set
{
SetDefaultTextureFilterMode(value);
}
}
public uint TextureAnisotropy
{
get
{
return GetTextureAnisotropy();
}
set
{
SetTextureAnisotropy(value);
}
}
public IntRect Viewport
{
get
{
return GetViewport();
}
set
{
SetViewport(value);
}
}
public BlendMode BlendMode
{
get
{
return GetBlendMode();
}
set
{
SetBlendMode(value);
}
}
public bool ColorWrite
{
get
{
return GetColorWrite();
}
set
{
SetColorWrite(value);
}
}
public CullMode CullMode
{
get
{
return GetCullMode();
}
set
{
SetCullMode(value);
}
}
public CompareMode DepthTest
{
get
{
return GetDepthTest();
}
set
{
SetDepthTest(value);
}
}
public bool DepthWrite
{
get
{
return GetDepthWrite();
}
set
{
SetDepthWrite(value);
}
}
public FillMode FillMode
{
get
{
return GetFillMode();
}
set
{
SetFillMode(value);
}
}
public bool ClipPlane
{
set
{
SetClipPlane(value);
}
}
public string ApiName
{
get
{
return GetApiName();
}
}
public IntVector2 WindowPosition
{
get
{
return GetWindowPosition();
}
}
public int Width
{
get
{
return GetWidth();
}
}
public int Height
{
get
{
return GetHeight();
}
}
public int MultiSample
{
get
{
return GetMultiSample();
}
}
public bool Fullscreen
{
get
{
return GetFullscreen();
}
}
public bool Borderless
{
get
{
return GetBorderless();
}
}
public bool Resizable
{
get
{
return GetResizable();
}
}
public bool VSync
{
get
{
return GetVSync();
}
}
public bool TripleBuffer
{
get
{
return GetTripleBuffer();
}
}
public uint NumPrimitives
{
get
{
return GetNumPrimitives();
}
}
public uint NumBatches
{
get
{
return GetNumBatches();
}
}
public uint DummyColorFormat
{
get
{
return GetDummyColorFormat();
}
}
public uint ShadowMapFormat
{
get
{
return GetShadowMapFormat();
}
}
public uint HiresShadowMapFormat
{
get
{
return GetHiresShadowMapFormat();
}
}
public bool InstancingSupport
{
get
{
return GetInstancingSupport();
}
}
public bool LightPrepassSupport
{
get
{
return GetLightPrepassSupport();
}
}
public bool DeferredSupport
{
get
{
return GetDeferredSupport();
}
}
public bool AnisotropySupport
{
get
{
return GetAnisotropySupport();
}
}
public bool HardwareShadowSupport
{
get
{
return GetHardwareShadowSupport();
}
}
public bool ReadableDepthSupport
{
get
{
return GetReadableDepthSupport();
}
}
public bool SRGBSupport
{
get
{
return GetSRGBSupport();
}
}
public bool SRGBWriteSupport
{
get
{
return GetSRGBWriteSupport();
}
}
public IntVector2 DesktopResolution
{
get
{
return GetDesktopResolution();
}
}
public ShaderVariation VertexShader
{
get
{
return GetVertexShader();
}
}
public ShaderVariation PixelShader
{
get
{
return GetPixelShader();
}
}
public RenderSurface DepthStencil
{
get
{
return GetDepthStencil();
}
}
public Texture2D DepthTexture
{
get
{
return GetDepthTexture();
}
}
public float DepthConstantBias
{
get
{
return GetDepthConstantBias();
}
}
public float DepthSlopeScaledBias
{
get
{
return GetDepthSlopeScaledBias();
}
}
public bool StencilTest
{
get
{
return GetStencilTest();
}
}
public bool ScissorTest
{
get
{
return GetScissorTest();
}
}
public IntRect ScissorRect
{
get
{
return GetScissorRect();
}
}
public CompareMode StencilTestMode
{
get
{
return GetStencilTestMode();
}
}
public StencilOp StencilPass
{
get
{
return GetStencilPass();
}
}
public StencilOp StencilFail
{
get
{
return GetStencilFail();
}
}
public StencilOp StencilZFail
{
get
{
return GetStencilZFail();
}
}
public uint StencilRef
{
get
{
return GetStencilRef();
}
}
public uint StencilCompareMask
{
get
{
return GetStencilCompareMask();
}
}
public uint StencilWriteMask
{
get
{
return GetStencilWriteMask();
}
}
public bool UseClipPlane
{
get
{
return GetUseClipPlane();
}
}
public IntVector2 RenderTargetDimensions
{
get
{
return GetRenderTargetDimensions();
}
}
public uint VBO
{
set
{
SetVBO(value);
}
}
public uint UBO
{
set
{
SetUBO(value);
}
}
public uint AlphaFormat
{
get
{
return GetAlphaFormat();
}
}
public uint LuminanceFormat
{
get
{
return GetLuminanceFormat();
}
}
public uint LuminanceAlphaFormat
{
get
{
return GetLuminanceAlphaFormat();
}
}
public uint RGBFormat
{
get
{
return GetRGBFormat();
}
}
public uint RGBAFormat
{
get
{
return GetRGBAFormat();
}
}
public uint RGBA16Format
{
get
{
return GetRGBA16Format();
}
}
public uint RGBAFloat16Format
{
get
{
return GetRGBAFloat16Format();
}
}
public uint RGBAFloat32Format
{
get
{
return GetRGBAFloat32Format();
}
}
public uint RG16Format
{
get
{
return GetRG16Format();
}
}
public uint RGFloat16Format
{
get
{
return GetRGFloat16Format();
}
}
public uint RGFloat32Format
{
get
{
return GetRGFloat32Format();
}
}
public uint Float16Format
{
get
{
return GetFloat16Format();
}
}
public uint Float32Format
{
get
{
return GetFloat32Format();
}
}
public uint LinearDepthFormat
{
get
{
return GetLinearDepthFormat();
}
}
public uint DepthStencilFormat
{
get
{
return GetDepthStencilFormat();
}
}
public uint ReadableDepthFormat
{
get
{
return GetReadableDepthFormat();
}
}
public Vector2 PixelUVOffset
{
get
{
return GetPixelUVOffset();
}
}
public uint MaxBones
{
get
{
return GetMaxBones();
}
}
public bool GL3Support
{
get
{
return GetGL3Support();
}
}
public int CurrentMonitor
{
get
{
return GetCurrentMonitor();
}
}
public int NumMonitors
{
get
{
return GetNumMonitors();
}
}
public bool Maximized
{
get
{
return GetMaximized();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Graphics_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Graphics (IntPtr native) : base (native)
{
}
public Graphics ()
{
if (typeof(Graphics) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Graphics_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_Constructor();
/// <summary>
/// Set window icon.
/// </summary>
public void SetWindowIcon (Image windowIcon)
{
csb_Atomic_Graphics_SetWindowIcon(nativeInstance, windowIcon == null ? IntPtr.Zero : windowIcon.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetWindowIcon(IntPtr self, IntPtr windowIcon);
/// <summary>
/// Set window title.
/// </summary>
public void SetWindowTitle (string windowTitle)
{
csb_Atomic_Graphics_SetWindowTitle(nativeInstance, windowTitle);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetWindowTitle(IntPtr self, string windowTitle);
/// <summary>
/// Set window position.
/// </summary>
public void SetWindowPosition (int x, int y)
{
csb_Atomic_Graphics_SetWindowPosition(nativeInstance, x, y);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetWindowPosition(IntPtr self, int x, int y);
/// <summary>
/// Set window size.
/// </summary>
public void SetWindowSize (int width, int height)
{
csb_Atomic_Graphics_SetWindowSize(nativeInstance, width, height);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetWindowSize(IntPtr self, int width, int height);
/// <summary>
/// Center window.
/// </summary>
public void CenterWindow ()
{
csb_Atomic_Graphics_CenterWindow(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_CenterWindow(IntPtr self);
/// <summary>
/// Bring the window to front with focus
/// </summary>
public void RaiseWindow ()
{
csb_Atomic_Graphics_RaiseWindow(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_RaiseWindow(IntPtr self);
/// <summary>
/// Set whether the main window uses sRGB conversion on write.
/// </summary>
public void SetSRGB (bool enable)
{
csb_Atomic_Graphics_SetSRGB(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetSRGB(IntPtr self, bool enable);
/// <summary>
/// Set whether to flush the GPU command buffer to prevent multiple frames being queued and uneven frame timesteps. Not yet implemented on OpenGL.
/// </summary>
public void SetFlushGPU (bool enable)
{
csb_Atomic_Graphics_SetFlushGPU(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetFlushGPU(IntPtr self, bool enable);
/// <summary>
/// Set forced use of OpenGL 2 even if OpenGL 3 is available. Must be called before setting the screen mode for the first time. Default false.
/// </summary>
public void SetForceGL2 (bool enable)
{
csb_Atomic_Graphics_SetForceGL2(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetForceGL2(IntPtr self, bool enable);
/// <summary>
/// Set allowed screen orientations as a space-separated list of "LandscapeLeft", "LandscapeRight", "Portrait" and "PortraitUpsideDown". Affects currently only iOS platform.
/// </summary>
public void SetOrientations (string orientations)
{
csb_Atomic_Graphics_SetOrientations(nativeInstance, orientations);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetOrientations(IntPtr self, string orientations);
/// <summary>
/// Toggle between full screen and windowed mode. Return true if successful.
/// </summary>
public bool ToggleFullscreen ()
{
return csb_Atomic_Graphics_ToggleFullscreen(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_ToggleFullscreen(IntPtr self);
/// <summary>
/// Close the window.
/// </summary>
public void Close ()
{
csb_Atomic_Graphics_Close(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_Close(IntPtr self);
/// <summary>
/// Take a screenshot. Return true if successful.
/// </summary>
public bool TakeScreenShot (Image destImage)
{
return csb_Atomic_Graphics_TakeScreenShot(nativeInstance, destImage == null ? IntPtr.Zero : destImage.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_TakeScreenShot(IntPtr self, IntPtr destImage);
/// <summary>
/// Begin frame rendering. Return true if device available and can render.
/// </summary>
public bool BeginFrame ()
{
return csb_Atomic_Graphics_BeginFrame(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_BeginFrame(IntPtr self);
/// <summary>
/// End frame rendering and swap buffers.
/// </summary>
public void EndFrame ()
{
csb_Atomic_Graphics_EndFrame(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_EndFrame(IntPtr self);
/// <summary>
/// Clear any or all of rendertarget, depth buffer and stencil buffer.
/// </summary>
public void Clear (uint flags, Color color, float depth = 1.0f, uint stencil = 0)
{
csb_Atomic_Graphics_Clear(nativeInstance, flags, ref color, depth, stencil);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_Clear(IntPtr self, uint flags, ref Color color, float depth, uint stencil);
/// <summary>
/// Resolve multisampled backbuffer to a texture rendertarget. The texture's size should match the viewport size.
/// </summary>
public bool ResolveToTexture (Texture2D destination, IntRect viewport)
{
return csb_Atomic_Graphics_ResolveToTexture(nativeInstance, destination == null ? IntPtr.Zero : destination.nativeInstance, ref viewport);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_ResolveToTexture(IntPtr self, IntPtr destination, ref IntRect viewport);
/// <summary>
/// Draw indexed, instanced geometry.
/// </summary>
public void DrawInstanced (PrimitiveType type, uint indexStart, uint indexCount, uint minVertex, uint vertexCount, uint instanceCount)
{
csb_Atomic_Graphics_DrawInstanced(nativeInstance, type, indexStart, indexCount, minVertex, vertexCount, instanceCount);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_DrawInstanced(IntPtr self, PrimitiveType type, uint indexStart, uint indexCount, uint minVertex, uint vertexCount, uint instanceCount);
/// <summary>
/// Set shaders.
/// </summary>
public void SetShaders (ShaderVariation vs, ShaderVariation ps)
{
csb_Atomic_Graphics_SetShaders(nativeInstance, vs == null ? IntPtr.Zero : vs.nativeInstance, ps == null ? IntPtr.Zero : ps.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetShaders(IntPtr self, IntPtr vs, IntPtr ps);
/// <summary>
/// Check whether a shader parameter exists on the currently set shaders.
/// </summary>
public bool HasShaderParameter (string param)
{
return csb_Atomic_Graphics_HasShaderParameter(nativeInstance, param);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_HasShaderParameter(IntPtr self, string param);
/// <summary>
/// Check whether the current shader program uses a texture unit.
/// </summary>
public bool HasTextureUnit (TextureUnit unit)
{
return csb_Atomic_Graphics_HasTextureUnit(nativeInstance, unit);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_HasTextureUnit(IntPtr self, TextureUnit unit);
/// <summary>
/// Clear remembered shader parameter source group.
/// </summary>
public void ClearParameterSource (ShaderParameterGroup group)
{
csb_Atomic_Graphics_ClearParameterSource(nativeInstance, group);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_ClearParameterSource(IntPtr self, ShaderParameterGroup group);
/// <summary>
/// Clear remembered shader parameter sources.
/// </summary>
public void ClearParameterSources ()
{
csb_Atomic_Graphics_ClearParameterSources(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_ClearParameterSources(IntPtr self);
/// <summary>
/// Clear remembered transform shader parameter sources.
/// </summary>
public void ClearTransformSources ()
{
csb_Atomic_Graphics_ClearTransformSources(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_ClearTransformSources(IntPtr self);
/// <summary>
/// Set texture.
/// </summary>
public void SetTexture (uint index, Texture texture)
{
csb_Atomic_Graphics_SetTexture(nativeInstance, index, texture == null ? IntPtr.Zero : texture.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetTexture(IntPtr self, uint index, IntPtr texture);
/// <summary>
/// Bind texture unit 0 for update. Called by Texture.
/// </summary>
public void SetTextureForUpdate (Texture texture)
{
csb_Atomic_Graphics_SetTextureForUpdate(nativeInstance, texture == null ? IntPtr.Zero : texture.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetTextureForUpdate(IntPtr self, IntPtr texture);
/// <summary>
/// Set default texture filtering mode.
/// </summary>
public void SetDefaultTextureFilterMode (TextureFilterMode mode)
{
csb_Atomic_Graphics_SetDefaultTextureFilterMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetDefaultTextureFilterMode(IntPtr self, TextureFilterMode mode);
/// <summary>
/// Set texture anisotropy.
/// </summary>
public void SetTextureAnisotropy (uint level)
{
csb_Atomic_Graphics_SetTextureAnisotropy(nativeInstance, level);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetTextureAnisotropy(IntPtr self, uint level);
/// <summary>
/// Dirty texture parameters of all textures (when global settings change.)
/// </summary>
public void SetTextureParametersDirty ()
{
csb_Atomic_Graphics_SetTextureParametersDirty(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetTextureParametersDirty(IntPtr self);
/// <summary>
/// Reset all rendertargets, depth-stencil surface and viewport.
/// </summary>
public void ResetRenderTargets ()
{
csb_Atomic_Graphics_ResetRenderTargets(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_ResetRenderTargets(IntPtr self);
/// <summary>
/// Reset specific rendertarget.
/// </summary>
public void ResetRenderTarget (uint index)
{
csb_Atomic_Graphics_ResetRenderTarget(nativeInstance, index);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_ResetRenderTarget(IntPtr self, uint index);
/// <summary>
/// Reset depth-stencil surface.
/// </summary>
public void ResetDepthStencil ()
{
csb_Atomic_Graphics_ResetDepthStencil(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_ResetDepthStencil(IntPtr self);
/// <summary>
/// Set viewport.
/// </summary>
public void SetViewport (IntRect rect)
{
csb_Atomic_Graphics_SetViewport(nativeInstance, ref rect);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetViewport(IntPtr self, ref IntRect rect);
/// <summary>
/// Set blending mode.
/// </summary>
public void SetBlendMode (BlendMode mode)
{
csb_Atomic_Graphics_SetBlendMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetBlendMode(IntPtr self, BlendMode mode);
/// <summary>
/// Set color write on/off.
/// </summary>
public void SetColorWrite (bool enable)
{
csb_Atomic_Graphics_SetColorWrite(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetColorWrite(IntPtr self, bool enable);
/// <summary>
/// Set hardware culling mode.
/// </summary>
public void SetCullMode (CullMode mode)
{
csb_Atomic_Graphics_SetCullMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetCullMode(IntPtr self, CullMode mode);
/// <summary>
/// Set depth bias.
/// </summary>
public void SetDepthBias (float constantBias, float slopeScaledBias)
{
csb_Atomic_Graphics_SetDepthBias(nativeInstance, constantBias, slopeScaledBias);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetDepthBias(IntPtr self, float constantBias, float slopeScaledBias);
/// <summary>
/// Set depth compare.
/// </summary>
public void SetDepthTest (CompareMode mode)
{
csb_Atomic_Graphics_SetDepthTest(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetDepthTest(IntPtr self, CompareMode mode);
/// <summary>
/// Set depth write on/off.
/// </summary>
public void SetDepthWrite (bool enable)
{
csb_Atomic_Graphics_SetDepthWrite(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetDepthWrite(IntPtr self, bool enable);
/// <summary>
/// Set polygon fill mode.
/// </summary>
public void SetFillMode (FillMode mode)
{
csb_Atomic_Graphics_SetFillMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetFillMode(IntPtr self, FillMode mode);
/// <summary>
/// Set stencil test.
/// </summary>
public void SetStencilTest (bool enable, CompareMode mode = CompareMode.CMP_ALWAYS, StencilOp pass = StencilOp.OP_KEEP, StencilOp fail = StencilOp.OP_KEEP, StencilOp zFail = StencilOp.OP_KEEP, uint stencilRef = 0, uint compareMask = Constants.M_MAX_UNSIGNED, uint writeMask = Constants.M_MAX_UNSIGNED)
{
csb_Atomic_Graphics_SetStencilTest(nativeInstance, enable, mode, pass, fail, zFail, stencilRef, compareMask, writeMask);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetStencilTest(IntPtr self, bool enable, CompareMode mode, StencilOp pass, StencilOp fail, StencilOp zFail, uint stencilRef, uint compareMask, uint writeMask);
/// <summary>
/// Set a custom clipping plane. The plane is specified in world space, but is dependent on the view and projection matrices.
/// </summary>
public void SetClipPlane (bool enable)
{
csb_Atomic_Graphics_SetClipPlane(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetClipPlane(IntPtr self, bool enable);
/// <summary>
/// Begin dumping shader variation names to an XML file for precaching.
/// </summary>
public void BeginDumpShaders (string fileName)
{
csb_Atomic_Graphics_BeginDumpShaders(nativeInstance, fileName);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_BeginDumpShaders(IntPtr self, string fileName);
/// <summary>
/// End dumping shader variations names.
/// </summary>
public void EndDumpShaders ()
{
csb_Atomic_Graphics_EndDumpShaders(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_EndDumpShaders(IntPtr self);
/// <summary>
/// Return whether rendering initialized.
/// </summary>
public bool IsInitialized ()
{
return csb_Atomic_Graphics_IsInitialized(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_IsInitialized(IntPtr self);
/// <summary>
/// Return window title.
/// </summary>
public string GetWindowTitle ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Graphics_GetWindowTitle(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetWindowTitle(IntPtr self);
/// <summary>
/// Return graphics API name.
/// </summary>
public string GetApiName ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Graphics_GetApiName(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetApiName(IntPtr self);
private IntVector2 GraphicsGetWindowPositionReturnValue = new IntVector2();
/// <summary>
/// Return window position.
/// </summary>
public IntVector2 GetWindowPosition ()
{
csb_Atomic_Graphics_GetWindowPosition(nativeInstance, ref GraphicsGetWindowPositionReturnValue);
return GraphicsGetWindowPositionReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_GetWindowPosition(IntPtr self, ref IntVector2 retValue);
/// <summary>
/// Return window width.
/// </summary>
public int GetWidth ()
{
return csb_Atomic_Graphics_GetWidth(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Graphics_GetWidth(IntPtr self);
/// <summary>
/// Return window height.
/// </summary>
public int GetHeight ()
{
return csb_Atomic_Graphics_GetHeight(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Graphics_GetHeight(IntPtr self);
/// <summary>
/// Return multisample mode (1 = no multisampling.)
/// </summary>
public int GetMultiSample ()
{
return csb_Atomic_Graphics_GetMultiSample(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Graphics_GetMultiSample(IntPtr self);
/// <summary>
/// Return whether window is fullscreen.
/// </summary>
public bool GetFullscreen ()
{
return csb_Atomic_Graphics_GetFullscreen(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetFullscreen(IntPtr self);
/// <summary>
/// Return whether window is borderless.
/// </summary>
public bool GetBorderless ()
{
return csb_Atomic_Graphics_GetBorderless(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetBorderless(IntPtr self);
/// <summary>
/// Return whether window is resizable.
/// </summary>
public bool GetResizable ()
{
return csb_Atomic_Graphics_GetResizable(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetResizable(IntPtr self);
/// <summary>
/// Return whether vertical sync is on.
/// </summary>
public bool GetVSync ()
{
return csb_Atomic_Graphics_GetVSync(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetVSync(IntPtr self);
/// <summary>
/// Return whether triple buffering is enabled.
/// </summary>
public bool GetTripleBuffer ()
{
return csb_Atomic_Graphics_GetTripleBuffer(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetTripleBuffer(IntPtr self);
/// <summary>
/// Return whether the main window is using sRGB conversion on write.
/// </summary>
public bool GetSRGB ()
{
return csb_Atomic_Graphics_GetSRGB(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetSRGB(IntPtr self);
/// <summary>
/// Return whether the GPU command buffer is flushed each frame. Not yet implemented on OpenGL.
/// </summary>
public bool GetFlushGPU ()
{
return csb_Atomic_Graphics_GetFlushGPU(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetFlushGPU(IntPtr self);
/// <summary>
/// Return whether OpenGL 2 use is forced.
/// </summary>
public bool GetForceGL2 ()
{
return csb_Atomic_Graphics_GetForceGL2(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetForceGL2(IntPtr self);
/// <summary>
/// Return allowed screen orientations.
/// </summary>
public string GetOrientations ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Graphics_GetOrientations(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetOrientations(IntPtr self);
/// <summary>
/// Return whether device is lost, and can not yet render.
/// </summary>
public bool IsDeviceLost ()
{
return csb_Atomic_Graphics_IsDeviceLost(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_IsDeviceLost(IntPtr self);
/// <summary>
/// Return number of primitives drawn this frame.
/// </summary>
public uint GetNumPrimitives ()
{
return csb_Atomic_Graphics_GetNumPrimitives(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetNumPrimitives(IntPtr self);
/// <summary>
/// Return number of batches drawn this frame.
/// </summary>
public uint GetNumBatches ()
{
return csb_Atomic_Graphics_GetNumBatches(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetNumBatches(IntPtr self);
/// <summary>
/// Return dummy color texture format for shadow maps. 0 if not needed, may be nonzero on OS X to work around an Intel driver issue.
/// </summary>
public uint GetDummyColorFormat ()
{
return csb_Atomic_Graphics_GetDummyColorFormat(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetDummyColorFormat(IntPtr self);
/// <summary>
/// Return shadow map depth texture format, or 0 if not supported.
/// </summary>
public uint GetShadowMapFormat ()
{
return csb_Atomic_Graphics_GetShadowMapFormat(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetShadowMapFormat(IntPtr self);
/// <summary>
/// Return 24-bit shadow map depth texture format, or 0 if not supported.
/// </summary>
public uint GetHiresShadowMapFormat ()
{
return csb_Atomic_Graphics_GetHiresShadowMapFormat(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetHiresShadowMapFormat(IntPtr self);
/// <summary>
/// Return whether hardware instancing is supported.
/// </summary>
public bool GetInstancingSupport ()
{
return csb_Atomic_Graphics_GetInstancingSupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetInstancingSupport(IntPtr self);
/// <summary>
/// Return whether light pre-pass rendering is supported.
/// </summary>
public bool GetLightPrepassSupport ()
{
return csb_Atomic_Graphics_GetLightPrepassSupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetLightPrepassSupport(IntPtr self);
/// <summary>
/// Return whether deferred rendering is supported.
/// </summary>
public bool GetDeferredSupport ()
{
return csb_Atomic_Graphics_GetDeferredSupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetDeferredSupport(IntPtr self);
/// <summary>
/// Return whether anisotropic texture filtering is supported.
/// </summary>
public bool GetAnisotropySupport ()
{
return csb_Atomic_Graphics_GetAnisotropySupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetAnisotropySupport(IntPtr self);
/// <summary>
/// Return whether shadow map depth compare is done in hardware. Always true on OpenGL.
/// </summary>
public bool GetHardwareShadowSupport ()
{
return csb_Atomic_Graphics_GetHardwareShadowSupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetHardwareShadowSupport(IntPtr self);
/// <summary>
/// Return whether a readable hardware depth format is available.
/// </summary>
public bool GetReadableDepthSupport ()
{
return csb_Atomic_Graphics_GetReadableDepthSupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetReadableDepthSupport(IntPtr self);
/// <summary>
/// Return whether sRGB conversion on texture sampling is supported.
/// </summary>
public bool GetSRGBSupport ()
{
return csb_Atomic_Graphics_GetSRGBSupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetSRGBSupport(IntPtr self);
/// <summary>
/// Return whether sRGB conversion on rendertarget writing is supported.
/// </summary>
public bool GetSRGBWriteSupport ()
{
return csb_Atomic_Graphics_GetSRGBWriteSupport(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetSRGBWriteSupport(IntPtr self);
private IntVector2 GraphicsGetDesktopResolutionReturnValue = new IntVector2();
/// <summary>
/// Return the desktop resolution.
/// </summary>
public IntVector2 GetDesktopResolution ()
{
csb_Atomic_Graphics_GetDesktopResolution(nativeInstance, ref GraphicsGetDesktopResolutionReturnValue);
return GraphicsGetDesktopResolutionReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_GetDesktopResolution(IntPtr self, ref IntVector2 retValue);
/// <summary>
/// Return a shader variation by name and defines.
/// </summary>
public ShaderVariation GetShader (ShaderType type, string name, string defines = "")
{
IntPtr retNativeInstance = csb_Atomic_Graphics_GetShader(nativeInstance, type, name, defines);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<ShaderVariation> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetShader(IntPtr self, ShaderType type, string name, string defines);
/// <summary>
/// Return vertex shader.
/// </summary>
public ShaderVariation GetVertexShader ()
{
IntPtr retNativeInstance = csb_Atomic_Graphics_GetVertexShader(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<ShaderVariation> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetVertexShader(IntPtr self);
/// <summary>
/// Return pixel shader.
/// </summary>
public ShaderVariation GetPixelShader ()
{
IntPtr retNativeInstance = csb_Atomic_Graphics_GetPixelShader(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<ShaderVariation> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetPixelShader(IntPtr self);
/// <summary>
/// Return texture unit index by name.
/// </summary>
public TextureUnit GetTextureUnit (string name)
{
return csb_Atomic_Graphics_GetTextureUnit(nativeInstance, name);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern TextureUnit csb_Atomic_Graphics_GetTextureUnit(IntPtr self, string name);
/// <summary>
/// Return texture unit name by index.
/// </summary>
public string GetTextureUnitName (TextureUnit unit)
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_Graphics_GetTextureUnitName(nativeInstance, unit));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetTextureUnitName(IntPtr self, TextureUnit unit);
/// <summary>
/// Return texture by texture unit index.
/// </summary>
public Texture GetTexture (uint index)
{
IntPtr retNativeInstance = csb_Atomic_Graphics_GetTexture(nativeInstance, index);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetTexture(IntPtr self, uint index);
/// <summary>
/// Return default texture filtering mode.
/// </summary>
public TextureFilterMode GetDefaultTextureFilterMode ()
{
return csb_Atomic_Graphics_GetDefaultTextureFilterMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern TextureFilterMode csb_Atomic_Graphics_GetDefaultTextureFilterMode(IntPtr self);
/// <summary>
/// Return rendertarget by index.
/// </summary>
public RenderSurface GetRenderTarget (uint index)
{
IntPtr retNativeInstance = csb_Atomic_Graphics_GetRenderTarget(nativeInstance, index);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetRenderTarget(IntPtr self, uint index);
/// <summary>
/// Return depth-stencil surface.
/// </summary>
public RenderSurface GetDepthStencil ()
{
IntPtr retNativeInstance = csb_Atomic_Graphics_GetDepthStencil(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetDepthStencil(IntPtr self);
/// <summary>
/// Return readable depth-stencil texture. Not created automatically on OpenGL.
/// </summary>
public Texture2D GetDepthTexture ()
{
IntPtr retNativeInstance = csb_Atomic_Graphics_GetDepthTexture(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture2D> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Graphics_GetDepthTexture(IntPtr self);
private IntRect GraphicsGetViewportReturnValue = new IntRect();
/// <summary>
/// Return the viewport coordinates.
/// </summary>
public IntRect GetViewport ()
{
csb_Atomic_Graphics_GetViewport(nativeInstance, ref GraphicsGetViewportReturnValue);
return GraphicsGetViewportReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_GetViewport(IntPtr self, ref IntRect retValue);
/// <summary>
/// Return texture anisotropy.
/// </summary>
public uint GetTextureAnisotropy ()
{
return csb_Atomic_Graphics_GetTextureAnisotropy(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetTextureAnisotropy(IntPtr self);
/// <summary>
/// Return blending mode.
/// </summary>
public BlendMode GetBlendMode ()
{
return csb_Atomic_Graphics_GetBlendMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern BlendMode csb_Atomic_Graphics_GetBlendMode(IntPtr self);
/// <summary>
/// Return whether color write is enabled.
/// </summary>
public bool GetColorWrite ()
{
return csb_Atomic_Graphics_GetColorWrite(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetColorWrite(IntPtr self);
/// <summary>
/// Return hardware culling mode.
/// </summary>
public CullMode GetCullMode ()
{
return csb_Atomic_Graphics_GetCullMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern CullMode csb_Atomic_Graphics_GetCullMode(IntPtr self);
/// <summary>
/// Return depth constant bias.
/// </summary>
public float GetDepthConstantBias ()
{
return csb_Atomic_Graphics_GetDepthConstantBias(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Graphics_GetDepthConstantBias(IntPtr self);
/// <summary>
/// Return depth slope scaled bias.
/// </summary>
public float GetDepthSlopeScaledBias ()
{
return csb_Atomic_Graphics_GetDepthSlopeScaledBias(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern float csb_Atomic_Graphics_GetDepthSlopeScaledBias(IntPtr self);
/// <summary>
/// Return depth compare mode.
/// </summary>
public CompareMode GetDepthTest ()
{
return csb_Atomic_Graphics_GetDepthTest(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern CompareMode csb_Atomic_Graphics_GetDepthTest(IntPtr self);
/// <summary>
/// Return whether depth write is enabled.
/// </summary>
public bool GetDepthWrite ()
{
return csb_Atomic_Graphics_GetDepthWrite(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetDepthWrite(IntPtr self);
/// <summary>
/// Return polygon fill mode.
/// </summary>
public FillMode GetFillMode ()
{
return csb_Atomic_Graphics_GetFillMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern FillMode csb_Atomic_Graphics_GetFillMode(IntPtr self);
/// <summary>
/// Return whether stencil test is enabled.
/// </summary>
public bool GetStencilTest ()
{
return csb_Atomic_Graphics_GetStencilTest(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetStencilTest(IntPtr self);
/// <summary>
/// Return whether scissor test is enabled.
/// </summary>
public bool GetScissorTest ()
{
return csb_Atomic_Graphics_GetScissorTest(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetScissorTest(IntPtr self);
private IntRect GraphicsGetScissorRectReturnValue = new IntRect();
/// <summary>
/// Return scissor rectangle coordinates.
/// </summary>
public IntRect GetScissorRect ()
{
csb_Atomic_Graphics_GetScissorRect(nativeInstance, ref GraphicsGetScissorRectReturnValue);
return GraphicsGetScissorRectReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_GetScissorRect(IntPtr self, ref IntRect retValue);
/// <summary>
/// Return stencil compare mode.
/// </summary>
public CompareMode GetStencilTestMode ()
{
return csb_Atomic_Graphics_GetStencilTestMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern CompareMode csb_Atomic_Graphics_GetStencilTestMode(IntPtr self);
/// <summary>
/// Return stencil operation to do if stencil test passes.
/// </summary>
public StencilOp GetStencilPass ()
{
return csb_Atomic_Graphics_GetStencilPass(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern StencilOp csb_Atomic_Graphics_GetStencilPass(IntPtr self);
/// <summary>
/// Return stencil operation to do if stencil test fails.
/// </summary>
public StencilOp GetStencilFail ()
{
return csb_Atomic_Graphics_GetStencilFail(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern StencilOp csb_Atomic_Graphics_GetStencilFail(IntPtr self);
/// <summary>
/// Return stencil operation to do if depth compare fails.
/// </summary>
public StencilOp GetStencilZFail ()
{
return csb_Atomic_Graphics_GetStencilZFail(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern StencilOp csb_Atomic_Graphics_GetStencilZFail(IntPtr self);
/// <summary>
/// Return stencil reference value.
/// </summary>
public uint GetStencilRef ()
{
return csb_Atomic_Graphics_GetStencilRef(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetStencilRef(IntPtr self);
/// <summary>
/// Return stencil compare bitmask.
/// </summary>
public uint GetStencilCompareMask ()
{
return csb_Atomic_Graphics_GetStencilCompareMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetStencilCompareMask(IntPtr self);
/// <summary>
/// Return stencil write bitmask.
/// </summary>
public uint GetStencilWriteMask ()
{
return csb_Atomic_Graphics_GetStencilWriteMask(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetStencilWriteMask(IntPtr self);
/// <summary>
/// Return whether a custom clipping plane is in use.
/// </summary>
public bool GetUseClipPlane ()
{
return csb_Atomic_Graphics_GetUseClipPlane(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetUseClipPlane(IntPtr self);
private IntVector2 GraphicsGetRenderTargetDimensionsReturnValue = new IntVector2();
/// <summary>
/// Return rendertarget width and height.
/// </summary>
public IntVector2 GetRenderTargetDimensions ()
{
csb_Atomic_Graphics_GetRenderTargetDimensions(nativeInstance, ref GraphicsGetRenderTargetDimensionsReturnValue);
return GraphicsGetRenderTargetDimensionsReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_GetRenderTargetDimensions(IntPtr self, ref IntVector2 retValue);
/// <summary>
/// Window was resized through user interaction. Called by Input subsystem.
/// </summary>
public void WindowResized ()
{
csb_Atomic_Graphics_WindowResized(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_WindowResized(IntPtr self);
/// <summary>
/// Window was moved through user interaction. Called by Input subsystem.
/// </summary>
public void WindowMoved ()
{
csb_Atomic_Graphics_WindowMoved(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_WindowMoved(IntPtr self);
/// <summary>
/// Clean up too large scratch buffers.
/// </summary>
public void CleanupScratchBuffers ()
{
csb_Atomic_Graphics_CleanupScratchBuffers(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_CleanupScratchBuffers(IntPtr self);
/// <summary>
/// Clean up a render surface from all FBOs.
/// </summary>
public void CleanupRenderSurface (RenderSurface surface)
{
csb_Atomic_Graphics_CleanupRenderSurface(nativeInstance, surface == null ? IntPtr.Zero : surface.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_CleanupRenderSurface(IntPtr self, IntPtr surface);
/// <summary>
/// Clean up shader programs when a shader variation is released or destroyed.
/// </summary>
public void CleanupShaderPrograms (ShaderVariation variation)
{
csb_Atomic_Graphics_CleanupShaderPrograms(nativeInstance, variation == null ? IntPtr.Zero : variation.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_CleanupShaderPrograms(IntPtr self, IntPtr variation);
/// <summary>
/// Release/clear GPU objects and optionally close the window.
/// </summary>
public void Release (bool clearGPUObjects, bool closeWindow)
{
csb_Atomic_Graphics_Release(nativeInstance, clearGPUObjects, closeWindow);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_Release(IntPtr self, bool clearGPUObjects, bool closeWindow);
/// <summary>
/// Restore GPU objects and reinitialize state. Requires an open window.
/// </summary>
public void Restore ()
{
csb_Atomic_Graphics_Restore(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_Restore(IntPtr self);
/// <summary>
/// Maximize the Window.
/// </summary>
public void Maximize ()
{
csb_Atomic_Graphics_Maximize(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_Maximize(IntPtr self);
/// <summary>
/// Minimize the Window.
/// </summary>
public void Minimize ()
{
csb_Atomic_Graphics_Minimize(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_Minimize(IntPtr self);
/// <summary>
/// Mark the FBO needing an update.
/// </summary>
public void MarkFBODirty ()
{
csb_Atomic_Graphics_MarkFBODirty(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_MarkFBODirty(IntPtr self);
/// <summary>
/// Bind a VBO, avoiding redundant operation.
/// </summary>
public void SetVBO (uint _object)
{
csb_Atomic_Graphics_SetVBO(nativeInstance, _object);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetVBO(IntPtr self, uint _object);
/// <summary>
/// Bind a UBO, avoiding redundant operation.
/// </summary>
public void SetUBO (uint _object)
{
csb_Atomic_Graphics_SetUBO(nativeInstance, _object);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_SetUBO(IntPtr self, uint _object);
/// <summary>
/// Return the API-specific alpha texture format.
/// </summary>
public static uint GetAlphaFormat ()
{
return csb_Atomic_Graphics_GetAlphaFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetAlphaFormat();
/// <summary>
/// Return the API-specific luminance texture format.
/// </summary>
public static uint GetLuminanceFormat ()
{
return csb_Atomic_Graphics_GetLuminanceFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetLuminanceFormat();
/// <summary>
/// Return the API-specific luminance alpha texture format.
/// </summary>
public static uint GetLuminanceAlphaFormat ()
{
return csb_Atomic_Graphics_GetLuminanceAlphaFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetLuminanceAlphaFormat();
/// <summary>
/// Return the API-specific RGB texture format.
/// </summary>
public static uint GetRGBFormat ()
{
return csb_Atomic_Graphics_GetRGBFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRGBFormat();
/// <summary>
/// Return the API-specific RGBA texture format.
/// </summary>
public static uint GetRGBAFormat ()
{
return csb_Atomic_Graphics_GetRGBAFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRGBAFormat();
/// <summary>
/// Return the API-specific RGBA 16-bit texture format.
/// </summary>
public static uint GetRGBA16Format ()
{
return csb_Atomic_Graphics_GetRGBA16Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRGBA16Format();
/// <summary>
/// Return the API-specific RGBA 16-bit float texture format.
/// </summary>
public static uint GetRGBAFloat16Format ()
{
return csb_Atomic_Graphics_GetRGBAFloat16Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRGBAFloat16Format();
/// <summary>
/// Return the API-specific RGBA 32-bit float texture format.
/// </summary>
public static uint GetRGBAFloat32Format ()
{
return csb_Atomic_Graphics_GetRGBAFloat32Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRGBAFloat32Format();
/// <summary>
/// Return the API-specific RG 16-bit texture format.
/// </summary>
public static uint GetRG16Format ()
{
return csb_Atomic_Graphics_GetRG16Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRG16Format();
/// <summary>
/// Return the API-specific RG 16-bit float texture format.
/// </summary>
public static uint GetRGFloat16Format ()
{
return csb_Atomic_Graphics_GetRGFloat16Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRGFloat16Format();
/// <summary>
/// Return the API-specific RG 32-bit float texture format.
/// </summary>
public static uint GetRGFloat32Format ()
{
return csb_Atomic_Graphics_GetRGFloat32Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetRGFloat32Format();
/// <summary>
/// Return the API-specific single channel 16-bit float texture format.
/// </summary>
public static uint GetFloat16Format ()
{
return csb_Atomic_Graphics_GetFloat16Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetFloat16Format();
/// <summary>
/// Return the API-specific single channel 32-bit float texture format.
/// </summary>
public static uint GetFloat32Format ()
{
return csb_Atomic_Graphics_GetFloat32Format();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetFloat32Format();
/// <summary>
/// Return the API-specific linear depth texture format.
/// </summary>
public static uint GetLinearDepthFormat ()
{
return csb_Atomic_Graphics_GetLinearDepthFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetLinearDepthFormat();
/// <summary>
/// Return the API-specific hardware depth-stencil texture format.
/// </summary>
public static uint GetDepthStencilFormat ()
{
return csb_Atomic_Graphics_GetDepthStencilFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetDepthStencilFormat();
/// <summary>
/// Return the API-specific readable hardware depth format, or 0 if not supported.
/// </summary>
public static uint GetReadableDepthFormat ()
{
return csb_Atomic_Graphics_GetReadableDepthFormat();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetReadableDepthFormat();
private static Vector2 GraphicsGetPixelUVOffsetReturnValue = new Vector2();
/// <summary>
/// Return UV offset required for pixel perfect rendering.
/// </summary>
public static Vector2 GetPixelUVOffset ()
{
csb_Atomic_Graphics_GetPixelUVOffset(ref GraphicsGetPixelUVOffsetReturnValue);
return GraphicsGetPixelUVOffsetReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_GetPixelUVOffset(ref Vector2 retValue);
/// <summary>
/// Return maximum number of supported bones for skinning.
/// </summary>
public static uint GetMaxBones ()
{
return csb_Atomic_Graphics_GetMaxBones();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Graphics_GetMaxBones();
/// <summary>
/// Return whether is using an OpenGL 3 context.
/// </summary>
public static bool GetGL3Support ()
{
return csb_Atomic_Graphics_GetGL3Support();
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetGL3Support();
/// <summary>
/// Return the current monitor number
/// </summary>
public int GetCurrentMonitor ()
{
return csb_Atomic_Graphics_GetCurrentMonitor(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Graphics_GetCurrentMonitor(IntPtr self);
/// <summary>
/// Return the available monitors number
/// </summary>
public int GetNumMonitors ()
{
return csb_Atomic_Graphics_GetNumMonitors(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Graphics_GetNumMonitors(IntPtr self);
/// <summary>
/// Return true if window is maximized
/// </summary>
public bool GetMaximized ()
{
return csb_Atomic_Graphics_GetMaximized(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Graphics_GetMaximized(IntPtr self);
private IntVector2 GraphicsGetMonitorResolutionReturnValue = new IntVector2();
/// <summary>
/// Return monitor resolution
/// </summary>
public IntVector2 GetMonitorResolution (int monitorId)
{
csb_Atomic_Graphics_GetMonitorResolution(nativeInstance, monitorId, ref GraphicsGetMonitorResolutionReturnValue);
return GraphicsGetMonitorResolutionReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Graphics_GetMonitorResolution(IntPtr self, int monitorId, ref IntVector2 retValue);
}
public partial class RenderSurface : RefCounted
{
public uint NumViewports
{
get
{
return GetNumViewports();
}
set
{
SetNumViewports(value);
}
}
public RenderSurfaceUpdateMode UpdateMode
{
get
{
return GetUpdateMode();
}
set
{
SetUpdateMode(value);
}
}
public RenderSurface LinkedRenderTarget
{
get
{
return GetLinkedRenderTarget();
}
set
{
SetLinkedRenderTarget(value);
}
}
public RenderSurface LinkedDepthStencil
{
get
{
return GetLinkedDepthStencil();
}
set
{
SetLinkedDepthStencil(value);
}
}
public Texture ParentTexture
{
get
{
return GetParentTexture();
}
}
public uint RenderBuffer
{
get
{
return GetRenderBuffer();
}
}
public int Width
{
get
{
return GetWidth();
}
}
public int Height
{
get
{
return GetHeight();
}
}
public TextureUsage Usage
{
get
{
return GetUsage();
}
}
public uint Target
{
get
{
return GetTarget();
}
set
{
SetTarget(value);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_RenderSurface_GetClassIDStatic();
/// <summary>
/// Construct with parent texture.
/// </summary>
public RenderSurface (IntPtr native) : base (native)
{
}
public RenderSurface (Texture parentTexture)
{
if (typeof(RenderSurface) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_RenderSurface_Constructor(parentTexture == null ? IntPtr.Zero : parentTexture.nativeInstance), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_RenderSurface_Constructor(IntPtr parentTexture);
/// <summary>
/// Set number of viewports.
/// </summary>
public void SetNumViewports (uint num)
{
csb_Atomic_RenderSurface_SetNumViewports(nativeInstance, num);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_SetNumViewports(IntPtr self, uint num);
/// <summary>
/// Set viewport.
/// </summary>
public void SetViewport (uint index, Viewport viewport)
{
csb_Atomic_RenderSurface_SetViewport(nativeInstance, index, viewport == null ? IntPtr.Zero : viewport.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_SetViewport(IntPtr self, uint index, IntPtr viewport);
/// <summary>
/// Set viewport update mode. Default is to update when visible.
/// </summary>
public void SetUpdateMode (RenderSurfaceUpdateMode mode)
{
csb_Atomic_RenderSurface_SetUpdateMode(nativeInstance, mode);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_SetUpdateMode(IntPtr self, RenderSurfaceUpdateMode mode);
/// <summary>
/// Set linked color rendertarget.
/// </summary>
public void SetLinkedRenderTarget (RenderSurface renderTarget)
{
csb_Atomic_RenderSurface_SetLinkedRenderTarget(nativeInstance, renderTarget == null ? IntPtr.Zero : renderTarget.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_SetLinkedRenderTarget(IntPtr self, IntPtr renderTarget);
/// <summary>
/// Set linked depth-stencil surface.
/// </summary>
public void SetLinkedDepthStencil (RenderSurface depthStencil)
{
csb_Atomic_RenderSurface_SetLinkedDepthStencil(nativeInstance, depthStencil == null ? IntPtr.Zero : depthStencil.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_SetLinkedDepthStencil(IntPtr self, IntPtr depthStencil);
/// <summary>
/// Queue manual update of the viewport(s).
/// </summary>
public void QueueUpdate ()
{
csb_Atomic_RenderSurface_QueueUpdate(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_QueueUpdate(IntPtr self);
/// <summary>
/// Create a renderbuffer. Return true if successful.
/// </summary>
public bool CreateRenderBuffer (uint width, uint height, uint format)
{
return csb_Atomic_RenderSurface_CreateRenderBuffer(nativeInstance, width, height, format);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_RenderSurface_CreateRenderBuffer(IntPtr self, uint width, uint height, uint format);
/// <summary>
/// Handle device loss.
/// </summary>
public void OnDeviceLost ()
{
csb_Atomic_RenderSurface_OnDeviceLost(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_OnDeviceLost(IntPtr self);
/// <summary>
/// Release renderbuffer if any.
/// </summary>
public void Release ()
{
csb_Atomic_RenderSurface_Release(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_Release(IntPtr self);
/// <summary>
/// Return parent texture.
/// </summary>
public Texture GetParentTexture ()
{
IntPtr retNativeInstance = csb_Atomic_RenderSurface_GetParentTexture(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_RenderSurface_GetParentTexture(IntPtr self);
/// <summary>
/// Return renderbuffer if created.
/// </summary>
public uint GetRenderBuffer ()
{
return csb_Atomic_RenderSurface_GetRenderBuffer(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_RenderSurface_GetRenderBuffer(IntPtr self);
/// <summary>
/// Return width.
/// </summary>
public int GetWidth ()
{
return csb_Atomic_RenderSurface_GetWidth(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_RenderSurface_GetWidth(IntPtr self);
/// <summary>
/// Return height.
/// </summary>
public int GetHeight ()
{
return csb_Atomic_RenderSurface_GetHeight(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_RenderSurface_GetHeight(IntPtr self);
/// <summary>
/// Return usage.
/// </summary>
public TextureUsage GetUsage ()
{
return csb_Atomic_RenderSurface_GetUsage(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern TextureUsage csb_Atomic_RenderSurface_GetUsage(IntPtr self);
/// <summary>
/// Return number of viewports.
/// </summary>
public uint GetNumViewports ()
{
return csb_Atomic_RenderSurface_GetNumViewports(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_RenderSurface_GetNumViewports(IntPtr self);
/// <summary>
/// Return viewport by index.
/// </summary>
public Viewport GetViewport (uint index)
{
IntPtr retNativeInstance = csb_Atomic_RenderSurface_GetViewport(nativeInstance, index);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Viewport> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_RenderSurface_GetViewport(IntPtr self, uint index);
/// <summary>
/// Return viewport update mode.
/// </summary>
public RenderSurfaceUpdateMode GetUpdateMode ()
{
return csb_Atomic_RenderSurface_GetUpdateMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern RenderSurfaceUpdateMode csb_Atomic_RenderSurface_GetUpdateMode(IntPtr self);
/// <summary>
/// Return linked color buffer.
/// </summary>
public RenderSurface GetLinkedRenderTarget ()
{
IntPtr retNativeInstance = csb_Atomic_RenderSurface_GetLinkedRenderTarget(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_RenderSurface_GetLinkedRenderTarget(IntPtr self);
/// <summary>
/// Return linked depth buffer.
/// </summary>
public RenderSurface GetLinkedDepthStencil ()
{
IntPtr retNativeInstance = csb_Atomic_RenderSurface_GetLinkedDepthStencil(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_RenderSurface_GetLinkedDepthStencil(IntPtr self);
/// <summary>
/// Set surface's OpenGL target.
/// </summary>
public void SetTarget (uint target)
{
csb_Atomic_RenderSurface_SetTarget(nativeInstance, target);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_SetTarget(IntPtr self, uint target);
/// <summary>
/// Return surface's OpenGL target.
/// </summary>
public uint GetTarget ()
{
return csb_Atomic_RenderSurface_GetTarget(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_RenderSurface_GetTarget(IntPtr self);
/// <summary>
/// Clear update flag. Called by Renderer.
/// </summary>
public void WasUpdated ()
{
csb_Atomic_RenderSurface_WasUpdated(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_RenderSurface_WasUpdated(IntPtr self);
}
public partial class ShaderVariation : RefCounted
{
public string Name
{
get
{
return GetName();
}
set
{
SetName(value);
}
}
public string Defines
{
get
{
return GetDefines();
}
set
{
SetDefines(value);
}
}
public Shader Owner
{
get
{
return GetOwner();
}
}
public ShaderType ShaderType
{
get
{
return GetShaderType();
}
}
public string FullName
{
get
{
return GetFullName();
}
}
public string CompilerOutput
{
get
{
return GetCompilerOutput();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_ShaderVariation_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public ShaderVariation (IntPtr native) : base (native)
{
}
public ShaderVariation (Shader owner, ShaderType type)
{
if (typeof(ShaderVariation) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_ShaderVariation_Constructor(owner == null ? IntPtr.Zero : owner.nativeInstance, type), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_ShaderVariation_Constructor(IntPtr owner, ShaderType type);
/// <summary>
/// Mark the GPU resource destroyed on context destruction.
/// </summary>
public virtual void OnDeviceLost ()
{
csb_Atomic_ShaderVariation_OnDeviceLost(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_ShaderVariation_OnDeviceLost(IntPtr self);
/// <summary>
/// Release the shader.
/// </summary>
public virtual void Release ()
{
csb_Atomic_ShaderVariation_Release(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_ShaderVariation_Release(IntPtr self);
/// <summary>
/// Compile the shader. Return true if successful.
/// </summary>
public bool Create ()
{
return csb_Atomic_ShaderVariation_Create(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_ShaderVariation_Create(IntPtr self);
/// <summary>
/// Set name.
/// </summary>
public void SetName (string name)
{
csb_Atomic_ShaderVariation_SetName(nativeInstance, name);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_ShaderVariation_SetName(IntPtr self, string name);
/// <summary>
/// Set defines.
/// </summary>
public void SetDefines (string defines)
{
csb_Atomic_ShaderVariation_SetDefines(nativeInstance, defines);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_ShaderVariation_SetDefines(IntPtr self, string defines);
/// <summary>
/// Return the owner resource.
/// </summary>
public Shader GetOwner ()
{
IntPtr retNativeInstance = csb_Atomic_ShaderVariation_GetOwner(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Shader> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_ShaderVariation_GetOwner(IntPtr self);
/// <summary>
/// Return shader type.
/// </summary>
public ShaderType GetShaderType ()
{
return csb_Atomic_ShaderVariation_GetShaderType(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern ShaderType csb_Atomic_ShaderVariation_GetShaderType(IntPtr self);
/// <summary>
/// Return name.
/// </summary>
public string GetName ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_ShaderVariation_GetName(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_ShaderVariation_GetName(IntPtr self);
/// <summary>
/// Return defines.
/// </summary>
public string GetDefines ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_ShaderVariation_GetDefines(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_ShaderVariation_GetDefines(IntPtr self);
/// <summary>
/// Return full shader name.
/// </summary>
public string GetFullName ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_ShaderVariation_GetFullName(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_ShaderVariation_GetFullName(IntPtr self);
/// <summary>
/// Return compile error/warning string.
/// </summary>
public string GetCompilerOutput ()
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(csb_Atomic_ShaderVariation_GetCompilerOutput(nativeInstance));
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_ShaderVariation_GetCompilerOutput(IntPtr self);
}
public partial class Texture : Resource
{
public uint NumLevels
{
set
{
SetNumLevels(value);
}
}
public TextureFilterMode FilterMode
{
get
{
return GetFilterMode();
}
set
{
SetFilterMode(value);
}
}
public bool ShadowCompare
{
get
{
return GetShadowCompare();
}
set
{
SetShadowCompare(value);
}
}
public Color BorderColor
{
get
{
return GetBorderColor();
}
set
{
SetBorderColor(value);
}
}
public bool SRGB
{
get
{
return GetSRGB();
}
set
{
SetSRGB(value);
}
}
public Texture BackupTexture
{
get
{
return GetBackupTexture();
}
set
{
SetBackupTexture(value);
}
}
public uint Target
{
get
{
return GetTarget();
}
}
public uint Format
{
get
{
return GetFormat();
}
}
public uint Levels
{
get
{
return GetLevels();
}
}
public int Width
{
get
{
return GetWidth();
}
}
public int Height
{
get
{
return GetHeight();
}
}
public int Depth
{
get
{
return GetDepth();
}
}
public bool ParametersDirty
{
get
{
return GetParametersDirty();
}
}
public TextureUsage Usage
{
get
{
return GetUsage();
}
}
public uint Components
{
get
{
return GetComponents();
}
}
public XMLFile Parameters
{
set
{
SetParameters(value);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Texture_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Texture (IntPtr native) : base (native)
{
}
public Texture ()
{
if (typeof(Texture) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Texture_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Texture_Constructor();
/// <summary>
/// Set number of requested mip levels. Needs to be called before setting size.
/// </summary>
public void SetNumLevels (uint levels)
{
csb_Atomic_Texture_SetNumLevels(nativeInstance, levels);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetNumLevels(IntPtr self, uint levels);
/// <summary>
/// Set filtering mode.
/// </summary>
public void SetFilterMode (TextureFilterMode filter)
{
csb_Atomic_Texture_SetFilterMode(nativeInstance, filter);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetFilterMode(IntPtr self, TextureFilterMode filter);
/// <summary>
/// Set addressing mode by texture coordinate.
/// </summary>
public void SetAddressMode (TextureCoordinate coord, TextureAddressMode address)
{
csb_Atomic_Texture_SetAddressMode(nativeInstance, coord, address);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetAddressMode(IntPtr self, TextureCoordinate coord, TextureAddressMode address);
/// <summary>
/// Set shadow compare mode.
/// </summary>
public void SetShadowCompare (bool enable)
{
csb_Atomic_Texture_SetShadowCompare(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetShadowCompare(IntPtr self, bool enable);
/// <summary>
/// Set border color for border addressing mode.
/// </summary>
public void SetBorderColor (Color color)
{
csb_Atomic_Texture_SetBorderColor(nativeInstance, ref color);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetBorderColor(IntPtr self, ref Color color);
/// <summary>
/// Set sRGB sampling and writing mode.
/// </summary>
public void SetSRGB (bool enable)
{
csb_Atomic_Texture_SetSRGB(nativeInstance, enable);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetSRGB(IntPtr self, bool enable);
/// <summary>
/// Set backup texture to use when rendering to this texture.
/// </summary>
public void SetBackupTexture (Texture texture)
{
csb_Atomic_Texture_SetBackupTexture(nativeInstance, texture == null ? IntPtr.Zero : texture.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetBackupTexture(IntPtr self, IntPtr texture);
/// <summary>
/// Set mip levels to skip on a quality setting when loading. Ensures higher quality levels do not skip more.
/// </summary>
public void SetMipsToSkip (int quality, int mips)
{
csb_Atomic_Texture_SetMipsToSkip(nativeInstance, quality, mips);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetMipsToSkip(IntPtr self, int quality, int mips);
/// <summary>
/// Dirty the parameters.
/// </summary>
public void SetParametersDirty ()
{
csb_Atomic_Texture_SetParametersDirty(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetParametersDirty(IntPtr self);
/// <summary>
/// Update changed parameters to OpenGL. Called by Graphics when binding the texture.
/// </summary>
public void UpdateParameters ()
{
csb_Atomic_Texture_UpdateParameters(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_UpdateParameters(IntPtr self);
/// <summary>
/// Return texture's OpenGL target.
/// </summary>
public uint GetTarget ()
{
return csb_Atomic_Texture_GetTarget(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetTarget(IntPtr self);
/// <summary>
/// Return texture format.
/// </summary>
public uint GetFormat ()
{
return csb_Atomic_Texture_GetFormat(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetFormat(IntPtr self);
/// <summary>
/// Return whether the texture format is compressed.
/// </summary>
public bool IsCompressed ()
{
return csb_Atomic_Texture_IsCompressed(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture_IsCompressed(IntPtr self);
/// <summary>
/// Return number of mip levels.
/// </summary>
public uint GetLevels ()
{
return csb_Atomic_Texture_GetLevels(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetLevels(IntPtr self);
/// <summary>
/// Return width.
/// </summary>
public int GetWidth ()
{
return csb_Atomic_Texture_GetWidth(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Texture_GetWidth(IntPtr self);
/// <summary>
/// Return height.
/// </summary>
public int GetHeight ()
{
return csb_Atomic_Texture_GetHeight(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Texture_GetHeight(IntPtr self);
/// <summary>
/// Return height.
/// </summary>
public int GetDepth ()
{
return csb_Atomic_Texture_GetDepth(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Texture_GetDepth(IntPtr self);
/// <summary>
/// Return whether parameters are dirty.
/// </summary>
public bool GetParametersDirty ()
{
return csb_Atomic_Texture_GetParametersDirty(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture_GetParametersDirty(IntPtr self);
/// <summary>
/// Return filtering mode.
/// </summary>
public TextureFilterMode GetFilterMode ()
{
return csb_Atomic_Texture_GetFilterMode(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern TextureFilterMode csb_Atomic_Texture_GetFilterMode(IntPtr self);
/// <summary>
/// Return addressing mode by texture coordinate.
/// </summary>
public TextureAddressMode GetAddressMode (TextureCoordinate coord)
{
return csb_Atomic_Texture_GetAddressMode(nativeInstance, coord);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern TextureAddressMode csb_Atomic_Texture_GetAddressMode(IntPtr self, TextureCoordinate coord);
/// <summary>
/// Return whether shadow compare is enabled.
/// </summary>
public bool GetShadowCompare ()
{
return csb_Atomic_Texture_GetShadowCompare(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture_GetShadowCompare(IntPtr self);
private Color TextureGetBorderColorReturnValue = new Color();
/// <summary>
/// Return border color.
/// </summary>
public Color GetBorderColor ()
{
csb_Atomic_Texture_GetBorderColor(nativeInstance, ref TextureGetBorderColorReturnValue);
return TextureGetBorderColorReturnValue;
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_GetBorderColor(IntPtr self, ref Color retValue);
/// <summary>
/// Return whether is using sRGB sampling and writing.
/// </summary>
public bool GetSRGB ()
{
return csb_Atomic_Texture_GetSRGB(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture_GetSRGB(IntPtr self);
/// <summary>
/// Return backup texture.
/// </summary>
public Texture GetBackupTexture ()
{
IntPtr retNativeInstance = csb_Atomic_Texture_GetBackupTexture(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<Texture> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Texture_GetBackupTexture(IntPtr self);
/// <summary>
/// Return mip levels to skip on a quality setting when loading.
/// </summary>
public int GetMipsToSkip (int quality)
{
return csb_Atomic_Texture_GetMipsToSkip(nativeInstance, quality);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Texture_GetMipsToSkip(IntPtr self, int quality);
/// <summary>
/// Return mip level width, or 0 if level does not exist.
/// </summary>
public int GetLevelWidth (uint level)
{
return csb_Atomic_Texture_GetLevelWidth(nativeInstance, level);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Texture_GetLevelWidth(IntPtr self, uint level);
/// <summary>
/// Return mip level width, or 0 if level does not exist.
/// </summary>
public int GetLevelHeight (uint level)
{
return csb_Atomic_Texture_GetLevelHeight(nativeInstance, level);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Texture_GetLevelHeight(IntPtr self, uint level);
/// <summary>
/// Return mip level depth, or 0 if level does not exist.
/// </summary>
public int GetLevelDepth (uint level)
{
return csb_Atomic_Texture_GetLevelDepth(nativeInstance, level);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern int csb_Atomic_Texture_GetLevelDepth(IntPtr self, uint level);
/// <summary>
/// Return texture usage type.
/// </summary>
public TextureUsage GetUsage ()
{
return csb_Atomic_Texture_GetUsage(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern TextureUsage csb_Atomic_Texture_GetUsage(IntPtr self);
/// <summary>
/// Return data size in bytes for a pixel or block row.
/// </summary>
public uint GetRowDataSize (int width)
{
return csb_Atomic_Texture_GetRowDataSize(nativeInstance, width);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetRowDataSize(IntPtr self, int width);
/// <summary>
/// Return number of image components required to receive pixel data from GetData(), or 0 for compressed images.
/// </summary>
public uint GetComponents ()
{
return csb_Atomic_Texture_GetComponents(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetComponents(IntPtr self);
/// <summary>
/// Return the non-internal texture format corresponding to an OpenGL internal format.
/// </summary>
public static uint GetExternalFormat (uint format)
{
return csb_Atomic_Texture_GetExternalFormat(format);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetExternalFormat(uint format);
/// <summary>
/// Return the data type corresponding to an OpenGL internal format.
/// </summary>
public static uint GetDataType (uint format)
{
return csb_Atomic_Texture_GetDataType(format);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetDataType(uint format);
/// <summary>
/// Set additional parameters from an XML file.
/// </summary>
public void SetParameters (XMLFile xml)
{
csb_Atomic_Texture_SetParameters(nativeInstance, xml == null ? IntPtr.Zero : xml.nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture_SetParameters(IntPtr self, IntPtr xml);
/// <summary>
/// Return the corresponding SRGB texture format if supported. If not supported, return format unchanged.
/// </summary>
public uint GetSRGBFormat (uint format)
{
return csb_Atomic_Texture_GetSRGBFormat(nativeInstance, format);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern uint csb_Atomic_Texture_GetSRGBFormat(IntPtr self, uint format);
}
public partial class Texture2D : Texture
{
public RenderSurface RenderSurface
{
get
{
return GetRenderSurface();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Texture2D_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Texture2D (IntPtr native) : base (native)
{
}
public Texture2D ()
{
if (typeof(Texture2D) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Texture2D_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Texture2D_Constructor();
/// <summary>
/// Finish resource loading. Always called from the main thread. Return true if successful.
/// </summary>
public override bool EndLoad ()
{
return csb_Atomic_Texture2D_EndLoad(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture2D_EndLoad(IntPtr self);
/// <summary>
/// Mark the GPU resource destroyed on context destruction.
/// </summary>
public virtual void OnDeviceLost ()
{
csb_Atomic_Texture2D_OnDeviceLost(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture2D_OnDeviceLost(IntPtr self);
/// <summary>
/// Recreate the GPU resource and restore data if applicable.
/// </summary>
public virtual void OnDeviceReset ()
{
csb_Atomic_Texture2D_OnDeviceReset(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture2D_OnDeviceReset(IntPtr self);
/// <summary>
/// Release the texture.
/// </summary>
public virtual void Release ()
{
csb_Atomic_Texture2D_Release(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture2D_Release(IntPtr self);
/// <summary>
/// Set size, format and usage. Zero size will follow application window size. Return true if successful.
/// </summary>
public bool SetSize (int width, int height, uint format, TextureUsage usage = TextureUsage.TEXTURE_STATIC)
{
return csb_Atomic_Texture2D_SetSize(nativeInstance, width, height, format, usage);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture2D_SetSize(IntPtr self, int width, int height, uint format, TextureUsage usage);
/// <summary>
/// Return render surface.
/// </summary>
public RenderSurface GetRenderSurface ()
{
IntPtr retNativeInstance = csb_Atomic_Texture2D_GetRenderSurface(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Texture2D_GetRenderSurface(IntPtr self);
}
public partial class Texture3D : Texture
{
public RenderSurface RenderSurface
{
get
{
return GetRenderSurface();
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_Texture3D_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public Texture3D (IntPtr native) : base (native)
{
}
public Texture3D ()
{
if (typeof(Texture3D) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_Texture3D_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Texture3D_Constructor();
/// <summary>
/// Finish resource loading. Always called from the main thread. Return true if successful.
/// </summary>
public override bool EndLoad ()
{
return csb_Atomic_Texture3D_EndLoad(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture3D_EndLoad(IntPtr self);
/// <summary>
/// Mark the GPU resource destroyed on context destruction.
/// </summary>
public virtual void OnDeviceLost ()
{
csb_Atomic_Texture3D_OnDeviceLost(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture3D_OnDeviceLost(IntPtr self);
/// <summary>
/// Recreate the GPU resource and restore data if applicable.
/// </summary>
public virtual void OnDeviceReset ()
{
csb_Atomic_Texture3D_OnDeviceReset(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture3D_OnDeviceReset(IntPtr self);
/// <summary>
/// Release the texture.
/// </summary>
public virtual void Release ()
{
csb_Atomic_Texture3D_Release(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_Texture3D_Release(IntPtr self);
/// <summary>
/// Set size, format and usage. Zero size will follow application window size. Return true if successful.
/// </summary>
public bool SetSize (int width, int height, int depth, uint format, TextureUsage usage = TextureUsage.TEXTURE_STATIC)
{
return csb_Atomic_Texture3D_SetSize(nativeInstance, width, height, depth, format, usage);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_Texture3D_SetSize(IntPtr self, int width, int height, int depth, uint format, TextureUsage usage);
/// <summary>
/// Return render surface.
/// </summary>
public RenderSurface GetRenderSurface ()
{
IntPtr retNativeInstance = csb_Atomic_Texture3D_GetRenderSurface(nativeInstance);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_Texture3D_GetRenderSurface(IntPtr self);
}
public partial class TextureCube : Texture
{
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr csb_Atomic_TextureCube_GetClassIDStatic();
/// <summary>
/// Construct.
/// </summary>
public TextureCube (IntPtr native) : base (native)
{
}
public TextureCube ()
{
if (typeof(TextureCube) == this.GetType()) {
nativeInstance = NativeCore.RegisterNative (csb_Atomic_TextureCube_Constructor(), this);
}
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_TextureCube_Constructor();
/// <summary>
/// Finish resource loading. Always called from the main thread. Return true if successful.
/// </summary>
public override bool EndLoad ()
{
return csb_Atomic_TextureCube_EndLoad(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_TextureCube_EndLoad(IntPtr self);
/// <summary>
/// Mark the GPU resource destroyed on context destruction.
/// </summary>
public virtual void OnDeviceLost ()
{
csb_Atomic_TextureCube_OnDeviceLost(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_TextureCube_OnDeviceLost(IntPtr self);
/// <summary>
/// Recreate the GPU resource and restore data if applicable.
/// </summary>
public virtual void OnDeviceReset ()
{
csb_Atomic_TextureCube_OnDeviceReset(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_TextureCube_OnDeviceReset(IntPtr self);
/// <summary>
/// Release the texture.
/// </summary>
public virtual void Release ()
{
csb_Atomic_TextureCube_Release(nativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csb_Atomic_TextureCube_Release(IntPtr self);
/// <summary>
/// Set size, format and usage. Return true if successful.
/// </summary>
public bool SetSize (int size, uint format, TextureUsage usage = TextureUsage.TEXTURE_STATIC)
{
return csb_Atomic_TextureCube_SetSize(nativeInstance, size, format, usage);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern bool csb_Atomic_TextureCube_SetSize(IntPtr self, int size, uint format, TextureUsage usage);
/// <summary>
/// Return render surface for one face.
/// </summary>
public RenderSurface GetRenderSurface (CubeMapFace face)
{
IntPtr retNativeInstance = csb_Atomic_TextureCube_GetRenderSurface(nativeInstance, face);
return retNativeInstance == IntPtr.Zero ? null : NativeCore.WrapNative<RenderSurface> (retNativeInstance);
}
[DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern IntPtr csb_Atomic_TextureCube_GetRenderSurface(IntPtr self, CubeMapFace face);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment