summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/renderer_gl.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/renderer_gl.h')
-rw-r--r--3rdparty/bgfx/src/renderer_gl.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/3rdparty/bgfx/src/renderer_gl.h b/3rdparty/bgfx/src/renderer_gl.h
index f9414490acc..338550f0ad5 100644
--- a/3rdparty/bgfx/src/renderer_gl.h
+++ b/3rdparty/bgfx/src/renderer_gl.h
@@ -782,9 +782,10 @@ namespace bgfx { namespace gl
struct IndexBufferGL
{
- void create(uint32_t _size, void* _data)
+ void create(uint32_t _size, void* _data, uint8_t _flags)
{
- m_size = _size;
+ m_size = _size;
+ m_flags = _flags;
GL_CHECK(glGenBuffers(1, &m_id) );
BX_CHECK(0 != m_id, "Failed to generate buffer id.");
@@ -792,7 +793,7 @@ namespace bgfx { namespace gl
GL_CHECK(glBufferData(GL_ELEMENT_ARRAY_BUFFER
, _size
, _data
- , (NULL==_data)?GL_DYNAMIC_DRAW:GL_STATIC_DRAW
+ , (NULL==_data) ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW
) );
GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0) );
}
@@ -819,6 +820,7 @@ namespace bgfx { namespace gl
GLuint m_id;
uint32_t m_size;
VaoCacheRef m_vcref;
+ uint8_t m_flags;
};
struct VertexBufferGL
@@ -834,7 +836,7 @@ namespace bgfx { namespace gl
GL_CHECK(glBufferData(GL_ARRAY_BUFFER
, _size
, _data
- , (NULL==_data)?GL_DYNAMIC_DRAW:GL_STATIC_DRAW
+ , (NULL==_data) ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW
) );
GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, 0) );
}
@@ -928,6 +930,7 @@ namespace bgfx { namespace gl
void create(uint8_t _num, const TextureHandle* _handles);
void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat);
+ void postReset();
uint16_t destroy();
void resolve();
void discard(uint16_t _flags);
@@ -937,7 +940,9 @@ namespace bgfx { namespace gl
uint32_t m_width;
uint32_t m_height;
uint16_t m_denseIdx;
- uint8_t m_num;
+ uint8_t m_num;
+ uint8_t m_numTh;
+ TextureHandle m_th[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS];
};
struct ProgramGL