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/BsIndexBuffer.h"
7#include "BsGLHardwareBuffer.h"
8
9namespace bs { namespace ct
10{
11 /** @addtogroup GL
12 * @{
13 */
14
15 /** OpenGL implementation of an index buffer. */
16 class GLIndexBuffer : public IndexBuffer
17 {
18 public:
19 GLIndexBuffer(const INDEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
20
21 /** Returns internal OpenGL index buffer handle. */
22 GLuint getGLBufferId() const { return static_cast<GLHardwareBuffer*>(mBuffer)->getGLBufferId(); }
23
24 protected:
25 /** @copydoc IndexBuffer::initialize */
26 void initialize() override;
27 };
28
29 /** @} */
30}}