Exemple #1
0
        ///// <summary>
        ///// Dispatches an indirect compute job.
        ///// </summary>
        ///// <param name="id">The index of the view to dispatch.</param>
        ///// <param name="program">The shader program to use.</param>
        ///// <param name="indirectBuffer">The buffer containing drawing commands.</param>
        ///// <param name="startIndex">The index of the first command to process.</param>
        ///// <param name="count">The number of commands to process from the buffer.</param>
        //public void Dispatch (ushort id, Program program, IndirectBuffer indirectBuffer, int startIndex = 0, int count = 1) {
        //    NativeMethods.bgfx_encoder_dispatch_indirect(ptr, id, program.handle, indirectBuffer.handle, (ushort)startIndex, (ushort)count);
        //}

        //!!!!betauser
        /// <summary>
        /// Discards all previously set state for the draw call.
        /// </summary>
        public void Discard(DiscardFlags flags)
        {
            NativeMethods.bgfx_encoder_discard(ptr, flags);
        }
Exemple #2
0
 //!!!!betauser
 /// <summary>
 /// Dispatches a compute job.
 /// </summary>
 /// <param name="id">The index of the view to dispatch.</param>
 /// <param name="program">The shader program to use.</param>
 /// <param name="xCount">The size of the job in the first dimension.</param>
 /// <param name="yCount">The size of the job in the second dimension.</param>
 /// <param name="zCount">The size of the job in the third dimension.</param>
 public void Dispatch(ushort id, Program program, int xCount, int yCount, int zCount, DiscardFlags flags)
 {
     NativeMethods.bgfx_encoder_dispatch(ptr, id, program.handle, (uint)xCount, (uint)yCount, (uint)zCount, flags);
 }
Exemple #3
0
        ///// <summary>
        ///// Dispatches a compute job.
        ///// </summary>
        ///// <param name="id">The index of the view to dispatch.</param>
        ///// <param name="program">The shader program to use.</param>
        ///// <param name="xCount">The size of the job in the first dimension.</param>
        ///// <param name="yCount">The size of the job in the second dimension.</param>
        ///// <param name="zCount">The size of the job in the third dimension.</param>
        //public void Dispatch (ushort id, Program program, int xCount = 1, int yCount = 1, int zCount = 1) {
        //    NativeMethods.bgfx_encoder_dispatch(ptr, id, program.handle, (uint)xCount, (uint)yCount, (uint)zCount);
        //}

        //!!!!betauser
        /// <summary>
        /// Dispatches an indirect compute job.
        /// </summary>
        /// <param name="id">The index of the view to dispatch.</param>
        /// <param name="program">The shader program to use.</param>
        /// <param name="indirectBuffer">The buffer containing drawing commands.</param>
        /// <param name="startIndex">The index of the first command to process.</param>
        /// <param name="count">The number of commands to process from the buffer.</param>
        public void Dispatch(ushort id, Program program, IndirectBuffer indirectBuffer, int startIndex, int count, DiscardFlags flags)
        {
            NativeMethods.bgfx_encoder_dispatch_indirect(ptr, id, program.handle, indirectBuffer.handle, (ushort)startIndex, (ushort)count, flags);
        }
Exemple #4
0
        ///// <summary>
        ///// Submits the current batch of primitives for rendering.
        ///// </summary>
        ///// <param name="id">The index of the view to submit.</param>
        ///// <param name="program">The program with which to render.</param>
        ///// <param name="depth">A depth value to use for sorting the batch.</param>
        ///// <param name="preserveState"><c>true</c> to preserve internal draw state after the call.</param>
        ///// <returns>The number of draw calls.</returns>
        //public int Submit (ushort id, Program program, int depth = 0, bool preserveState = false) {
        //    return NativeMethods.bgfx_encoder_submit(ptr, id, program.handle, depth, preserveState);
        //}

        //!!!!betauser
        /// <summary>
        /// Submits the current batch of primitives for rendering.
        /// </summary>
        /// <param name="id">The index of the view to submit.</param>
        /// <param name="program">The program with which to render.</param>
        /// <param name="query">An occlusion query to use as a predicate during rendering.</param>
        /// <param name="depth">A depth value to use for sorting the batch.</param>
        /// <param name="preserveState"><c>true</c> to preserve internal draw state after the call.</param>
        /// <returns>The number of draw calls.</returns>
        public int Submit(ushort id, Program program, OcclusionQuery query, int depth, DiscardFlags flags)
        {
            return(NativeMethods.bgfx_encoder_submit_occlusion_query(ptr, id, program.handle, query.handle, depth, flags));
        }
