aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Texture.h
blob: 9a86f6f6b66fcd2e2e32e9666d266af88b113ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

// FIXME: this header can't be included because this is an API header, and SDL2
// development headers won't be bundled with crepe. Why is this facade in the
// API namespace?
#include <SDL2/SDL_render.h>
#include <memory>

#include "Asset.h"

namespace crepe {
class SDLContext;
}

namespace crepe {

class Texture {

public:
	Texture(const char * src);
	Texture(std::unique_ptr<Asset> res);
	~Texture();

private:
	void load(std::unique_ptr<Asset> res);

private:
	SDL_Texture * texture = nullptr;

	friend class crepe::SDLContext;
};

} // namespace crepe