mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-09 00:37:59 +01:00
19 lines
343 B
C++
19 lines
343 B
C++
#ifdef WINDOWS
|
|
|
|
#include "TextureManager.h"
|
|
#include "Texture.h"
|
|
|
|
Texture2D *TextureManager::registerTexture(const char *fname) {
|
|
for (int i = 0; i < loaded.size(); i++) {
|
|
if (!stricmp(loaded[i]->getName(), fname))
|
|
return loaded[i];
|
|
}
|
|
Texture2D *t = new Texture2D();
|
|
t->loadTexture(fname);
|
|
loaded.push_back(t);
|
|
return t;
|
|
}
|
|
|
|
|
|
#endif
|