2using System.Runtime.CompilerServices;
 
    3using System.Runtime.InteropServices;
 
   15        [MethodImpl(MethodImplOptions.InternalCall)]
 
   25            return INTERNAL_load(
name);
 
   31        public Shader shader { [MethodImpl(MethodImplOptions.InternalCall)] 
get; [MethodImpl(MethodImplOptions.InternalCall)] 
set; }
 
   42            INTERNAL_getParameterMat3(
name, out matrix);
 
   52            INTERNAL_getParameterMat4(
name, out matrix);
 
   62            INTERNAL_getParameterVec2(
name, out vector2);
 
   72            INTERNAL_getParameterVec3(
name, out vector3);
 
   82            INTERNAL_getParameterVec4(
name, out vector4);
 
   92            flt = INTERNAL_getParameterFloat(
name);
 
  102            val = INTERNAL_getParameterInt(
name);
 
  112            val = INTERNAL_getParameterBool(
name);
 
  122            INTERNAL_getParameterColor(
name, out color);
 
  147                Texture value = INTERNAL_getParameterTexture(
name);
 
  148                return (
T)Convert.ChangeType(value, typeof(
T));
 
  153                INTERNAL_getParameterMat3(
name, out 
Matrix3 value);
 
  154                return (
T)Convert.ChangeType(value, typeof(
T));
 
  159                INTERNAL_getParameterMat4(
name, out 
Matrix4 value);
 
  160                return (
T)Convert.ChangeType(value, typeof(
T));
 
  165                INTERNAL_getParameterVec2(
name, out 
Vector2 value);
 
  166                return (
T)Convert.ChangeType(value, typeof(
T));
 
  171                INTERNAL_getParameterVec3(
name, out 
Vector3 value);
 
  172                return (
T)Convert.ChangeType(value, typeof(
T));
 
  177                INTERNAL_getParameterVec4(
name, out 
Vector4 value);
 
  178                return (
T)Convert.ChangeType(value, typeof(
T));
 
  181            if (typeof(
T) == typeof(
float))
 
  183                float value = INTERNAL_getParameterFloat(
name);
 
  184                return (
T)Convert.ChangeType(value, typeof(
T));
 
  187            if (typeof(
T) == typeof(
int))
 
  189                int value = INTERNAL_getParameterInt(
name);
 
  190                return (
T)Convert.ChangeType(value, typeof(
T));
 
  193            if (typeof(
T) == typeof(
bool))
 
  195                bool value = INTERNAL_getParameterBool(
name);
 
  196                return (
T)Convert.ChangeType(value, typeof(
T));
 
  199            if (typeof(
T) == typeof(
Color))
 
  201                INTERNAL_getParameterColor(
name, out 
Color value);
 
  202                return (
T)Convert.ChangeType(value, typeof(
T));
 
  217            INTERNAL_setParameterMat3(
name, ref matrix);
 
  227            INTERNAL_setParameterMat4(
name, ref matrix);
 
  237            INTERNAL_setParameterVec2(
name, ref vector2);
 
  247            INTERNAL_setParameterVec3(
name, ref vector3);
 
  257            INTERNAL_setParameterVec4(
name, ref vector4);
 
  267            INTERNAL_setParameterFloat(
name, flt);
 
  277            INTERNAL_setParameterInt(
name, val);
 
  287            INTERNAL_setParameterBool(
name, val);
 
  297            INTERNAL_setParameterColor(
name, ref color);
 
  307            INTERNAL_setParameterTexture(
name, texture);
 
  312        [MethodImpl(MethodImplOptions.InternalCall)]
 
  313        private static extern Material INTERNAL_load(
string name);
 
  316        [MethodImpl(MethodImplOptions.InternalCall)]
 
  317        private extern void INTERNAL_getParameterMat3(
string name, out 
Matrix3 matrix);
 
  319        [MethodImpl(MethodImplOptions.InternalCall)]
 
  320        private extern void INTERNAL_getParameterMat4(
string name, out 
Matrix4 matrix);
 
  322        [MethodImpl(MethodImplOptions.InternalCall)]
 
  323        private extern void INTERNAL_getParameterVec2(
string name, out 
Vector2 vector2);
 
  325        [MethodImpl(MethodImplOptions.InternalCall)]
 
  326        private extern void INTERNAL_getParameterVec3(
string name, out 
Vector3 vector3);
 
  328        [MethodImpl(MethodImplOptions.InternalCall)]
 
  329        private extern void INTERNAL_getParameterVec4(
string name, out 
Vector4 vector4);
 
  331        [MethodImpl(MethodImplOptions.InternalCall)]
 
  332        private extern float INTERNAL_getParameterFloat(
string name);
 
  334        [MethodImpl(MethodImplOptions.InternalCall)]
 
  335        private extern int INTERNAL_getParameterInt(
string name);
 
  337        [MethodImpl(MethodImplOptions.InternalCall)]
 
  338        private extern bool INTERNAL_getParameterBool(
string name);
 
  340        [MethodImpl(MethodImplOptions.InternalCall)]
 
  341        private extern void INTERNAL_getParameterColor(
string name, out 
Color color);
 
  343        [MethodImpl(MethodImplOptions.InternalCall)]
 
  344        private extern Texture INTERNAL_getParameterTexture(
string name);
 
  347        [MethodImpl(MethodImplOptions.InternalCall)]
 
  348        private extern void INTERNAL_setParameterMat3(
string name, ref 
Matrix3 matrix);
 
  350        [MethodImpl(MethodImplOptions.InternalCall)]
 
  351        private extern void INTERNAL_setParameterMat4(
string name, ref 
Matrix4 matrix);
 
  353        [MethodImpl(MethodImplOptions.InternalCall)]
 
  354        private extern void INTERNAL_setParameterVec2(
string name, ref 
Vector2 vector2);
 
  356        [MethodImpl(MethodImplOptions.InternalCall)]
 
  357        private extern void INTERNAL_setParameterVec3(
string name, ref 
Vector3 vector3);
 
  359        [MethodImpl(MethodImplOptions.InternalCall)]
 
  360        private extern void INTERNAL_setParameterVec4(
string name, ref 
Vector4 vector4);
 
  362        [MethodImpl(MethodImplOptions.InternalCall)]
 
  363        private extern void INTERNAL_setParameterFloat(
string name, 
float flt);
 
  365        [MethodImpl(MethodImplOptions.InternalCall)]
 
  366        private extern void INTERNAL_setParameterInt(
string name, 
int val);
 
  368        [MethodImpl(MethodImplOptions.InternalCall)]
 
  369        private extern void INTERNAL_setParameterBool(
string name, 
bool val);
 
  371        [MethodImpl(MethodImplOptions.InternalCall)]
 
  372        private extern void INTERNAL_setParameterColor(
string name, ref 
Color color);
 
  374        [MethodImpl(MethodImplOptions.InternalCall)]
 
  375        private extern void INTERNAL_setParameterTexture(
string name, 
Texture texture);
 
