OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
imagetosurface.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_SDLUTIL_IMAGETOSURFACE_H
2 #define OPENMW_COMPONENTS_SDLUTIL_IMAGETOSURFACE_H
3 
4 #include <memory>
5 
6 struct SDL_Surface;
7 
8 namespace osg
9 {
10  class Image;
11 }
12 
13 namespace SDLUtil
14 {
15  typedef std::unique_ptr<SDL_Surface, void (*)(SDL_Surface *)> SurfaceUniquePtr;
16 
18  SurfaceUniquePtr imageToSurface(osg::Image* image, bool flip=false);
19 
20 }
21 
22 #endif
std::unique_ptr< SDL_Surface, void(*)(SDL_Surface *)> SurfaceUniquePtr
Definition: imagetosurface.hpp:15
SurfaceUniquePtr imageToSurface(osg::Image *image, bool flip)
Convert an osg::Image to an SDL_Surface.
Definition: imagetosurface.cpp:9