[core] Use release() instead of get()/reset() in Raster

This commit is contained in:
Bruno de Oliveira Abinader
2016-06-02 19:43:43 +03:00
parent 650b988874
commit 61dad6eae5

View File

@@ -66,8 +66,7 @@ void Raster::upload(gl::ObjectStore& store) {
#endif
MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
MBGL_CHECK_ERROR(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.data.get()));
img.data.reset();
MBGL_CHECK_ERROR(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.data.release()));
textured = true;
}
}