コード例 #1
0
 static public int Release(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.GraphicsBuffer self = (UnityEngine.GraphicsBuffer)checkSelf(l);
         self.Release();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #2
0
 static public int SetData(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.GraphicsBuffer self = (UnityEngine.GraphicsBuffer)checkSelf(l);
             System.Array a1;
             checkType(l, 2, out a1);
             self.SetData(a1);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 5)
         {
             UnityEngine.GraphicsBuffer self = (UnityEngine.GraphicsBuffer)checkSelf(l);
             System.Array a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             System.Int32 a4;
             checkType(l, 5, out a4);
             self.SetData(a1, a2, a3, a4);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function SetData to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #3
0
    static int SetGlobalConstantBuffer(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 4 && TypeChecker.CheckTypes <string, UnityEngine.ComputeBuffer, int, int>(L, 1))
            {
                string arg0 = ToLua.ToString(L, 1);
                UnityEngine.ComputeBuffer arg1 = (UnityEngine.ComputeBuffer)ToLua.ToObject(L, 2);
                int arg2 = (int)LuaDLL.lua_tonumber(L, 3);
                int arg3 = (int)LuaDLL.lua_tonumber(L, 4);
                UnityEngine.Shader.SetGlobalConstantBuffer(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <int, UnityEngine.ComputeBuffer, int, int>(L, 1))
            {
                int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
                UnityEngine.ComputeBuffer arg1 = (UnityEngine.ComputeBuffer)ToLua.ToObject(L, 2);
                int arg2 = (int)LuaDLL.lua_tonumber(L, 3);
                int arg3 = (int)LuaDLL.lua_tonumber(L, 4);
                UnityEngine.Shader.SetGlobalConstantBuffer(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, UnityEngine.GraphicsBuffer, int, int>(L, 1))
            {
                string arg0 = ToLua.ToString(L, 1);
                UnityEngine.GraphicsBuffer arg1 = (UnityEngine.GraphicsBuffer)ToLua.ToObject(L, 2);
                int arg2 = (int)LuaDLL.lua_tonumber(L, 3);
                int arg3 = (int)LuaDLL.lua_tonumber(L, 4);
                UnityEngine.Shader.SetGlobalConstantBuffer(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <int, UnityEngine.GraphicsBuffer, int, int>(L, 1))
            {
                int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
                UnityEngine.GraphicsBuffer arg1 = (UnityEngine.GraphicsBuffer)ToLua.ToObject(L, 2);
                int arg2 = (int)LuaDLL.lua_tonumber(L, 3);
                int arg3 = (int)LuaDLL.lua_tonumber(L, 4);
                UnityEngine.Shader.SetGlobalConstantBuffer(arg0, arg1, arg2, arg3);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Shader.SetGlobalConstantBuffer"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #4
0
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.GraphicsBuffer        o;
         UnityEngine.GraphicsBuffer.Target a1;
         a1 = (UnityEngine.GraphicsBuffer.Target)LuaDLL.luaL_checkinteger(l, 2);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         o = new UnityEngine.GraphicsBuffer(a1, a2, a3);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #5
0
 extern private static void Internal_DrawProceduralIndexedIndirectNow(MeshTopology topology, GraphicsBuffer indexBuffer, ComputeBuffer bufferWithArgs, int argsOffset);
コード例 #6
0
 extern private static void Internal_DrawProceduralIndexedNow(MeshTopology topology, GraphicsBuffer indexBuffer, int indexCount, int instanceCount);
コード例 #7
0
 public void SetBuffer(int kernelIndex, string name, GraphicsBuffer buffer)
 {
     SetBuffer(kernelIndex, Shader.PropertyToID(name), buffer);
 }
コード例 #8
0
 public void SetConstantBuffer(string name, GraphicsBuffer buffer, int offset, int size)
 {
     SetConstantBuffer(Shader.PropertyToID(name), buffer, offset, size);
 }
コード例 #9
0
 extern private void Internal_DispatchIndirectGraphicsBuffer(int kernelIndex, [NotNull] GraphicsBuffer argsBuffer, uint argsOffset);
コード例 #10
0
 extern private void Internal_SetGraphicsBuffer(int kernelIndex, int nameID, [NotNull] GraphicsBuffer buffer);
コード例 #11
0
 [NativeName("SetGraphicsBufferFromScript")]  extern private void SetGraphicsBufferImpl(int name, GraphicsBuffer value);
コード例 #12
0
 public void SetConstantBuffer(string name, GraphicsBuffer value, int offset, int size)
 {
     this.SetConstantGraphicsBufferImpl(Shader.PropertyToID(name), value, offset, size);
 }
コード例 #13
0
 public void SetBuffer(int nameID, GraphicsBuffer value)
 {
     this.SetGraphicsBufferImpl(nameID, value);
 }
コード例 #14
0
 public void SetBuffer(string name, GraphicsBuffer value)
 {
     this.SetGraphicsBufferImpl(Shader.PropertyToID(name), value);
 }
コード例 #15
0
 private extern void SetConstantGraphicsBufferImpl(int name, GraphicsBuffer value, int offset, int size);
コード例 #16
0
 private extern void SetGraphicsBufferImpl(int name, GraphicsBuffer value);
コード例 #17
0
 public void DispatchIndirect(int kernelIndex, GraphicsBuffer argsBuffer)
 {
     DispatchIndirect(kernelIndex, argsBuffer, 0);
 }
コード例 #18
0
 extern private static void Internal_DrawProceduralIndexed(Material material, Bounds bounds, MeshTopology topology, GraphicsBuffer indexBuffer, int indexCount, int instanceCount, Camera camera, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, int layer);
コード例 #19
0
 extern private static void Internal_DrawProceduralIndexedIndirect(Material material, Bounds bounds, MeshTopology topology, GraphicsBuffer indexBuffer, ComputeBuffer bufferWithArgs, int argsOffset, Camera camera, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, int layer);
コード例 #20
0
 public void SetConstantBuffer(int nameID, GraphicsBuffer value, int offset, int size)
 {
     this.SetConstantGraphicsBufferImpl(nameID, value, offset, size);
 }
コード例 #21
0
 [NativeName("SetConstantGraphicsBufferFromScript")] extern private void SetConstantGraphicsBufferImpl(int name, GraphicsBuffer value, int offset, int size);
コード例 #22
0
 public static void DrawMeshInstancedIndirect(Mesh mesh, int submeshIndex, Material material, Bounds bounds, GraphicsBuffer bufferWithArgs, int argsOffset = 0, MaterialPropertyBlock properties = null, ShadowCastingMode castShadows = ShadowCastingMode.On, bool receiveShadows = true, int layer = 0, Camera camera = null, LightProbeUsage lightProbeUsage = LightProbeUsage.BlendProbes)
 {
     DrawMeshInstancedIndirect(mesh, submeshIndex, material, bounds, bufferWithArgs, argsOffset, properties, castShadows, receiveShadows, layer, camera, lightProbeUsage, null);
 }
コード例 #23
0
 public void SetBuffer(int kernelIndex, int nameID, GraphicsBuffer buffer)
 {
     Internal_SetGraphicsBuffer(kernelIndex, nameID, buffer);
 }
コード例 #24
0
 extern private static void Internal_DrawMeshInstancedIndirectGraphicsBuffer(Mesh mesh, int submeshIndex, Material material, Bounds bounds, GraphicsBuffer bufferWithArgs, int argsOffset, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, int layer, Camera camera, LightProbeUsage lightProbeUsage, LightProbeProxyVolume lightProbeProxyVolume);
コード例 #25
0
 extern private static void Internal_SetRandomWriteTargetGraphicsBuffer(int index, GraphicsBuffer uav, bool preserveCounterValue);
コード例 #26
0
 public void SetConstantBuffer(int nameID, GraphicsBuffer buffer, int offset, int size)
 {
     SetConstantGraphicsBuffer(nameID, buffer, offset, size);
 }