mirror of https://github.com/axmolengine/axmol.git
26 lines
532 B
C++
26 lines
532 B
C++
#pragma once
|
|
|
|
#include "../Buffer.h"
|
|
|
|
#include "platform/CCGL.h"
|
|
|
|
CC_BACKEND_BEGIN
|
|
|
|
class BufferGL : public Buffer
|
|
{
|
|
public:
|
|
BufferGL(unsigned int size, BufferType type, BufferUsage usage);
|
|
~BufferGL();
|
|
|
|
virtual void updateData(void* data, unsigned int size) override;
|
|
virtual void updateSubData(void* data, unsigned int offset, unsigned int size) override;
|
|
|
|
inline GLuint getHandler() const { return _buffer; }
|
|
|
|
private:
|
|
GLuint _buffer = 0;
|
|
bool _bufferAllocated = false;
|
|
};
|
|
|
|
CC_BACKEND_END
|