/// <summary> /// To be added. /// </summary> /// <param name="program"> /// To be added. /// </param> /// <param name="uniformCount"> /// To be added. /// </param> /// <param name="uniformNames"> /// To be added. /// This parameter's element count is computed from uniformCount. /// </param> /// <param name="uniformIndices"> /// To be added. /// This parameter's element count is computed from uniformCount. /// </param> public unsafe void GetUniformIndices([Flow(FlowDirection.In)] uint program, [Flow(FlowDirection.In)] uint uniformCount, [Count(Computed = "uniformCount"), Flow(FlowDirection.In)] string[] uniformNamesSa, [Count(Computed = "uniformCount"), Flow(FlowDirection.Out)] uint *uniformIndices) { // StringArrayOverloader var uniformNames = (char **)SilkMarshal.MarshalStringArrayToPtr(uniformNamesSa); GetUniformIndices(program, uniformCount, uniformNames, uniformIndices); SilkMarshal.CopyPtrToStringArray((IntPtr)uniformNames, uniformNamesSa); }
/// <summary> /// To be added. /// </summary> /// <param name="shader"> /// To be added. /// </param> /// <param name="count"> /// To be added. /// </param> /// <param name="path"> /// To be added. /// This parameter's element count is taken from count. /// </param> /// <param name="length"> /// To be added. /// This parameter's element count is taken from count. /// </param> public unsafe void CompileShaderInclude([Flow(FlowDirection.In)] uint shader, [Flow(FlowDirection.In)] uint count, [Count(Parameter = "count"), Flow(FlowDirection.In)] string[] pathSa, [Count(Parameter = "count"), Flow(FlowDirection.In)] Span <int> length) { // StringArrayOverloader var path = (char **)SilkMarshal.MarshalStringArrayToPtr(pathSa); CompileShaderInclude(shader, count, path, length); SilkMarshal.CopyPtrToStringArray((IntPtr)path, pathSa); }
/// <summary> /// To be added. /// </summary> /// <param name="program"> /// To be added. /// </param> /// <param name="count"> /// To be added. /// </param> /// <param name="varyings"> /// To be added. /// This parameter's element count is taken from count. /// </param> /// <param name="bufferMode"> /// To be added. /// </param> public unsafe void TransformFeedbackVaryings([Flow(FlowDirection.In)] uint program, [Flow(FlowDirection.In)] uint count, [Count(Parameter = "count"), Flow(FlowDirection.In)] string[] varyingsSa, [Flow(FlowDirection.In)] EXT bufferMode) { // StringArrayOverloader var varyings = (char **)SilkMarshal.MarshalStringArrayToPtr(varyingsSa); TransformFeedbackVaryings(program, count, varyings, bufferMode); SilkMarshal.CopyPtrToStringArray((IntPtr)varyings, varyingsSa); }
/// <summary> /// To be added. /// </summary> /// <param name="shaderObj"> /// To be added. /// </param> /// <param name="count"> /// To be added. /// </param> /// <param name="@string"> /// To be added. /// This parameter's element count is taken from count. /// </param> /// <param name="length"> /// To be added. /// This parameter's element count is taken from count. /// </param> public unsafe void ShaderSource([Flow(FlowDirection.In)] uint shaderObj, [Flow(FlowDirection.In)] uint count, [Count(Parameter = "count"), Flow(FlowDirection.In)] string[] @stringSa, [Count(Parameter = "count"), Flow(FlowDirection.In)] Span <int> length) { // StringArrayOverloader var @string = (char **)SilkMarshal.MarshalStringArrayToPtr(@stringSa); ShaderSource(shaderObj, count, @string, length); SilkMarshal.CopyPtrToStringArray((IntPtr)@string, @stringSa); }
/// <summary> /// To be added. /// </summary> /// <param name="type"> /// To be added. /// </param> /// <param name="count"> /// To be added. /// </param> /// <param name="strings"> /// To be added. /// This parameter's element count is taken from count. /// </param> /// <returns>See summary.</returns> public unsafe uint CreateShaderProgram([Flow(FlowDirection.In)] ShaderType type, [Flow(FlowDirection.In)] uint count, [Count(Parameter = "count"), Flow(FlowDirection.In)] string[] stringsSa) { // StringArrayOverloader var strings = (char **)SilkMarshal.MarshalStringArrayToPtr(stringsSa); var ret = CreateShaderProgram(type, count, strings); SilkMarshal.CopyPtrToStringArray((IntPtr)strings, stringsSa); return(ret); }
private string[] GetWindowExtensions() { var ptr = (IntPtr)this.DisplayWindow.VkSurface.GetRequiredExtensions(out uint count); string[] arr = new string[count]; SilkMarshal.CopyPtrToStringArray(ptr, arr); return(arr); }