graphics_texture_upload.h 842 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <d3d11.h>
  3. namespace sunrise::client::hooks::graphics::textures {
  4. /** One uploaded image: the texture we own and the view the interface draws with. */
  5. struct Uploaded {
  6. ID3D11Texture2D* texture{};
  7. ID3D11ShaderResourceView* view{};
  8. };
  9. /**
  10. * Decodes the bundled logo sheet and publishes its view to the Core interface.
  11. * @param device Device that creates and owns the texture.
  12. * @param output Receives the created objects. Left alone when any step fails.
  13. * @return True when the sheet is uploaded and published.
  14. */
  15. [[nodiscard]] bool upload_logo_sheet(ID3D11Device* device, Uploaded& output) noexcept;
  16. /** @param uploaded Objects released and cleared, after the published slot is emptied. */
  17. void release_logo_sheet(Uploaded& uploaded) noexcept;
  18. } // namespace sunrise::client::hooks::graphics::textures