string name
Get asset name
 
void SetParameter(string name, float flt)
Set value of the parameter
 
static Material Load(string name)
Load existing material
 
void GetParameter(string name, out Vector2 vector2)
Get value of the parameter
 
void SetParameter(string name, Vector4 vector4)
Set value of the parameter
 
void GetParameter(string name, out Matrix4 matrix)
Get value of the parameter
 
Material(string name)
Create a new material and set its name
 
void SetParameter(string name, Color color)
Set value of the parameter
 
void GetParameter(string name, out Color color)
Get value of the parameter
 
void SetParameter(string name, bool val)
Set value of the parameter
 
void SetParameter(string name, Texture texture)
Set value of the parameter
 
void GetParameter(string name, out Vector3 vector3)
Get value of the parameter
 
void SetParameter(string name, Matrix4 matrix)
Set value of the parameter
 
void GetParameter(string name, out Vector4 vector4)
Get value of the parameter
 
void SetParameter(string name, int val)
Set value of the parameter
 
void GetParameter(string name, out Matrix3 matrix)
Get value of the parameter
 
void SetParameter(string name, Matrix3 matrix)
Set value of the parameter
 
void SetParameter(string name, Vector2 vector2)
Set value of the parameter
 
void SetParameter(string name, Vector3 vector3)
Set value of the parameter
 
void GetParameter(string name, out bool val)
Get value of the parameter
 
T GetParameter< T >(string name)
Get value of the parameter
 
Shader shader
Get or set a shader for this material
 
void GetParameter(string name, out int val)
Get value of the parameter
 
void GetParameter(string name, out float flt)
Get value of the parameter
 
void GetParameter(string name, out Texture texture)
Get value of the parameter