MNN/source/backend/opengl/GLSSBOBuffer.hpp

38 lines
705 B
C++
Raw Normal View History

2019-04-17 10:49:11 +08:00
//
// GLSSBOBuffer.h
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef GLSSBOBUFFER_H
#define GLSSBOBUFFER_H
2019-12-27 22:16:57 +08:00
#include "backend/opengl/GLHead.hpp"
2019-04-17 10:49:11 +08:00
namespace MNN {
namespace OpenGL {
2019-04-17 10:49:11 +08:00
class GLSSBOBuffer {
public:
GLSSBOBuffer(GLsizeiptr size, GLenum type = GL_SHADER_STORAGE_BUFFER, GLenum usage = GL_DYNAMIC_DRAW);
~GLSSBOBuffer();
GLuint getId() const {
return mId;
}
void* map(GLbitfield bufMask);
void unmap();
GLsizeiptr size() const {
return mSize;
}
private:
GLuint mId = 0;
GLsizeiptr mSize;
GLenum mType;
};
} // namespace OpenGL
2019-04-17 10:49:11 +08:00
} // namespace MNN
#endif // GLSSBOBUFFER_H