sKit  0.0.9
TextureDownloader.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL3/SDL_gpu.h>
4 
5 namespace sKit {
6 namespace SDL {
7 
23  public:
24  SDL_GPUTransferBuffer* buffer;
25 
26  TextureDownloader() = default;
27 
31  SDL_GPUDevice* device,
32  SDL_GPUCopyPass* pass,
33  SDL_GPUTexture* sourceTexture,
34  Uint32 width,
35  Uint32 height
36  );
37 
40 
44  auto getData() -> unsigned char*;
45 
46  private:
47  SDL_GPUDevice* device_;
48 };
49 
50 } // namespace SDL
51 } // namespace sKit
sKit::SDL::TextureDownloader::~TextureDownloader
~TextureDownloader()
Unmaps and releases the SDL_GPUTransferBuffer.
Definition: TextureDownloader.cpp:32
sKit::SDL::TextureDownloader::buffer
SDL_GPUTransferBuffer * buffer
Definition: TextureDownloader.hpp:24
sKit
Definition: camera.hpp:8
sKit::SDL::TextureDownloader
An SDL_GPUTexture download helper. Can be used to download a texture from the gpu and get as raw data...
Definition: TextureDownloader.hpp:22
sKit::SDL::TextureDownloader::TextureDownloader
TextureDownloader()=default
sKit::SDL::TextureDownloader::getData
auto getData() -> unsigned char *
Definition: TextureDownloader.cpp:37