[core] GLObjectStore now uses GLuint
This commit is contained in:
committed by
Konstantin Käfer
parent
b2fcde5e8b
commit
05d01194b7
@@ -7,17 +7,17 @@
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
void GLObjectStore::abandonVAO(uint32_t vao) {
|
||||
void GLObjectStore::abandonVAO(GLuint vao) {
|
||||
assert(ThreadContext::currentlyOn(ThreadType::Map));
|
||||
abandonedVAOs.emplace_back(vao);
|
||||
}
|
||||
|
||||
void GLObjectStore::abandonBuffer(uint32_t buffer) {
|
||||
void GLObjectStore::abandonBuffer(GLuint buffer) {
|
||||
assert(ThreadContext::currentlyOn(ThreadType::Map));
|
||||
abandonedBuffers.emplace_back(buffer);
|
||||
}
|
||||
|
||||
void GLObjectStore::abandonTexture(uint32_t texture) {
|
||||
void GLObjectStore::abandonTexture(GLuint texture) {
|
||||
assert(ThreadContext::currentlyOn(ThreadType::Map));
|
||||
abandonedTextures.emplace_back(texture);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef MBGL_MAP_UTIL_GL_OBJECT_STORE
|
||||
#define MBGL_MAP_UTIL_GL_OBJECT_STORE
|
||||
|
||||
#include <mbgl/platform/gl.hpp>
|
||||
#include <mbgl/util/noncopyable.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
@@ -14,18 +15,18 @@ public:
|
||||
GLObjectStore() = default;
|
||||
|
||||
// Mark OpenGL objects for deletion
|
||||
void abandonVAO(uint32_t vao);
|
||||
void abandonBuffer(uint32_t buffer);
|
||||
void abandonTexture(uint32_t texture);
|
||||
void abandonVAO(GLuint vao);
|
||||
void abandonBuffer(GLuint buffer);
|
||||
void abandonTexture(GLuint texture);
|
||||
|
||||
// Actually remove the objects we marked as abandoned with the above methods.
|
||||
// Only call this while the OpenGL context is exclusive to this thread.
|
||||
void performCleanup();
|
||||
|
||||
private:
|
||||
std::vector<uint32_t> abandonedVAOs;
|
||||
std::vector<uint32_t> abandonedBuffers;
|
||||
std::vector<uint32_t> abandonedTextures;
|
||||
std::vector<GLuint> abandonedVAOs;
|
||||
std::vector<GLuint> abandonedBuffers;
|
||||
std::vector<GLuint> abandonedTextures;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user