public T AddToStateObject <T>(StateObjectDescription addition, ID3D12StateObject stateObjectToGrowFrom) where T : ID3D12StateObject { Result result = AddToStateObject(addition, stateObjectToGrowFrom, typeof(T).GUID, out IntPtr nativePtr); if (result.Failure) { return(default);
/// <summary> /// Creates a <see cref="ID3D12StateObject"/>. /// </summary> /// <param name="description">The description of the state object to create.</param> /// <param name="stateObject">An instance of <see cref="ID3D12StateObject"/>.</param> /// <returns>The result of operation.</returns> public Result CreateStateObject <T>(StateObjectDescription description, out T?stateObject) where T : ID3D12StateObject { Result result = CreateStateObject(description, typeof(T).GUID, out IntPtr nativePtr); if (result.Failure) { stateObject = default; return(result); } stateObject = MarshallingHelpers.FromPointer <T>(nativePtr); return(result); }
public Result AddToStateObject <T>(StateObjectDescription addition, ID3D12StateObject stateObjectToGrowFrom, out T?newStateObject) where T : ID3D12StateObject { Result result = AddToStateObject(addition, stateObjectToGrowFrom, typeof(T).GUID, out IntPtr nativePtr); if (result.Failure) { newStateObject = default; return(result); } newStateObject = MarshallingHelpers.FromPointer <T>(nativePtr); return(result); }
/// <summary> /// Creates a <see cref="ID3D12StateObject"/>. /// </summary> /// <param name="description">The description of the state object to create.</param> /// <returns>An instance of <see cref="ID3D12StateObject"/>.</returns> public ID3D12StateObject CreateStateObject(StateObjectDescription description) { return(CreateStateObject(description, typeof(ID3D12StateObject).GUID)); }
/// <summary> /// Creates a <see cref="ID3D12StateObject"/>. /// </summary> /// <param name="description">The description of the state object to create.</param> /// <returns>An instance of <see cref="ID3D12StateObject"/>.</returns> public T CreateStateObject <T>(StateObjectDescription description) where T : ID3D12StateObject { CreateStateObject(description, typeof(T).GUID, out IntPtr nativePtr).CheckError(); return(MarshallingHelpers.FromPointer <T>(nativePtr)); }
public T AddToStateObject <T>(StateObjectDescription addition, ID3D12StateObject stateObjectToGrowFrom) where T : ID3D12StateObject { AddToStateObject(addition, stateObjectToGrowFrom, typeof(T).GUID, out IntPtr nativePtr).CheckError(); return(MarshallingHelpers.FromPointer <T>(nativePtr)); }