Something went wrong. Try again.
art software for the rest of us
drawing paint image sdl art
Something went wrong. Try again.
C
12345678910111213141516171819202122232425#pragma once#include <SDL3/SDL.h>#include <string>
class Texture { SDL_GPUTexture* texture; SDL_GPUTextureCreateInfo createInfo;public: Texture(SDL_GPUTextureCreateInfo createInfo); Texture(std::string path); ~Texture(); SDL_GPUTexture* Get();
// info SDL_GPUTextureCreateInfo GetCreateInfo(); int GetWidth(); int GetHeight(); SDL_GPUTextureFormat GetFormat(); void Clear(SDL_FColor color); void CopyTo(Texture* target, SDL_Point sourceOffset, SDL_Point destinationOffset, SDL_Point size); void* Download(); void* DownloadAsQoI(size_t& outSize); void Upload(void* data); void UploadAsQoI(const void* data, size_t size);};