aboutsummaryrefslogtreecommitdiffstats
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndy <drumsetmonkey@gmail.com>2016-12-23 08:42:15 -0500
committerAndy <drumsetmonkey@gmail.com>2016-12-23 08:42:15 -0500
commitd7d1b397197893f0ce49b28f762711b7a9ef1087 (patch)
tree6a14f9daf59cb1640f09e7f82c6325d93d0a62dc /src/inventory.cpp
parent691411cdb214178f2d10ab589943993039fe080e (diff)
parent6dd6d03bb1af3c1c482a67355446998eccc3288c (diff)
Sprites are good. Merged.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 91e81da..fb999ea 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -7,7 +7,7 @@
constexpr const char* ICON_TEX_FILE_PATH = "config/invIcons.txt";
-static std::vector<GLuint> iconTextures;
+static std::vector<Texture> iconTextures;
void InventorySystem::configure(entityx::EventManager &ev)
{
@@ -18,7 +18,7 @@ void InventorySystem::loadIcons(void) {
iconTextures.clear();
auto icons = readFileA(ICON_TEX_FILE_PATH);
for (const auto& s : icons)
- iconTextures.push_back(Texture::loadTexture(s));
+ iconTextures.push_back(s);
}
void InventorySystem::update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt)
@@ -27,14 +27,13 @@ void InventorySystem::update(entityx::EntityManager &en, entityx::EventManager &
(void)ev;
(void)dt;
- static auto color = Texture::genColor(Color(0, 0, 0));
vec2 start = vec2(offset.x, 100);// - game::SCREEN_WIDTH / 2 + 20, game::SCREEN_HEIGHT - 40);
//std::cout << start.x << ' ' << start.y << std::endl;
Render::textShader.use();
glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, color);
+ Colors::black.use();
Render::useShader(&Render::textShader);
Render::drawRect(start, start + 20, -9.9f);
Render::textShader.unuse();