#pragma once #include #include class Texture : public RefObject { private: SDL_Texture *m_texture = nullptr; public: SDL_Point TextureSize = {0, 0}; // 纹理大小 SDL_Point TexturePos = {0, 0}; // 纹理位置 SDL_Point TextureFramepos = {0, 0}; // 帧域宽高 public: Texture(/* args */); Texture(std::string imgPath, int Index); ~Texture(); public: void Init(std::string imgPath, int Index); void SetBlendMode(SDL_BlendMode blendMode); // 获取混合模式 SDL_BlendMode GetBlendMode(); SDL_Texture *GetTexture(); // 获取纹理 };