2015-05-13 13:03:21 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_SDLUTIL_IMAGETOSURFACE_H
|
|
|
|
#define OPENMW_COMPONENTS_SDLUTIL_IMAGETOSURFACE_H
|
|
|
|
|
2018-06-16 10:12:32 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2015-05-13 13:03:21 +00:00
|
|
|
struct SDL_Surface;
|
|
|
|
|
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class Image;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace SDLUtil
|
|
|
|
{
|
2018-06-16 10:12:32 +00:00
|
|
|
typedef std::unique_ptr<SDL_Surface, void (*)(SDL_Surface*)> SurfaceUniquePtr;
|
2015-05-13 13:03:21 +00:00
|
|
|
|
|
|
|
/// Convert an osg::Image to an SDL_Surface.
|
2018-06-16 10:12:32 +00:00
|
|
|
SurfaceUniquePtr imageToSurface(osg::Image* image, bool flip = false);
|
2015-05-13 13:03:21 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|