unique_ptr based management for SDL_Surfaces
This commit is contained in:
@@ -61,6 +61,7 @@ private:
|
||||
|
||||
class Texture2D {
|
||||
public:
|
||||
Texture2D();
|
||||
Texture2D(unsigned width, unsigned height, bool alpha = false);
|
||||
Texture2D(std::string const& file);
|
||||
Texture2D(SDL_Surface *surface);
|
||||
@@ -76,7 +77,11 @@ public:
|
||||
void bind() const;
|
||||
|
||||
void copyFromSurface(SDL_Surface *src);
|
||||
SDL_Surface* copyToSurface();
|
||||
SDLSurfaceUPtr copyToSurface();
|
||||
|
||||
unsigned getWidth() const { return width_; }
|
||||
unsigned getHeight() const { return height_; }
|
||||
bool getAlpha() const { return alpha_; }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user