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 }
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 }
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)); } }
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 }
extern private static void Internal_DrawProceduralIndexedIndirectNow(MeshTopology topology, GraphicsBuffer indexBuffer, ComputeBuffer bufferWithArgs, int argsOffset);
extern private static void Internal_DrawProceduralIndexedNow(MeshTopology topology, GraphicsBuffer indexBuffer, int indexCount, int instanceCount);
public void SetBuffer(int kernelIndex, string name, GraphicsBuffer buffer) { SetBuffer(kernelIndex, Shader.PropertyToID(name), buffer); }
public void SetConstantBuffer(string name, GraphicsBuffer buffer, int offset, int size) { SetConstantBuffer(Shader.PropertyToID(name), buffer, offset, size); }
extern private void Internal_DispatchIndirectGraphicsBuffer(int kernelIndex, [NotNull] GraphicsBuffer argsBuffer, uint argsOffset);
extern private void Internal_SetGraphicsBuffer(int kernelIndex, int nameID, [NotNull] GraphicsBuffer buffer);
[NativeName("SetGraphicsBufferFromScript")] extern private void SetGraphicsBufferImpl(int name, GraphicsBuffer value);
public void SetConstantBuffer(string name, GraphicsBuffer value, int offset, int size) { this.SetConstantGraphicsBufferImpl(Shader.PropertyToID(name), value, offset, size); }
public void SetBuffer(int nameID, GraphicsBuffer value) { this.SetGraphicsBufferImpl(nameID, value); }
public void SetBuffer(string name, GraphicsBuffer value) { this.SetGraphicsBufferImpl(Shader.PropertyToID(name), value); }
private extern void SetConstantGraphicsBufferImpl(int name, GraphicsBuffer value, int offset, int size);
private extern void SetGraphicsBufferImpl(int name, GraphicsBuffer value);
public void DispatchIndirect(int kernelIndex, GraphicsBuffer argsBuffer) { DispatchIndirect(kernelIndex, argsBuffer, 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);
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);
public void SetConstantBuffer(int nameID, GraphicsBuffer value, int offset, int size) { this.SetConstantGraphicsBufferImpl(nameID, value, offset, size); }
[NativeName("SetConstantGraphicsBufferFromScript")] extern private void SetConstantGraphicsBufferImpl(int name, GraphicsBuffer value, int offset, int size);
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); }
public void SetBuffer(int kernelIndex, int nameID, GraphicsBuffer buffer) { Internal_SetGraphicsBuffer(kernelIndex, nameID, buffer); }
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);
extern private static void Internal_SetRandomWriteTargetGraphicsBuffer(int index, GraphicsBuffer uav, bool preserveCounterValue);
public void SetConstantBuffer(int nameID, GraphicsBuffer buffer, int offset, int size) { SetConstantGraphicsBuffer(nameID, buffer, offset, size); }