Exemple #5
0
        ///// <summary>
        ///// Submits the current batch of primitives for rendering.
        ///// </summary>
        ///// <param name="id">The index of the view to submit.</param>
        ///// <param name="program">The program with which to render.</param>
        ///// <param name="query">An occlusion query to use as a predicate during rendering.</param>
        ///// <param name="depth">A depth value to use for sorting the batch.</param>
        ///// <param name="preserveState"><c>true</c> to preserve internal draw state after the call.</param>
        ///// <returns>The number of draw calls.</returns>
        //public int Submit (ushort id, Program program, OcclusionQuery query, int depth = 0, bool preserveState = false) {
        //    return NativeMethods.bgfx_encoder_submit_occlusion_query(ptr, id, program.handle, query.handle, depth, preserveState);
        //}

        //!!!!betauser
        /// <summary>
        /// Submits an indirect batch of drawing commands to be used for rendering.
        /// </summary>
        /// <param name="id">The index of the view to submit.</param>
        /// <param name="program">The program with which to render.</param>
        /// <param name="indirectBuffer">The buffer containing drawing commands.</param>
        /// <param name="startIndex">The index of the first command to process.</param>
        /// <param name="count">The number of commands to process from the buffer.</param>
        /// <param name="depth">A depth value to use for sorting the batch.</param>
        /// <param name="preserveState"><c>true</c> to preserve internal draw state after the call.</param>
        /// <returns>The number of draw calls.</returns>
        public int Submit(ushort id, Program program, IndirectBuffer indirectBuffer, int startIndex, int count, int depth, DiscardFlags flags)
        {
            return(NativeMethods.bgfx_encoder_submit_indirect(ptr, id, program.handle, indirectBuffer.handle, (ushort)startIndex, (ushort)count, depth, flags));
        }
Exemple #6
0
 public static extern void bgfx_encoder_discard(IntPtr encoder, [MarshalAs(UnmanagedType.U1)] DiscardFlags flags);
Exemple #7
0
 //!!!!betauser
 /// <summary>
 /// Submits the current batch of primitives for rendering.
 /// </summary>
 /// <param name="id">The index of the view to submit.</param>
 /// <param name="program">The program with which to render.</param>
 /// <param name="depth">A depth value to use for sorting the batch.</param>
 /// <param name="preserveState"><c>true</c> to preserve internal draw state after the call.</param>
 /// <returns>The number of draw calls.</returns>
 public int Submit(ushort id, Program program, int depth, DiscardFlags flags)
 {
     return(NativeMethods.bgfx_encoder_submit(ptr, id, program.handle, depth, flags));
 }
Exemple #8
0
 public static extern int bgfx_encoder_dispatch_indirect(IntPtr encoder, ushort id, ushort program, ushort indirectHandle, ushort start, ushort num, [MarshalAs(UnmanagedType.U1)] DiscardFlags flags);
Exemple #9
0
 public static extern int bgfx_encoder_dispatch(IntPtr encoder, ushort id, ushort program, uint numX, uint numY, uint numZ, [MarshalAs(UnmanagedType.U1)] DiscardFlags flags);
Exemple #10
0
 public static extern int bgfx_encoder_submit_occlusion_query(IntPtr encoder, ushort id, ushort programHandle, ushort queryHandle, int depth, [MarshalAs(UnmanagedType.U1)] DiscardFlags flags);
Exemple #11
0
 public static extern void bgfx_discard([MarshalAs(UnmanagedType.U1)] DiscardFlags flags);
Exemple #12
0
 public static extern int bgfx_submit_indirect(ushort id, ushort programHandle, ushort indirectHandle, ushort start, ushort num, int depth, [MarshalAs(UnmanagedType.U1)] DiscardFlags flags);