示例#1
0
        static private int OnBuild(int serialNumber, IntPtr viewportPointer, IntPtr customRenderMeshPointer, Guid plugInId, int type)
        {
            var list = new RenderPrimitiveList(customRenderMeshPointer);

            try
            {
                var proider = FromSerialNumber(serialNumber);
                if (proider == null)
                {
                    return(0);
                }
                // Make a temporary list, you MUST CALL DetachPointer() to avoid a double delete
                var success = proider.BuildCustomMeshes(new ViewportInfo(viewportPointer), list, plugInId, type == 1);
                return(success ? 1 : 0);
            }
            catch (Exception ex)
            {
                Runtime.HostUtils.ExceptionReport(ex);
            }
            finally
            {
                // This MUST be called because we created the list and attached it to a
                // pointer owned by the display.
                list.DetachPointer();
            }
            return(0);
        }
 static private int OnBuild(int serialNumber, IntPtr viewportPointer, IntPtr customRenderMeshPointer, Guid plugInId, int type)
 {
   var list = new RenderPrimitiveList(customRenderMeshPointer);
   try
   {
     var proider = FromSerialNumber(serialNumber);
     if (proider == null) return 0;
     // Make a temporary list, you MUST CALL DetachPointer() to avoid a double delete
     var success = proider.BuildCustomMeshes(new ViewportInfo(viewportPointer), list, plugInId, type == 1);
     return (success ? 1 : 0);
   }
   catch (Exception ex)
   {
     Runtime.HostUtils.ExceptionReport(ex);
   }
   finally
   {
     // This MUST be called because we created the list and attached it to a
     // pointer owned by the display.
     list.DetachPointer();
   }
   return 0;
 }
示例#3
0
 /// <summary>
 /// Build custom render mesh(es).
 /// </summary>
 /// <param name="vp">The viewport being rendered.</param>
 /// <param name="objMeshes">The meshes class to populate with custom meshes.</param>
 /// <param name="requestingPlugIn">UUID of the RDK plug-in requesting the meshes.</param>
 /// <param name="meshType">Type of mesh to build.</param>
 /// <returns>true if operation was successful.</returns>
 public abstract bool BuildCustomMeshes(ViewportInfo vp, RenderPrimitiveList objMeshes, Guid requestingPlugIn, bool meshType);
 /// <summary>
 /// Build custom render mesh(es).
 /// </summary>
 /// <param name="vp">The viewport being rendered.</param>
 /// <param name="objMeshes">The meshes class to populate with custom meshes.</param>
 /// <param name="requestingPlugIn">UUID of the RDK plug-in requesting the meshes.</param>
 /// <param name="meshType">Type of mesh to build.</param>
 /// <returns>true if operation was successful.</returns>
 public abstract bool BuildCustomMeshes(ViewportInfo vp, RenderPrimitiveList objMeshes, Guid requestingPlugIn, bool meshType);