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
8
namespace
ga
{
9
class
Texture :
public
ofTexture
10
{
11
};
12
13
inline
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
// ---------------------------
23
using
TextureCache
= ResourceCache<Texture>;
24
25
inline
TextureCache
&
textureCache
()
26
{
27
static
TextureCache
texCache;
28
return
texCache;
29
}
30
}
defines.h
ga
Definition:
color.h:9
resource.h
TextureCache
ResourceCache< Texture > TextureCache
Definition:
texture.h:23
textureCache
TextureCache & textureCache()
Definition:
texture.h:25
G&A
oF
of_v0.11.2_vs2017_release
addons
ofxGAKit
libs
gaKit
src
ga
texture.h
Generated by
1.9.6