GA::kit v0.3
G&A's in-house C++ application framework
Loading...
Searching...
No Matches
texture.h
Go to the documentation of this file.
1#pragma once
2#include "ga/defines.h"
3#include "ga/resource.h"
4
5#ifdef GA_OPENFRAMEWORKS
6#include "ofImage.h"
7
8namespace ga {
9class Texture : public ofTexture
10{
11};
12
13inline bool load( Texture& texture, const std::string& path )
14{
15 return ofLoadImage( texture, path );
16}
17#endif
18// todo: extend Texture for Cinder, or more bare-metal implementation
19
20// ---------------------------
21// Global Texture Cache
22// ---------------------------
23using TextureCache = ResourceCache<Texture>;
24
26{
27 static TextureCache texCache;
28 return texCache;
29}
30}
Definition: color.h:9
ResourceCache< Texture > TextureCache
Definition: texture.h:23
TextureCache & textureCache()
Definition: texture.h:25