[core] introduces types for GL objects
This commit is contained in:
committed by
John Firebaugh
parent
d1a84d9b51
commit
15aece8a30
@@ -7,22 +7,22 @@ namespace mbgl {
|
||||
namespace gl {
|
||||
namespace detail {
|
||||
|
||||
void ProgramDeleter::operator()(GLuint id) const {
|
||||
void ProgramDeleter::operator()(ProgramID id) const {
|
||||
assert(context);
|
||||
context->abandonedPrograms.push_back(id);
|
||||
}
|
||||
|
||||
void ShaderDeleter::operator()(GLuint id) const {
|
||||
void ShaderDeleter::operator()(ShaderID id) const {
|
||||
assert(context);
|
||||
context->abandonedShaders.push_back(id);
|
||||
}
|
||||
|
||||
void BufferDeleter::operator()(GLuint id) const {
|
||||
void BufferDeleter::operator()(BufferID id) const {
|
||||
assert(context);
|
||||
context->abandonedBuffers.push_back(id);
|
||||
}
|
||||
|
||||
void TextureDeleter::operator()(GLuint id) const {
|
||||
void TextureDeleter::operator()(TextureID id) const {
|
||||
assert(context);
|
||||
if (context->pooledTextures.size() >= TextureMax) {
|
||||
context->abandonedTextures.push_back(id);
|
||||
@@ -31,12 +31,12 @@ void TextureDeleter::operator()(GLuint id) const {
|
||||
}
|
||||
}
|
||||
|
||||
void VertexArrayDeleter::operator()(GLuint id) const {
|
||||
void VertexArrayDeleter::operator()(VertexArrayID id) const {
|
||||
assert(context);
|
||||
context->abandonedVertexArrays.push_back(id);
|
||||
}
|
||||
|
||||
void FramebufferDeleter::operator()(GLuint id) const {
|
||||
void FramebufferDeleter::operator()(FramebufferID id) const {
|
||||
assert(context);
|
||||
context->abandonedFramebuffers.push_back(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user