26 return std::make_shared<GL4StructuredBuffer>(
99 count = (std::max)(0, count);
100 buffer->SetNumActiveElements(count);
114 if (!
buffer->GetKeepInternalCount())
160 auto numBytes =
buffer->GetNumBytes();
168 numBytes = ((numBytes + 3) / 4) * 4;
void AttachToUnit(GLint shaderStorageBufferUnit)
static std::shared_ptr< GEObject > Create(void *unused, GraphicsObject const *object)
bool SetNumActiveElements()
void APIENTRY glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
#define GL_SHADER_STORAGE_BUFFER
GraphicsObjectType GetType() const
bool CopyCounterValueToBuffer(GL4Buffer *targetBuffer, GLint offset)
void APIENTRY glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data)
bool GetNumActiveElements()
void APIENTRY glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage)
virtual void Initialize() override
bool CopyCounterValueFromBuffer(GL4Buffer *sourceBuffer, GLint offset)
#define LogError(message)
void APIENTRY glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
GL4StructuredBuffer(StructuredBuffer const *cbuffer)
void APIENTRY glBindBuffer(GLenum target, GLuint buffer)
virtual bool CopyGpuToCpu() override
#define GL_COPY_WRITE_BUFFER
#define GL_COPY_READ_BUFFER
void APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data)
virtual bool CopyGpuToCpu()
GLuint GetGLHandle() const
virtual void Initialize()
StructuredBuffer * GetStructuredBuffer() const