Eliminate Map::getTexturepool()

This commit is contained in:
John Firebaugh
2014-11-25 13:36:07 -08:00
parent 3aa15306f6
commit 576533b18c
14 changed files with 57 additions and 30 deletions

View File

@@ -11,13 +11,13 @@
using namespace mbgl;
Raster::Raster(const util::ptr<Texturepool> &texturepool_)
Raster::Raster(Texturepool& texturepool_)
: texturepool(texturepool_)
{}
Raster::~Raster() {
if (textured) {
texturepool->removeTextureID(texture);
texturepool.removeTextureID(texture);
}
}
@@ -46,7 +46,7 @@ void Raster::bind(bool linear) {
}
if (img && !textured) {
texture = texturepool->getTextureID();
texture = texturepool.getTextureID();
glBindTexture(GL_TEXTURE_2D, texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);