1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
---|---|
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #pragma once |
4 | |
5 | #include "BsGLPrerequisites.h" |
6 | #include "RenderAPI/BsGpuParamBlockBuffer.h" |
7 | #include "BsGLHardwareBuffer.h" |
8 | |
9 | namespace bs { namespace ct |
10 | { |
11 | /** @addtogroup GL |
12 | * @{ |
13 | */ |
14 | |
15 | /** OpenGL implementation of a GPU parameter buffer (Uniform buffer). */ |
16 | class GLGpuParamBlockBuffer : public GpuParamBlockBuffer |
17 | { |
18 | public: |
19 | GLGpuParamBlockBuffer(UINT32 size, GpuBufferUsage usage, GpuDeviceFlags deviceMask); |
20 | ~GLGpuParamBlockBuffer(); |
21 | |
22 | /** Returns internal OpenGL uniform buffer handle. */ |
23 | GLuint getGLBufferId() const { return static_cast<GLHardwareBuffer*>(mBuffer)->getGLBufferId(); } |
24 | protected: |
25 | /** @copydoc GpuParamBlockBuffer::initialize */ |
26 | void initialize() override ; |
27 | }; |
28 | |
29 | /** @} */ |
30 | }} |
31 |