18 #if defined(EEGEO_UNITY)
19 #pragma clang diagnostic push
20 #pragma clang diagnostic ignored "-Wunused-private-field"
29 int bufferChainCount);
33 void Reserve(
int elementCount);
35 void Shrink(
int elementCount);
45 void Upload(
const void* pData,
int elementOffset,
int elementCount)
const;
48 void ResizeBuffer(
int elementCount);
52 std::vector<GLuint> m_glBuffers;
56 int m_elementCapacity;
57 int m_currentBufferIndex;
58 GLuint m_currentBuffer;
61 #if defined(EEGEO_UNITY)
62 #pragma clang diagnostic pop
69 typedef T ElementType;
71 typedef std::vector<ElementType> ElementVectorType;
83 void Upload(
const ElementVectorType& elements)
85 const void* pData =
static_cast<const void*
>(elements.data());
87 GlBufferBase::Upload(pData, m_elementOffset, static_cast<int>(elements.size()));
89 m_elementOffset +=
static_cast<int>(elements.size());
92 int GetElementOffset()
const {
return m_elementOffset; }
98 :
GlBufferBase(bufferType, hint, static_cast<int>(
sizeof(ElementType)), bufferChainCount)