Clean up Image class.
This commit is contained in:
parent
4bb87de0e6
commit
0d3674faac
30 changed files with 330 additions and 135 deletions
|
@ -40,12 +40,11 @@ Scene* DrawingSurface::getScene()
|
|||
return mScene.get();
|
||||
}
|
||||
|
||||
Image<unsigned char>* DrawingSurface::getImage()
|
||||
Image* DrawingSurface::getImage()
|
||||
{
|
||||
if (!mBackingImage)
|
||||
{
|
||||
mBackingImage = std::make_unique<Image<unsigned char> >(mWidth, mHeight);
|
||||
mBackingImage->initialize();
|
||||
mBackingImage = std::make_unique<Image>(mWidth, mHeight);
|
||||
}
|
||||
return mBackingImage.get();
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#include <memory>
|
||||
|
||||
class Scene;
|
||||
|
||||
template<typename T>
|
||||
class Image;
|
||||
|
||||
class DrawingSurface
|
||||
|
@ -21,7 +19,7 @@ public:
|
|||
|
||||
unsigned getHeight() const;
|
||||
|
||||
Image<unsigned char>* getImage();
|
||||
Image* getImage();
|
||||
|
||||
Scene* getScene();
|
||||
|
||||
|
@ -29,5 +27,5 @@ protected:
|
|||
unsigned mWidth = 0;
|
||||
unsigned mHeight = 0;
|
||||
std::unique_ptr<Scene> mScene;
|
||||
std::unique_ptr<Image<unsigned char> > mBackingImage;
|
||||
std::unique_ptr<Image> mBackingImage;
|
||||
};
|
||||
|
|
|
@ -94,6 +94,9 @@ void DirectXInterface::initialize()
|
|||
|
||||
void DirectXInterface::initializeD2dStandalone()
|
||||
{
|
||||
D2D1_FACTORY_OPTIONS d2dFactoryOptions = {};
|
||||
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, __uuidof(ID2D1Factory3), &d2dFactoryOptions, &mD2dFactory);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue