summaryrefslogtreecommitdiff
path: root/assetFactory/textureFragment.cpp
blob: d1536885eb2417a2835451e25be513f52b9a1f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "textureFragment.h"
#include "resource.h"
#include <stb/stb_image.h>

bool
TextureFragment::persist(Persistence::PersistenceStore & store)
{
	return STORE_TYPE && STORE_MEMBER(id) && STORE_MEMBER(path);
}

void
TextureFragment::postLoad()
{
	image = std::make_unique<Image>(Resource::mapPath(path), STBI_rgb_alpha);
}