Add CreateFromGameScreen

This commit is contained in:
Soreepeong 2024-03-03 20:08:52 +09:00
parent c0938bd3a9
commit c04ce36b9c
19 changed files with 1403 additions and 581 deletions

View file

@ -83,6 +83,9 @@ internal sealed class DalamudAssetManager : IServiceType, IDisposable, IDalamudA
/// <inheritdoc/>
public IDalamudTextureWrap Empty4X4 => this.GetDalamudTextureWrap(DalamudAsset.Empty4X4);
/// <inheritdoc/>
public IDalamudTextureWrap White4X4 => this.GetDalamudTextureWrap(DalamudAsset.White4X4);
/// <inheritdoc/>
public void Dispose()
{

View file

@ -2,25 +2,21 @@
using SharpDX.DXGI;
using TerraFX.Interop.DirectX;
namespace Dalamud.Storage.Assets;
/// <summary>
/// Provide raw texture data directly.
/// </summary>
/// <summary>Provide raw texture data directly. </summary>
[AttributeUsage(AttributeTargets.Field)]
internal class DalamudAssetRawTextureAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="DalamudAssetRawTextureAttribute"/> class.
/// </summary>
/// <summary>Initializes a new instance of the <see cref="DalamudAssetRawTextureAttribute"/> class.</summary>
/// <param name="width">The width.</param>
/// <param name="pitch">The pitch.</param>
/// <param name="height">The height.</param>
/// <param name="format">The format.</param>
public DalamudAssetRawTextureAttribute(int width, int pitch, int height, Format format)
{
this.Specification = new(width, height, pitch, (int)format);
}
/// <param name="pitch">The pitch.</param>
public DalamudAssetRawTextureAttribute(int width, int height, DXGI_FORMAT format, int pitch) =>
this.Specification = new(width, height, (int)format, pitch);
/// <summary>
/// Gets the specification.

View file

@ -23,6 +23,11 @@ public interface IDalamudAssetManager
/// </summary>
IDalamudTextureWrap Empty4X4 { get; }
/// <summary>
/// Gets the shared texture wrap for <see cref="DalamudAsset.White4X4"/>.
/// </summary>
IDalamudTextureWrap White4X4 { get; }
/// <summary>
/// Gets whether the stream for the asset is instantly available.
/// </summary>